File APIs for Java Developers
Manipulate DOC, XLS, PPT, PDF and many others from your application.
http://aspose.com/file-tools
The moose likes Websphere and the fly likes JNDI Lookup Exception Big Moose Saloon
  Search | Java FAQ | Recent Topics | Flagged Topics | Hot Topics | Zero Replies
Register / Login


Win a copy of Spring in Action this week in the Spring forum!
JavaRanch » Java Forums » Products » Websphere
Bookmark "JNDI Lookup Exception" Watch "JNDI Lookup Exception" New topic
Author

JNDI Lookup Exception

Sean Norman
Greenhorn

Joined: Jun 11, 2007
Posts: 2
Hi,
I am trying to perform a JNDI lookup in order to obtain a reference to a J2C connection factory & keep getting the following exception:

Caught exception:Exception occurred while the JNDI NamingManager was processing a javax.naming.Reference object.

What I don't understand is that I'm able to obtain a reference to my activation spec & Destination objects without any issue. I'm calling into WebSphere 6.1 via an external app.

Any ideas as to why this is occuring?

Lookup code:


Main code:


Output:
Object returned: class com.stc.jms.client.STCQueue
Object returned: class com.ibm.ejs.j2c.ActivationSpecBindingInfo
Caught exception:Exception occurred while the JNDI NamingManager was processing a javax.naming.Reference object.


============================================================================
Name Space Dump
Provider URL: corbaloc:iiop:localhost:2810
Context factory: com.ibm.websphere.naming.WsnInitialContextFactory
Requested root context: cell
Starting context: (top)=LocalNode02Cell
Formatting rules: jndi
Time of dump: Mon Jun 11 09:57:46 EDT 2007
============================================================================

============================================================================
Beginning of Name Space Dump
============================================================================
1 (top)
2 (top)/nodes javax.naming.Context
3 (top)/nodes/LocalNode02 javax.naming.Context
4 (top)/nodes/LocalNode02/domain javax.naming.Context
4 Linked to context: LocalNode02Cell
5 (top)/nodes/LocalNode02/persistent javax.naming.Context
6 (top)/nodes/LocalNode02/servers javax.naming.Context
7 (top)/nodes/LocalNode02/servers/server1 javax.naming.Context
8 (top)/nodes/LocalNode02/servers/server1/jms javax.naming.Context
9 (top)/nodes/LocalNode02/servers/server1/jms/MyActivationSpecRef
9 com.ibm.ejs.j2c.ActivationSpecBindingInfo
10 (top)/nodes/LocalNode02/servers/server1/jms/MyConnectionFactoryRef
10 javax.jms.QueueConnectionFactory
11 (top)/nodes/LocalNode02/servers/server1/jms/MyDestinationRef
11 com.stc.jms.client.STCQueue

...
...

Cheers!
Sean.
Sean Norman
Greenhorn

Joined: Jun 11, 2007
Posts: 2
After examining the stack trace, here is the root of the issue:

com.ibm.websphere.naming.CannotInstantiateObjectException: Exception occurred while the JNDI NamingManager was processing a javax.naming.Reference object. [Root exception is java.lang.NoClassDefFoundError: Invalid Implementation Key, com.ibm.ws.transaction.NonRecovWSTxManager]
at com.ibm.ws.naming.util.Helpers.processSerializedObjectForLookupExt(CNContextImpl.java:1947)
...
...
...

Looks like I'm missing "com.ibm.ws.transaction.NonRecovWSTxManager"
 
I agree. Here's the link: http://aspose.com/file-tools
 
subject: JNDI Lookup Exception