Skip to main content

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index] [List Home]
Re: [glassfish-dev] What are the possible causes of remote JNDI lookup failures like https://github.com/eclipse-ee4j/glassfish/issues/25190?


On 10/23/24 9:12 AM, Steve Millidge (Payara) wrote:
Not sure if a cnfe could cause that while traversing the JNDI reference.

There is something slightly different in the JNDI names 

#com.sun.ts.tests.common.vehicle.stateless3.Stateless3VehicleIF

Between Failed lookup above and the deployment name below

com_sun_ts_tests_common_vehicle_Stateless3VehicleBean#com.sun.ts.tests.common.vehicle.stateless3.Stateless3VehicleIF
It's missing the bean prefix. I'm not sure if this is normal from memory. At this point I would be debugging the JNDI code on the server to list the jndi references  :-(

I can see that the ejb-link value specified in the application-client deployment descriptor is the same as identified by (server side) deployment code (https://github.com/eclipse-ee4j/glassfish/blob/0deee935d1f39b3dfcdcf62e758f6f84a1a14838/appserver/deployment/dol/src/main/java/com/sun/enterprise/deployment/EjbReferenceDescriptor.java#L138) for the session bean.  I'll look for the JNDI code on the server and set a breakpoint in there and see if I can view the jndi references... 



There is an asadmin command to walk the global jndi tree https://glassfish.org/docs/5.1.0/reference-manual/list-jndi-entries.html

From: Scott Marlow <smarlow@xxxxxxxxxx>
Sent: Wednesday, October 23, 2024 1:43:37 PM
To: Steve Millidge (Payara) <steve.millidge@xxxxxxxxxxx>; glassfish developer discussions <glassfish-dev@xxxxxxxxxxx>
Subject: Re: [glassfish-dev] What are the possible causes of remote JNDI lookup failures like https://github.com/eclipse-ee4j/glassfish/issues/25190?
 


On 10/23/24 6:46 AM, Steve Millidge (Payara) wrote:
Strangely the error originates from an inbound corba call which would suggest a remote EJB invocation. Is the EJB deploying successfully. You should see its name output during deployment on the server side.

The app client container deployment is trying to call a remote (deployed to EE server) EJB bean.  It looks like the EJB did deploy as seen in the just copied server.log contents in comment https://github.com/eclipse-ee4j/glassfish/issues/25190#issuecomment-2431958637 which does seem to show the ejb was deployed as per:

Portable JNDI names for EJB Stateless3VehicleBean: [java:global/jpa_core_EntityGraph_vehicles/jpa_core_EntityGraph_stateless3_vehicle_ejb/Stateless3VehicleBean!com.sun.ts.tests.common.vehicle.stateless3.Stateless3VehicleIF, java:global/jpa_core_Entity
Graph_vehicles/jpa_core_EntityGraph_stateless3_vehicle_ejb/Stateless3VehicleBean]]]

If there was a ClassNotFoundException (e.g. CNFE due to a missing class in the application) would that typically show up in the server.log during the JNDI lookup?  Or do we need to enable GlassFish DEBUG/TRACE logging to see CNFEs?

Scott



From: glassfish-dev <glassfish-dev-bounces@xxxxxxxxxxx> on behalf of Scott Marlow via glassfish-dev <glassfish-dev@xxxxxxxxxxx>
Sent: Tuesday, October 22, 2024 5:26:25 PM
To: glassfish developer discussions <glassfish-dev@xxxxxxxxxxx>
Cc: Scott Marlow <smarlow@xxxxxxxxxx>
Subject: [glassfish-dev] What are the possible causes of remote JNDI lookup failures like https://github.com/eclipse-ee4j/glassfish/issues/25190?
 

Hi,

Could the jndi lookup failure in https://github.com/eclipse-ee4j/glassfish/issues/25190 be caused by deployment descriptors not being correct?  Could it also be caused by classnotfound exceptions?  Note that the included JNDI lookup exception doesn't include the cause (the cause should at least be logged I think if there is an exception caught but ignored). 

From the exception call stack included:

"

Suppressed: javax.naming.NamingException: Exception resolving Ejb for 'Remote ejb-ref name=ejb/Stateless3VehicleBean,Remote 3.x interface =com.sun.ts.tests.common.vehicle.stateless3.Stateless3VehicleIF,ejb-link=Stateless3VehicleBean,lookup=,mappedName=,jndi-name=,refType=Session' . Actual (possibly internal) Remote JNDI name used for lookup is '#com.sun.ts.tests.common.vehicle.stateless3.Stateless3VehicleIF' [Root exception is javax.naming.NamingException: Lookup failed for #com.sun.ts.tests.common.vehicle.stateless3.Stateless3VehicleIF 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: #com.sun.ts.tests.common.vehicle.stateless3.Stateless3VehicleIF not found]]

"

Other thoughts on the cause?

Scott


Back to the top