Skip to Main Content

Java EE (Java Enterprise Edition) General Discussion

Announcement

For appeals, questions and feedback about Oracle Forums, please email oracle-forums-moderators_us@oracle.com. Technical questions should be asked in the appropriate category. Thank you!

JMS JNDI lookup ClassCastException with WSAD 5

843830Nov 21 2002 — edited Nov 21 2002
Hi everyone,

I am using WSAD version 5 (early access) to write two applications: one that sends JMS messages and the other one to read those JMS messages.
I have already created the Queue Connection Factory (and a Queue) with the Administrative Client and started the Server. With WSAD JNDI explorer, I can find those objects. When I do a JNDI lookup for QueueConnectionFactory with the following instruction:

aQConnFactory = (QueueConnectionFactory) ic.lookup("jms/QCF");

I always get the following exception message:

java.lang.ClassCastException: javax.naming.Reference

I noticed that the object returned from the lookup is:
java.naming.Reference (instead of a QueueConnectionFactory)

Am I missing something? Are there any Jar files that I need to add to the class path?

Thanks for your help.
Comments
Locked Post
New comments cannot be posted to this locked post.
Post Details
Locked on Dec 19 2002
Added on Nov 21 2002
2 comments
168 views