Intermitent NameNotFoundException for java:global JNDI name during application start #28911
Labels
in:Java EE Platform
release bug
This bug is present in a released version of Open Liberty
team:Zombie Apocalypse
Milestone
Describe the bug
A NameNotFoundException may occur intermittently during application start if the application initialization has multiple threads that may concurrently perform a JNDI lookup of something in the java:global and/or java:app name contexts. The failure appears as follows:
Caused by: javax.naming.NameNotFoundException: javax.naming.NameNotFoundException: java:global/jdbc/DataSourceDef
at com.ibm.ws.jndi.url.contexts.javacolon.internal.JavaURLContext.lookup(JavaURLContext.java:357)
at com.ibm.ws.jndi.url.contexts.javacolon.internal.JavaURLContext.lookup(JavaURLContext.java:372)
at org.apache.aries.jndi.DelegateContext.lookup(DelegateContext.java:149)
at java.naming/javax.naming.InitialContext.lookup(InitialContext.java:409)
at java.naming/javax.naming.InitialContext.doLookup(InitialContext.java:282)
at io.openliberty.data.internal.persistence.service.DelegatingResourceFactory.createResource(DelegatingResourceFactory.java:59)
at com.ibm.wsspi.persistence.internal.DatabaseStoreImpl.createPersistenceServiceUnit(DatabaseStoreImpl.java:286)
Steps to Reproduce
Not easily reproducible. An application must have initialization that runs concurrent threads that perform JNDI lookups in java:global and/or java:app.
Expected behavior
JNDI lookups of java:global and java:app should work consistently every time an application starts.
Diagnostic information:
Additional context
None
The text was updated successfully, but these errors were encountered: