Frage

I am getting the below error when message is written to MQ. I have an ear deployed on WAS 8.5 which has one EJB. I have verified that the SyncOutboundMDB is a child of MessageListener.

Does any one have any idea about this problem?

LocalExceptio E   CNTR0020E: EJB threw an unexpected (non-declared) exception during invocation of method "onMessage" on bean "BeanId(sample-ear#sampleejb-1.0-SNAPSHOT.jar#SyncOutboundMDB, null)". Exception data: java.lang.ClassCastException: com.test.sync.mdb.SyncOutboundMDB incompatible with javax.jms.MessageListener
    at com.ibm.ejs.container.MDBWrapper.onMessage(MDBWrapper.java:94)
    at com.ibm.ejs.container.MDBWrapper.onMessage(MDBWrapper.java:131)
    at com.ibm.ejs.jms.listener.ServerSession.run(ServerSession.java:581)
    at com.ibm.ws.util.ThreadPool$Worker.run(ThreadPool.java:1815)

[5/7/14 7:51:08:768 CDT] 00000097 ServerSession W   WMSG0031E: Exception processing JMS Message for MDB SyncOutboundMDB, JMSDestination OutboundQueue : com.ibm.ejs.container.UnknownLocalException: nested exception is: java.lang.ClassCastException: com.test.sync.mdb.SyncOutboundMDB incompatible with javax.jms.MessageListener
    at com.ibm.ejs.container.MDBWrapper.onMessage(MDBWrapper.java:94)
    at com.ibm.ejs.container.MDBWrapper.onMessage(MDBWrapper.java:131)
    at com.ibm.ejs.jms.listener.ServerSession.run(ServerSession.java:581)
    at com.ibm.ws.util.ThreadPool$Worker.run(ThreadPool.java:1815)
Caused by: java.lang.ClassCastException: com.test.sync.mdb.SyncOutboundMDB incompatible with javax.jms.MessageListener
    ... 4 more
War es hilfreich?

Lösung

This error can occur if you use PARENT_LAST and include javax.jms classes in your application. You should remove the javax.jms classes from your application and allow them to be loaded from the application server.

Lizenziert unter: CC-BY-SA mit Zuschreibung
Nicht verbunden mit StackOverflow
scroll top