eclipse-ee4j / glassfish

Eclipse GlassFish
https://eclipse-ee4j.github.io/glassfish/
378 stars 144 forks source link

ACC builds portable JNDI names in a wrong style, incompatible to the style the EJB container builds them! #18829

Closed glassfishrobot closed 12 years ago

glassfishrobot commented 12 years ago

The ACC builds portable JNDI names by using the EAR's FILE name, while the EJB container buils portable JNDI names by using the APPLICATION name (found in application.xml of the EAR). This leads to the simple fact that the ACC will not be able to bind resources.

See this example which I recorded today in a real-world application. The application worked very well until I added an APPLICATION name in the application.xml descriptor and redeployed the EAR...:

Snippet from GF 3.1.1 ACC Console shows that ACC builds the portable JNDI name from the EAR's FILE name ("quipsy-ear-4.34.1-SNAPSHOT"):

SEVERE: Exception in ExplorerApplication.loadUserNameAndRootURL: javax.naming.NamingException: Exception resolving Ejb for 'Remote ejb-ref name=ejb/CallerNameSession,Remote 2.x home =de.quipsy.application.complaint.callerNameSession.CallerNameSessionHome,Remote 2.x component interface=de.quipsy.application.complaint.callerNameSession.CallerNameSessionRemote,ejb-link=SuperSimple.jar#CallerNameSessionBean,lookup=,mappedName=,jndi-name=java:global/quipsy-ear-4.34.1-SNAPSH OT/SuperSimple/CallerNameSessionBean!de.quipsy.application.complaint.callerNameSession.CallerNameSessionHome,refType=Session' . Actual (possibly internal) Remote JNDI name used for lookup is 'java:global/quipsy-ear-4.34.1-SNAPSHOT/SuperSimple/CallerNameSessionBean!de.quipsy.application.complaint.callerNameSession.CallerNameSessionHome' [Root exception is javax.naming.NamingException: Lookup failed for 'java:global/quipsy-ear-4.34.1-SNAPSHOT/SuperSimple/CallerNameSessionBean! de.quipsy.application.complaint.callerNameSession.CallerNameSessionHome' in SerialContext[myEnv=

{java.naming.factory.initial=com.sun.enterprise.naming.impl.SerialInitContextFactory, java.naming.factory.url.pkgs=com.sun.enterprise.naming, java.naming.factory.state=com.sun.corba.ee.impl.presentation.rmi.JNDIStateFactoryImpl}

[Root exception is javax.naming.NameNotFoundException: quipsy-ear-4.34.1-SNAPSHOT]]

Snippet from GF 3.1.1 server.log shows that the EJB container builds a portable name with respect to the APPLICATION name "SuperSimple", IGNORING the EAR's FILE name:

[#|2012-06-22T16:17:03.358+0200|INFO|glassfish3.1.1|javax.enterprise.system.container.ejb.com.sun.ejb.containers|_ThreadID=22;_ThreadName=Thread-2;|Portable JNDI names for EJB CallerNameSessionBean : [java:global/SuperSimple/SuperSimple/CallerNameSessionBean!de.quipsy.application.complaint.callerNameSession.CallerNameSessionHome, java:global/SuperSimple/SuperSimple/CallerNameSessionBean!de.quipsy.application.complaint.callerNameSession.Configuration]|#]

Snippet from application.xml of EAR:

SuperSimple

Snippet from EAR's application-client.xml:

ejb/CallerNameSession Session de.quipsy.application.complaint.callerNameSession.CallerNameSessionHome de.quipsy.application.complaint.callerNameSession.CallerNameSessionRemote SuperSimple.jar#CallerNameSessionBean

This is a blocker as it is not able to run the ACC without modifying the application (either renaming the EAR, or removing the APPLICATION name in the descriptor), which both a normal administrator does not expect to do when simply installing an application.

We would be happy if this could be fixed soon.

Environment

GF3.1.1 Win7 Pro SP1 64 Bit JDK 1.6.0_26

Affected Versions

[3.1.1_dev]

glassfishrobot commented 6 years ago
glassfishrobot commented 12 years ago

@glassfishrobot Commented mkarg said: Please close this issue as INVALID / WORKSFORME.

There is definitively NO bug in ACC, as it was simply my own fault: I started an outdated client JAR by mistake...

Sorry for filing an invalid issue.

glassfishrobot commented 12 years ago

@glassfishrobot Commented @tjquinno said: Happily closing this, per Markus's request.

glassfishrobot commented 7 years ago

@glassfishrobot Commented This issue was imported from java.net JIRA GLASSFISH-18829

glassfishrobot commented 12 years ago

@glassfishrobot Commented Reported by mkarg

glassfishrobot commented 12 years ago

@glassfishrobot Commented Marked as invalid on Friday, June 22nd 2012, 8:00:17 am