ASG
IBM
Zystems
Cressida
Icon
Netflexity
 
  MQSeries.net
Search  Search       Tech Exchange      Education      Certifications      Library      Info Center      SupportPacs      LinkedIn  Search  Search                                                                   FAQ  FAQ   Usergroups  Usergroups
 
Register  ::  Log in Log in to check your private messages
 
RSS Feed - WebSphere MQ Support RSS Feed - Message Broker Support

MQSeries.net Forum Index » IBM MQ Java / JMS » Getting issue while connecting MQ using JNDI created in WAS

Post new topic  Reply to topic
 Getting issue while connecting MQ using JNDI created in WAS « View previous topic :: View next topic » 
Author Message
rakeshkumargupta83
PostPosted: Thu Sep 29, 2016 11:35 am    Post subject: Getting issue while connecting MQ using JNDI created in WAS Reply with quote

Newbie

Joined: 29 Sep 2016
Posts: 1

Getting below error while creating QueueSession:
java.lang.ClassCastException: com.ibm.ejs.jms.JMSSessionHandle incompatible with com.ibm.mq.jms.MQSession

I am using WAS 7.0 and trying to connect via JNDI(Queue and Queue manager) created in WAS admin console.


factory = (ConnectionFactory)ctx.lookup("jndi/NewMQManager");
System.out.println("Factory has been looked up-"+factory);

queue = (Queue) ctx.lookup("jms/XMLError");//
System.out.println("Queue Looked Up has been done-"+queue);

qCon= factory.createConnection();
System.out.println("Queue Factory Connection -"+qCon);

QueueSession queueSession =(QueueSession) qCon.createSession(false, Session.AUTO_ACKNOWLEDGE);
Back to top
View user's profile Send private message
Display posts from previous:   
Post new topic  Reply to topic Page 1 of 1

MQSeries.net Forum Index » IBM MQ Java / JMS » Getting issue while connecting MQ using JNDI created in WAS
Jump to:  



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
Protected by Anti-Spam ACP
 
 


Theme by Dustin Baccetti
Powered by phpBB © 2001, 2002 phpBB Group

Copyright © MQSeries.net. All rights reserved.