JNDI Lookup Fails on Some Glassfish Application Server Instances When Restarted (Doc ID 1345729.1)

Last updated on NOVEMBER 05, 2016

Applies to:

Oracle GlassFish Server - Version: 2.1.1 and later   [Release: 2.1 and later ]
Information in this document applies to any platform.

Symptoms

JNDI resource look up fails with some exceptions when the look up is done after the instance is restarted. A partial exception thrown in the server.log looks like this :
[#|2011-07-13T02:08:01.395-0700|WARNING|sun-appserver2.1|javax.enterprise.system.stream.err|_ThreadID=19;_ThreadName=httpSSLWorkerThread-38080-1;_RequestID=9e8be5ba-03eb-41c7-a547-d4c6bf9fd7f3;|javax.naming.NameNotFoundException
at com.sun.enterprise.naming.TransientContext.resolveContext(TransientContext.java:268)
at com.sun.enterprise.naming.TransientContext.lookup(TransientContext.java:191)
at com.sun.enterprise.naming.TransientContext.lookup(TransientContext.java:192)
at com.sun.enterprise.naming.SerialContextProviderImpl.lookup(SerialContextProviderImpl.java:74)
at com.sun.enterprise.naming.LocalSerialContextProviderImpl.lookup(LocalSerialContextProviderImpl.java:111)
at com.sun.enterprise.naming.SerialContext.lookup(SerialContext.java:409)
at javax.naming.InitialContext.lookup(InitialContext.java:392)

This particular JNDI resource is targeted to multiple instances, but one of the instances can look up whereas the other instances are not able to. By enabling FINE logging on these instances for the "Resource Adapter" and "Connector" modules, the instance server.log indicates the resource is not enabled (as shown below)
[#|2011-07-12T18:00:27.630+0900|FINE|sun-appserver2.1|javax.enterprise.resource.resourceadapter|_ThreadID=18_ThreadName=httpSSLWorkerThread-11212-0;ClassName=com.sun.enterprise.connectors.util.ResourcesUtil;MethodName=isEnabled;_RequestID=c42c30b2-a2fa-49af-a15b-c7463da2b016;|ResourcesUtil :: isEnabled|#]

[#|2011-07-12T18:00:27.635+0900|FINE|sun-appserver2.1|javax.enterprise.resource.resourceadapter|_ThreadID=18_ThreadName=httpSSLWorkerThread-11212-0;ClassName=com.sun.enterprise.connectors.util.ResourcesUtil;MethodName=isResourceReferenceEnabled;_RequestID=c42c30b2-a2fa-49afa15b-c7463da2b016;|ResourcesUtil :: isResourceReferenceEnabled ref enabled ?false|#]


Cause

Sign In with your My Oracle Support account

Don't have a My Oracle Support account? Click to get started

My Oracle Support provides customers with access to over a
Million Knowledge Articles and hundreds of Community platforms