Dear All,
Received error:
Caused by: java.lang.ClassCastException: com.webMethods.jms.impl.WmConnectionFactoryImpl incompatible with javax.jms.TopicConnectionFactory
Details:
I am using websphere 7 environemnt and trying to connect and subscribe message from web method JMS topic. We have done the following setup.
1).created one new provider in WAS-7 for webmethod broker and updated the following details in provider.
java.naming.factory.initial=com.webMethods.jms.naming.WmJmsNamingCtxFactory
java.naming.provider.url=wmjmsnaming:xxxxxxxxxxxxxxxxxxxxxxxxxxxx
-
Topic connection factory created using above provider.
-
Topic created for request(for publish) and response(subscribe).
-
Following jars are included in the provider class path
jms.jar, wm-brokerclient.jar ,wm-g11nutils.jar,wm-jmsclient.jar ,wm-jmsnaming.jar
I got the below error during the time of web sphere listener starting and trying to listen webmethod broker from WAS7 for subscribe messaging
It seems, the error are common casting in between com.webMethods.jms.impl.WmConnectionFactoryImpl and javax.jms.TopicConnectionFactory class.
Please help me to solve this issue and provide any suggestion at websphere level (any factory type or parameter level setup need to be included in WAS-7)
--------------------------------------------------------Log msg details ---------------------------------------------------
[3/6/14 18:50:03:693 GMT+08:00] 00000017 MDBListenerIm W WMSG0019E: Unable to start MDB Listener : javax.jms.JMSException: Failed to create topic connection
at com.ibm.ejs.jms.JMSCMUtils.mapToJMSException(JMSCMUtils.java:141)
at com.ibm.ejs.jms.JMSTopicConnectionFactoryHandle.createTopicConnection(JMSTopicConnectionFactoryHandle.java:97)
at com.ibm.ejs.jms.listener.MDBListenerImpl.createResources(MDBListenerImpl.java:423)
at com.ibm.ejs.jms.listener.MDBListenerImpl.internalStart(MDBListenerImpl.java:730)
at com.ibm.ejs.jms.listener.MDBListenerImpl.start(MDBListenerImpl.java:653)
at com.ibm.ejs.jms.listener.MDBListenerManagerImpl.start(MDBListenerManagerImpl.java:851)
at com.ibm.ejs.jms.listener.MsgListenerPort.add(MsgListenerPort.java:232)
at com.ibm.ejs.jms.listener.MDBListenerManagerImpl.startApplicationMDBs(MDBListenerManagerImpl.java:1094)
at com.ibm.ejs.jms.listener.MDBListenerManagerImpl.stateChanged(MDBListenerManagerImpl.java:1052)
at com.ibm.ws.runtime.component.MessageListenerImpl.stateChanged(MessageListenerImpl.java:188)
at com.ibm.ws.runtime.component.ApplicationMgrImpl.stateChanged(ApplicationMgrImpl.java:1079)
at com.ibm.ws.runtime.component.DeployedApplicationImpl.fireDeployedObjectEvent(DeployedApplicationImpl.java:1302)
at com.ibm.ws.runtime.component.DeployedApplicationImpl.setState(DeployedApplicationImpl.java:281)
at com.ibm.ws.runtime.component.DeployedApplicationImpl.setState(DeployedApplicationImpl.java:276)
at com.ibm.ws.runtime.component.DeployedApplicationImpl.start(DeployedApplicationImpl.java:954)
at com.ibm.ws.runtime.component.ApplicationMgrImpl.startApplication(ApplicationMgrImpl.java:740)
at com.ibm.ws.runtime.component.ApplicationMgrImpl.start(ApplicationMgrImpl.java:2051)
at com.ibm.ws.runtime.component.CompositionUnitMgrImpl.start(CompositionUnitMgrImpl.java:385)
at com.ibm.ws.runtime.component.CompositionUnitImpl.start(CompositionUnitImpl.java:123)
at com.ibm.ws.runtime.component.CompositionUnitMgrImpl.start(CompositionUnitMgrImpl.java:328)
at com.ibm.ws.runtime.component.CompositionUnitMgrImpl.access$300(CompositionUnitMgrImpl.java:113)
at com.ibm.ws.runtime.component.CompositionUnitMgrImpl$CUInitializer.run(CompositionUnitMgrImpl.java:895)
at com.ibm.wsspi.runtime.component.WsComponentImpl$_AsynchInitializer.run(WsComponentImpl.java:349)
at com.ibm.ws.util.ThreadPool$Worker.run(ThreadPool.java:1604)
---- Begin backtrace for Nested Throwables
javax.resource.spi.ResourceAllocationException: Expected TopicConnectionFactory at com.ibm.ejs.j2c.FreePool.createManagedConnectionWithMCWrapper(FreePool.java:2360)
at com.ibm.ejs.j2c.FreePool.createOrWaitForConnection(FreePool.java:1713)
at com.ibm.ejs.j2c.PoolManager.reserve(PoolManager.java:2496)
at com.ibm.ejs.j2c.ConnectionManager.allocateMCWrapper(ConnectionManager.java:1063)
at com.ibm.ejs.j2c.ConnectionManager.allocateConnection(ConnectionManager.java:700)
at com.ibm.ejs.jms.JMSTopicConnectionFactoryHandle.createTopicConnection(JMSTopicConnectionFactoryHandle.java:91)
at com.ibm.ejs.jms.listener.MDBListenerImpl.createResources(MDBListenerImpl.java:423)
at com.ibm.ejs.jms.listener.MDBListenerImpl.internalStart(MDBListenerImpl.java:730)
at com.ibm.ejs.jms.listener.MDBListenerImpl.start(MDBListenerImpl.java:653)
at com.ibm.ejs.jms.listener.MDBListenerManagerImpl.start(MDBListenerManagerImpl.java:851)
at com.ibm.ejs.jms.listener.MsgListenerPort.add(MsgListenerPort.java:232)
at com.ibm.ejs.jms.listener.MDBListenerManagerImpl.startApplicationMDBs(MDBListenerManagerImpl.java:1094)
at com.ibm.ejs.jms.listener.MDBListenerManagerImpl.stateChanged(MDBListenerManagerImpl.java:1052)
at com.ibm.ws.runtime.component.MessageListenerImpl.stateChanged(MessageListenerImpl.java:188)
at com.ibm.ws.runtime.component.ApplicationMgrImpl.stateChanged(ApplicationMgrImpl.java:1079)
at com.ibm.ws.runtime.component.DeployedApplicationImpl.fireDeployedObjectEvent(DeployedApplicationImpl.java:1302)
at com.ibm.ws.runtime.component.DeployedApplicationImpl.setState(DeployedApplicationImpl.java:281)
at com.ibm.ws.runtime.component.DeployedApplicationImpl.setState(DeployedApplicationImpl.java:276)
at com.ibm.ws.runtime.component.DeployedApplicationImpl.start(DeployedApplicationImpl.java:954)
at com.ibm.ws.runtime.component.ApplicationMgrImpl.startApplication(ApplicationMgrImpl.java:740)
at com.ibm.ws.runtime.component.ApplicationMgrImpl.start(ApplicationMgrImpl.java:2051)
at com.ibm.ws.runtime.component.CompositionUnitMgrImpl.start(CompositionUnitMgrImpl.java:385)
at com.ibm.ws.runtime.component.CompositionUnitImpl.start(CompositionUnitImpl.java:123)
at com.ibm.ws.runtime.component.CompositionUnitMgrImpl.start(CompositionUnitMgrImpl.java:328)
at com.ibm.ws.runtime.component.CompositionUnitMgrImpl.access$300(CompositionUnitMgrImpl.java:113)
at com.ibm.ws.runtime.component.CompositionUnitMgrImpl$CUInitializer.run(CompositionUnitMgrImpl.java:895)
at com.ibm.wsspi.runtime.component.WsComponentImpl$_AsynchInitializer.run(WsComponentImpl.java:349)
at com.ibm.ws.util.ThreadPool$Worker.run(ThreadPool.java:1604)
Caused by: java.lang.ClassCastException: com.webMethods.jms.impl.WmConnectionFactoryImpl incompatible with javax.jms.TopicConnectionFactory
at com.ibm.ejs.jms.JMSManagedTopicConnection.createConnection(JMSManagedTopicConnection.java:159)
at com.ibm.ejs.jms.JMSManagedConnection.(JMSManagedConnection.java:352)
at com.ibm.ejs.jms.JMSManagedTopicConnection.(JMSManagedTopicConnection.java:74)
at com.ibm.ejs.jms.GenericJMSManagedTopicConnectionFactory.createManagedConnection(GenericJMSManagedTopicConnectionFactory.java:91)
at com.ibm.ejs.jms.JMSManagedConnectionFactory.createManagedConnection(JMSManagedConnectionFactory.java:647)
at com.ibm.ejs.j2c.FreePool.createManagedConnectionWithMCWrapper(FreePool.java:2036)
… 27 more
[3/6/14 18:50:03:721 GMT+08:00] 00000017 MDBListenerIm I WMSG0058I: Listener Port DRCREventHandlerListenerSG_RESP will attempt to restart in 60 seconds
I am waiting for your great reply.
Thanks and Regards
Muthu