glassfish

Glassfish v3 / JNDI entry cannot be found problems!

為{幸葍}努か 提交于 2020-01-12 03:28:06
问题 I've been having problems trying to call an EJB's method from a Java Application Client. Here is the code. EJB Remote Interface package com.test; import javax.ejb.Remote; @Remote public interface HelloBeanRemote { public String sayHello(); } EJB package com.test; import javax.ejb.Stateless; @Stateless (name="HelloBeanExample" , mappedName="ejb/HelloBean") public class HelloBean implements HelloBeanRemote { @Override public String sayHello(){ return "hola"; } } Main class (another project)

Glassfish 4 scans for @PostConstruct with CDI disabled

喜你入骨 提交于 2020-01-11 06:15:17
问题 I'm doing and upgrade from Glassfish 3.1.2.2 to Glassfish 4.1 for a set of Spring applications. Since I use the Spring to handle @Inject annotations, I have disabled Glassfish' CDI using this command: asadmin set configs.config.server-config.cdi-service.enable-implicit-cdi=false Still, when I deploy one of my applications, I get the following error message: The lifecycle method [something] must not throw a checked exception. Related annotation information: annotation [@javax.annotation

SerialInitContextFactory not found in glassfish naming

这一生的挚爱 提交于 2020-01-11 06:11:31
问题 This one starts to drive me completely nuts ... I want to create a Glassfish client application using Maven. For that, I've added the requried gf-client dependency : <dependency> <groupId>org.glassfish.appclient</groupId> <artifactId>gf-client</artifactId> <version>3.1</version> <type>pom</type> <scope>compile</scope> </dependency> Then, wanting to contact my Glassfish server, running on the same application, I do the usual lookup : Properties p = new Properties(); // optional. Defaults to

How to make Jersey use GZip compression for the response message body

a 夏天 提交于 2020-01-10 22:30:03
问题 I am trying to write a simple Jersey application that sends files from a Jersey client to a Jersey server and back. However, the files only seem to be encoded on the way from the client to the server but not the other way. I wonder how I can change this behavior. I am testing this in a simple example: public class GZipEncodingTest extends JerseyTest { private static final String PATH = "/"; private static final String QUESTION = "foo", ANSWER = "bar"; private static final String ENCODING_GZIP

Glassfish unable to deploy at root because default-web-module is declared

荒凉一梦 提交于 2020-01-10 05:57:28
问题 While trying to deploy to Glassfish Server Open Source Edition 3.1.2.2 (build 5) from both Netbeans and Admin Console the following message is thrown. Eventhough the Applications section of the Admin Console has no deployed applications. I have tried restarting the domain without success. Exception while loading the app : java.lang.Exception: WEB0145: Unable to deploy web module [*module name*] at root context of virtual server [server], because this virtual server declares a default-web

SCJP,SCWCD,OCA,OCP|| javaEE 5 SDK下载

余生长醉 提交于 2020-01-08 13:01:33
SCJP,SCWCD,OCA,OCP http://java.sun.com/javaee/downloads/ ( Java EE 5 SDK Preview (includes Sun Java System Application Server PE 9 Beta) ) The Advantages of the Java EE 5 Platform: A Conversation with Distinguished Engineer Bill Shannon By Janice J. Heiss , March 2006 Articles Index Version 5 of the Java Platform, Enterprise Edition (Java EE, formerly referred to as J2EE), has arrived. Its streamlined features offer added convenience, improved performance, and reduced development time, all of which enable developers to bring products to market faster. To get an update on the Java EE 5 platform

Glassfish url mapping

不想你离开。 提交于 2020-01-07 08:53:09
问题 I have some question about mapping url in Glassfish 4. here is my project structure http://postimg.org/image/5gdyiassj/ as you can see I don't have eshop folder, but in my project there is a redirect to this folder. I tried to place this code web xml <?xml version="1.0" encoding="ISO-8859-1"?> <web-app xmlns="http://java.sun.com/xml/ns/j2ee" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:schemaLocation="http://java.sun.com/xml/ns/j2ee http://java.sun.com/xml/ns/j2ee/web-app_2_4.xsd

Glassfish url mapping

感情迁移 提交于 2020-01-07 08:53:05
问题 I have some question about mapping url in Glassfish 4. here is my project structure http://postimg.org/image/5gdyiassj/ as you can see I don't have eshop folder, but in my project there is a redirect to this folder. I tried to place this code web xml <?xml version="1.0" encoding="ISO-8859-1"?> <web-app xmlns="http://java.sun.com/xml/ns/j2ee" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:schemaLocation="http://java.sun.com/xml/ns/j2ee http://java.sun.com/xml/ns/j2ee/web-app_2_4.xsd

Retrieve object add in JAAS login module from JSF managedbean

那年仲夏 提交于 2020-01-07 04:51:27
问题 Our application uses JSF 2.2 and use glassfish 4 as the server. I need to add some object in the login module during authenticate user, so in the web application, the managed bean can retrieve that object. In the loginModule I did the following (if it is not the case please tell me the right way to do): _subject.getPublicCredentials().add(someObject); But how can I retrieve it in ManagedBean. Any help will be much appreciated. 回答1: This is part of the JSR-115 specification JavaTM

GlassFish 4.1.1 Spring 4.0.9, EclipseLink, PostgreSQL - transaction marked for rollback with no information

旧城冷巷雨未停 提交于 2020-01-06 20:55:16
问题 I want to set up an application running on GlassFish 4.1.1 with EclipseLink and Spring. My database is PostgreSQL. Below is my configuration. When I try to invoke /facebookDebug method I get "javax.transaction.RollbackException: Transaction marked for rollback" which is not very descriptive. Please look at my configuration. Is there everything ok? I can add a log from the server start, maybe you will find something there. persistence.xml <?xml version="1.0" encoding="UTF-8"?> <persistence