title: MessageListener Class cast exception in WAS 8.5
body: <p>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.</p>
  
  <p>Does any one have any idea about this problem?</p>
  
  <pre><code>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
  </code></pre>