Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations IamaSherpa on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

Hi I am trying to run the MQSeri

Status
Not open for further replies.

Vallabh

Technical User
Feb 24, 2006
3
US
Hi

I am trying to run the MQSeries JMS application on WebSphere 4.0. I have created the administered Topic Connection Factory TCFSERVER with CTX_FACTORY = "com.ibm.ejs.ns.jndi.CNInitialContextFactory" and INIT_URL = "iiop://10.30.0.128:900/jms". When I run it as simple java application (with main method) , it runs fine. But when I try to run it as a part of servlet, I get exception while trying to lookup the TCFSERVER (the code is TopicConnectionFactory tcf = (TopicConnectionFactory)ctx.lookup( "TCFSERVER" ); )

The exception is:

A Reference object looked up from the context "domainRoots/UnspecifiedDomainName/legacyRoot/jms" with the name "TCFSERVER" was sent to the JNDI Naming Manager and was returned unprocessed.
java.lang.ClassCastException: javax.naming.Reference

That is it returns the object of type javax.naming.Reference when ideally it should have returned the object of type MQTopicConnectionFactory.


What may be the reason for such error?


Thanks and Regards

Vallabh
 
Did you set the TopicConnectionFactory's name as TCFSERVER or its JNDI Name to TCFSERVER? They are two different things. Go back and double check the JNDI name.
 
Copy the following jar files tp $WAS_HOME/lib/ext directory and bounce the server once.
com.ibm.mqjms.jar
com.ibm.mq.jar
jms.jar
jndi.jar
jta.jar
ldap.jar
providerutil.jar
collector.jar
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top