Date Created: Tue 08-Sep-2009

Related Document Categories:



    org omg CosNaming NamingContextPackage NotFound javax naming NameNotFoundException

    Exception: org.omg.CosNaming.NamingContextPackage.NotFound
    Cause: javax.naming.NameNotFoundException

    Below is an example stack trace as found in an Application Severs SystemOut.log file where an application (EAR) has been installed with in correct JNDI mappings.

    Caused by: javax.naming.NameNotFoundException: Context: myCell001/clusters/cluster001, name: MyConnectionFactory_ENV01: First component in name

    MyConnectionFactory_ENV01 not found. [Root exception is org.omg.CosNaming.NamingContextPackage.NotFound: IDL:omg.org/CosNaming/NamingContext/NotFound:1.0]

    at com.ibm.ws.naming.jndicos.CNContextImpl.processNotFoundException(CNContextImpl.java:4754)

    at com.ibm.ws.naming.jndicos.CNContextImpl.doLookup(CNContextImpl.java:1911)

    at com.ibm.ws.naming.jndicos.CNContextImpl.doLookup(CNContextImpl.java:1866)

    at com.ibm.ws.naming.jndicos.CNContextImpl.lookupExt(CNContextImpl.java:1556)

    at com.ibm.ws.naming.util.IndirectJndiLookupObjectFactory$1.run(IndirectJndiLookupObjectFactory.java:372)

    at com.ibm.ws.security.util.AccessController.doPrivileged(AccessController.java:118)

    at com.ibm.ws.naming.util.IndirectJndiLookupObjectFactory.getObjectInstanceExt(IndirectJndiLookupObjectFactory.java:221)

    at com.ibm.ws.naming.util.IndirectJndiLookupObjectFactory.getObjectInstance(IndirectJndiLookupObjectFactory.java:149)

    at com.ibm.ws.util.ResRefJndiLookupObjectFactory.getObjectInstance(ResRefJndiLookupObjectFactory.java:144)

    at javax.naming.spi.NamingManager.getObjectInstance(NamingManager.java:316)

    at com.ibm.ws.naming.util.Helpers.processSerializedObjectForLookupExt(Helpers.java:896)

    ... 59 more


    Solution:
    The EAR files Resource References or EJB Resource References have binding issues. Usually this means, that direct jndi look-up is being used but the application, or indirect JNDI has been used and the mapping is incorrect, meaning that the application has resources mapped to JNDI that might not exist. Each Resource Reference or EJB Reference definition in the EAR file needs to map to an actual Resource Reference ie A Connection Factory, Queue or MQConnnectionFactory and use the correct JNDI name of that Resource

Middleware Mentor - Steven Charles Robinson

About Me

Steve Robinson has been working in IT for over 15 years and has provided solutions for many large-enterprise corporate companies across the world. Steve specialises in Java and Middleware consulting. Steve comes from both an administration and development background.

Before moving to JEE, Steve was an accomplished developer and consultant for both IBM Lotus Notes and Microsoft .NET Technologies.

Follow Steve as @stevencrobinson on twitter.

Read my books?

IBM WebSphere Application Server 8.0 Administration Guide

IBM WebSphere Application Server 8.0 Administration Guide

WebSphere Application Server 7.0 Administration Guide

WebSphere Application Server 7.0 Administration Guide

WebSphere Categories

Oracle WebLogic Categories

JBoss Categories

Other Categories