Date Created: Tue 08-Sep-2009

Related Document Categories:

Get my WebSphere Application Server course here >> http://www.themiddlewareshop.com/products/



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

Get my WebSphere Application Server course here >> http://www.themiddlewareshop.com/products/


Steve Robinson - IBM Champion 2013

About Me

Steve Robinson has been working in IT for over 20 years and has provided solutions for many leading brands around the world. Steve specialises in JEE, DevOps and Thought Leadership.

In January 2013, I was awarded the prestigous 'IBM Champion' accolade.


  • Linked In
  • Twitter
  • About Me
  • Contact Me

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

Courses

  • WebSphere Courses

Articles

WebSphere Categories

Other Categories