NameNotFoundException thrown in JBoss EAP during JNDI lookup after server restart

Solution Verified - Updated -

Issue

  • The jndi name of one datasource didn't register on jndi tree but we can find it in JMX that the connection pool was created.
  • NameNotFoundException thrown during JNDI lookup of datasource after restart, even though the datasource MBean shows the correct JNDI binding address, the exception is:
javax.naming.NameNotFoundException: MyDS not bound
        at org.jnp.server.NamingServer.getBinding(NamingServer.java:581)
        at org.jnp.server.NamingServer.getBinding(NamingServer.java:589)
        at org.jnp.server.NamingServer.getObject(NamingServer.java:595)
        at org.jnp.server.NamingServer.lookup(NamingServer.java:342)
        at org.jnp.server.NamingServer.lookup(NamingServer.java:316)
...

Environment

  • JBoss Enterprise Application Platform (EAP)
    • 5.x
    • 4.x

Subscriber exclusive content

A Red Hat subscription provides unlimited access to our knowledgebase of over 48,000 articles and solutions.

Current Customers and Partners

Log in for full access

Log In
Close

Welcome! Check out the Getting Started with Red Hat page for quick tours and guides for common tasks.