ClassCastException: MQSession to TopicSession

Using Hermes with WebSphereMQ aka MQSeries

ClassCastException: MQSession to TopicSession

Postby stash1071 » Fri Oct 16, 2009 2:27 am

Hi, I recently followed the tutorial for setting up a Websphere MQ provider. I can discover the queues just fine, but am running into the following exception when trying to send a file as a text message:
Code: Select all
java.lang.ClassCastException: com.ibm.mq.jms.MQSession cannot be cast to javax.jms.TopicSession
   at hermes.impl.jms.AbstractSessionManager.createTopicProducer(AbstractSessionManager.java:518)
   at hermes.impl.jms.ThreadLocalSessionManager.getProducer(ThreadLocalSessionManager.java:550)
   at hermes.impl.DefaultHermesImpl.send(DefaultHermesImpl.java:607)
   at hermes.browser.tasks.SendMessageTask.doUpload(SendMessageTask.java:115)
   at hermes.browser.tasks.SendMessageTask.invoke(SendMessageTask.java:186)
   at hermes.browser.tasks.TaskSupport.run(TaskSupport.java:175)
   at hermes.browser.tasks.ThreadPool.run(ThreadPool.java:170)
   at java.lang.Thread.run(Thread.java:619)

Here's my classpath group for my WMQ provider:
Code: Select all
    <classpathGroup id="WMQ">
            <library jar="/home/prystasj/HermesJMS/lib/com.ibm.mq.pcf-6.0.2.1.jar" noFactories="true"/>
            <library factories="com.ibm.disthub2.impl.jms.TopicConnectionFactoryImpl" jar="/home/prystasj/HermesJMS/lib/dhbcore-1.4.2.jar" noFactories="false"/>
            <library factories="com.ibm.mq.jms.Cleanup,com.ibm.mq.jms.MQConnectionFactory,com.ibm.mq.jms.MQQueueConnectionFactory,com.ibm.mq.jms.MQRRSConnectionFactory,com.ibm.mq.jms.MQRRSQueueConnectionFactory,com.ibm.mq.jms.MQRRSTopicConnectionFactory,com.ibm.mq.jms.MQTopicConnectionFactory,com.ibm.mq.jms.MQXAConnectionFactory,com.ibm.mq.jms.MQXAQueueConnectionFactory,com.ibm.mq.jms.MQXATopicConnectionFactory" jar="/home/prystasj/HermesJMS/lib/com.ibm.mqjms-6.0.2.1.jar" noFactories="false"/>
            <library jar="/home/prystasj/HermesJMS/lib/com.ibm.mq-6.0.2.1.jar" noFactories="true"/>
            <library jar="/home/prystasj/HermesJMS/lib/connector-1.3.0.jar" noFactories="true"/>
            <library factories="com.ibm.mq.connector.outbound.ConnectionFactoryImpl,com.ibm.mq.connector.outbound.QueueConnectionFactoryImpl,com.ibm.mq.connector.outbound.TopicConnectionFactoryImpl" jar="/home/prystasj/HermesJMS/lib/mqconnector-6.0.2.1.jar" noFactories="false"/>
    </classpathGroup>
Any thoughts to what I could be missing? Thanks in advance.
stash1071
 
Posts: 3
Joined: Sat Sep 26, 2009 4:34 pm

Re: ClassCastException: MQSession to TopicSession

Postby stash1071 » Fri Oct 16, 2009 2:31 am

I noticed I was missing commonservices.jar, and edited the JAR list to include only:
    com.ibm.mq
    com.ibm.mqjms
    com.ibm.mq.pcf
    commonservices
Same result, hopefully I can find something else out.
stash1071
 
Posts: 3
Joined: Sat Sep 26, 2009 4:34 pm

Re: ClassCastException: MQSession to TopicSession

Postby Colin » Tue Oct 27, 2009 4:38 pm

Hi,

You are trying to send a file to a JMS topic and the version of MQ you have does not support it.

Can you share your hermes-config.xml?

Regards,

Colin.
Colin
Site Admin
 
Posts: 835
Joined: Sun Sep 19, 2004 4:49 pm
Location: London, UK

Re: ClassCastException: MQSession to TopicSession

Postby stash1071 » Wed Nov 18, 2009 10:45 pm

I don't have access to my hermes config at the moment. But I reinstalled and started over and things seem to be working. I'll try and reverify things when I can.
Thanks
stash1071
 
Posts: 3
Joined: Sat Sep 26, 2009 4:34 pm


Return to IBM WebSphereMQ

Who is online

Users browsing this forum: No registered users and 1 guest