dcsimg
Getting classCastException while looking up TopicConnectionFactory , using simple java client
1 posts in topic
Flat View  Flat View
TOPIC ACTIONS:
 

Posted By:   Sanjay_Sharma
Posted On:   Thursday, January 15, 2004 06:39 AM

If i am looking up the TCF (Topic Connection factory) from session bean the it is returning me the the object of JMSTopicConnectionFactoryHandler, later to which i am typecasting into TopicConnectionFactory and sending messages to MDB [jndi name is jms/TCF] But if the same thing i am doing in a simple java client using JNDI name cell/nodes/localhost/servers/server1/jms/TCF then the lookup method is return an object of javax.naming.reference, and when i am typecasting it , it is throwing exception. i am using IBM websphere 5.0 and MQJD[builtin jms provider] the same problem is also coming while using the MQ series 5.3    More>>

If i am looking up the TCF (Topic Connection factory)
from session bean the it is returning me the the object of

JMSTopicConnectionFactoryHandler, later to which i am typecasting into TopicConnectionFactory and sending messages to MDB [jndi name is jms/TCF]

But if the same thing i am doing in a simple java client
using JNDI name

cell/nodes/localhost/servers/server1/jms/TCF

then the lookup method is return an object of
javax.naming.reference,
and when i am typecasting it , it is throwing exception.

i am using IBM websphere 5.0 and MQJD[builtin jms provider]
the same problem is also coming while using the
MQ series 5.3

   <<Less

Re: Getting classCastException while looking up TopicConnectionFactory , using simple java client

Posted By:   Andreas_Mueller  
Posted On:   Thursday, January 15, 2004 07:45 AM

If a reference is returned from a JNDI lookup this points usually to a missing class in your class path (e.g. the impl. of the connection factory). So check your client's class path.
About | Sitemap | Contact