Posted: Fri Aug 24, 2007 7:18 am Post subject: Getting java.lang.ClassCastException: javax.naming.Reference
Centurion
Joined: 26 Oct 2005 Posts: 149 Location: Hartford,CT
I am trying to create a userdefined node in Java which uses JMS to put a message. I know I can use the JMSNode . This is just to test a user defined node.
I create the Java Project , Plugin Node Project and Message flow project and able to successfully deploy the flow with the node to the broker.
I created a par file and added all the jar files required to the lib directory.
The code gets the QueueConnectionFactory by ldap lookup. It works fine when I use the same code in a Java client application .
But when I use it in the User defined node , the ldap lookup returns the object as javax.naming.Reference and giving me a classcastexception.
Any thoughts ? I added all the jar files in MQjava/lib to the par file lib directory.
Here is the code i used to get the type of object .
You cannot post new topics in this forum You cannot reply to topics in this forum You cannot edit your posts in this forum You cannot delete your posts in this forum You cannot vote in polls in this forum