• Post Reply
  • Bookmark Topic Watch Topic
  • New Topic

Problem with MDB

 
Krishna Maddala
Greenhorn
Posts: 5
  • 0
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Our application is running on Websphere 7.
Sometimes the MDBs are not picking the messages. The System.out log shows the below,

[11/28/11 19:40:20:100 EST] 00000d69 LocalExceptio E CNTR0020E: EJB threw an unexpected (non-declared) exception during invocation of method "onMessage" on bean "BeanId(CC#JPMCMDB.jar#CBDCIF2MsgDriven, null)". Exception data: java.lang.reflect.InvocationTargetException
at sun.reflect.GeneratedMethodAccessor47.invoke(Unknown Source)
at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:37)
at java.lang.reflect.Method.invoke(Method.java:611)
at com.ibm.ejs.jms.listener.ServerSessionDispatcher.dispatch(ServerSessionDispatcher.java:44)
at com.ibm.ejs.container.MDBWrapper.onMessage(MDBWrapper.java:100)
at com.ibm.ejs.container.MDBWrapper.onMessage(MDBWrapper.java:136)
at com.ibm.ejs.jms.listener.ServerSession.run(ServerSession.java:567)
at com.ibm.ws.util.ThreadPool$Worker.run(ThreadPool.java:1604)
Caused by: java.lang.RuntimeException: JMSCC0110: An exception '
Message : javax.jms.JMSException: MQJMS2002: failed to get message from MQ queue.
Class : class javax.jms.JMSException
Stack : java.lang.Throwable.<init>(Throwable.java:67)
: javax.jms.JMSException.<init>(JMSException.java:35)
: com.ibm.msg.client.wmq.v6.jms.internal.ConfigEnvironment.newException(ConfigEnvironment.java:369)
: com.ibm.msg.client.wmq.v6.jms.internal.MQSession.consume(MQSession.java:2108)
: com.ibm.msg.client.wmq.v6.jms.internal.MQSession.loadMessageReference(MQSession.java:4398)
: com.ibm.msg.client.jms.internal.JmsSessionImpl.consume(JmsSessionImpl.java:2847)
: com.ibm.msg.client.jms.internal.JmsSessionImpl.run(JmsSessionImpl.java:2549)
: com.ibm.mq.jms.MQSession.run(MQSession.java:860)
: com.ibm.ejs.jms.JMSSessionHandle.run(JMSSessionHandle.java:1045)
: com.ibm.ejs.jms.listener.ServerSession.connectionConsumerOnMessage(ServerSession.java:1076)
: com.ibm.ejs.jms.listener.ServerSession.onMessage(ServerSession.java:746)
: com.ibm.ejs.jms.listener.ServerSession.dispatch(ServerSession.java:712)
: sun.reflect.GeneratedMethodAccessor47.invoke(null:-1)
: sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:37)
: java.lang.reflect.Method.invoke(Method.java:611)
: com.ibm.ejs.jms.listener.ServerSessionDispatcher.dispatch(ServerSessionDispatcher.java:44)
: com.ibm.ejs.container.MDBWrapper.onMessage(MDBWrapper.java:100)
: com.ibm.ejs.container.MDBWrapper.onMessage(MDBWrapper.java:136)
: com.ibm.ejs.jms.listener.ServerSession.run(ServerSession.java:567)
: com.ibm.ws.util.ThreadPool$Worker.run(ThreadPool.java:1604)
' was caught while processing a message for delivery to a message driven bean.
at java.lang.Throwable.<init>(Throwable.java:67)
at sun.reflect.GeneratedConstructorAccessor961.newInstance(Unknown Source)
at sun.reflect.DelegatingConstructorAccessorImpl.newInstance(DelegatingConstructorAccessorImpl.java:39)
at java.lang.reflect.Constructor.newInstance(Constructor.java:527)
at com.ibm.msg.client.commonservices.j2se.NLSServices.createException(NLSServices.java:411)
at com.ibm.msg.client.commonservices.nls.NLSServices.createException(NLSServices.java:390)
at com.ibm.msg.client.jms.internal.JmsErrorUtils.createException(JmsErrorUtils.java:104)
at com.ibm.msg.client.jms.internal.JmsSessionImpl.run(JmsSessionImpl.java:2687)
at com.ibm.mq.jms.MQSession.run(MQSession.java:860)
at com.ibm.ejs.jms.JMSSessionHandle.run(JMSSessionHandle.java:1045)
at com.ibm.ejs.jms.listener.ServerSession.connectionConsumerOnMessage(ServerSession.java:1076)
at com.ibm.ejs.jms.listener.ServerSession.onMessage(ServerSession.java:746)
at com.ibm.ejs.jms.listener.ServerSession.dispatch(ServerSession.java:712)
... 8 more
Caused by: javax.jms.JMSException: MQJMS2002: failed to get message from MQ queue.
at java.lang.Throwable.<init>(Throwable.java:67)
at javax.jms.JMSException.<init>(JMSException.java:35)
at com.ibm.msg.client.wmq.v6.jms.internal.ConfigEnvironment.newException(ConfigEnvironment.java:369)
at com.ibm.msg.client.wmq.v6.jms.internal.MQSession.consume(MQSession.java:2108)
at com.ibm.msg.client.wmq.v6.jms.internal.MQSession.loadMessageReference(MQSession.java:4398)
at com.ibm.msg.client.jms.internal.JmsSessionImpl.consume(JmsSessionImpl.java:2847)
at com.ibm.msg.client.jms.internal.JmsSessionImpl.run(JmsSessionImpl.java:2549)
... 13 more
---- Begin backtrace for Nested Throwables
com.ibm.mq.MQException: MQJE001: Completion Code '2', Reason '2009'.
at com.ibm.msg.client.wmq.v6.jms.internal.MQSession.consume(MQSession.java:2069)
at com.ibm.msg.client.wmq.v6.jms.internal.MQSession.loadMessageReference(MQSession.java:4398)
at com.ibm.msg.client.jms.internal.JmsSessionImpl.consume(JmsSessionImpl.java:2847)
at com.ibm.msg.client.jms.internal.JmsSessionImpl.run(JmsSessionImpl.java:2549)
at com.ibm.mq.jms.MQSession.run(MQSession.java:860)
at com.ibm.ejs.jms.JMSSessionHandle.run(JMSSessionHandle.java:1045)
at com.ibm.ejs.jms.listener.ServerSession.connectionConsumerOnMessage(ServerSession.java:1076)
at com.ibm.ejs.jms.listener.ServerSession.onMessage(ServerSession.java:746)
at com.ibm.ejs.jms.listener.ServerSession.dispatch(ServerSession.java:712)
at sun.reflect.GeneratedMethodAccessor47.invoke(Unknown Source)
at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:37)
at java.lang.reflect.Method.invoke(Method.java:611)
at com.ibm.ejs.jms.listener.ServerSessionDispatcher.dispatch(ServerSessionDispatcher.java:44)
at com.ibm.ejs.container.MDBWrapper.onMessage(MDBWrapper.java:100)
at com.ibm.ejs.container.MDBWrapper.onMessage(MDBWrapper.java:136)
at com.ibm.ejs.jms.listener.ServerSession.run(ServerSession.java:567)
at com.ibm.ws.util.ThreadPool$Worker.run(ThreadPool.java:1604)

[11/28/11 19:40:20:133 EST] 00000d69 LocalTranCoor E WLTC0017E: Resources rolled back due to setRollbackOnly() being called.
[11/28/11 19:40:20:135 EST] 0000001a SibMessage W [:] CWSJY0003W: JMSCC0110: An exception '
Message : javax.jms.JMSException: MQJMS2002: failed to get message from MQ queue.
Class : class javax.jms.JMSException
Stack : java.lang.Throwable.<init>(Throwable.java:67)
: javax.jms.JMSException.<init>(JMSException.java:35)
: com.ibm.msg.client.wmq.v6.jms.internal.ConfigEnvironment.newException(ConfigEnvironment.java:369)
: com.ibm.msg.client.wmq.v6.jms.internal.MQSession.consume(MQSession.java:2108)
: com.ibm.msg.client.wmq.v6.jms.internal.MQSession.loadMessageReference(MQSession.java:4398)
: com.ibm.msg.client.jms.internal.JmsSessionImpl.consume(JmsSessionImpl.java:2847)
: com.ibm.msg.client.jms.internal.JmsSessionImpl.run(JmsSessionImpl.java:2549)
: com.ibm.mq.jms.MQSession.run(MQSession.java:860)
: com.ibm.ejs.jms.JMSSessionHandle.run(JMSSessionHandle.java:1045)
: com.ibm.ejs.jms.listener.ServerSession.connectionConsumerOnMessage(ServerSession.java:1076)
: com.ibm.ejs.jms.listener.ServerSession.onMessage(ServerSession.java:746)
: com.ibm.ejs.jms.listener.ServerSession.dispatch(ServerSession.java:712)
: sun.reflect.GeneratedMethodAccessor47.invoke(null:-1)
: sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:37)
: java.lang.reflect.Method.invoke(Method.java:611)
: com.ibm.ejs.jms.listener.ServerSessionDispatcher.dispatch(ServerSessionDispatcher.java:44)
: com.ibm.ejs.container.MDBWrapper.onMessage(MDBWrapper.java:100)
: com.ibm.ejs.container.MDBWrapper.onMessage(MDBWrapper.java:136)
: com.ibm.ejs.jms.listener.ServerSession.run(ServerSession.java:567)
: com.ibm.ws.util.ThreadPool$Worker.run(ThreadPool.java:1604)
' was caught while processing a message for delivery to a message driven bean.

Can anyone explain what the problem could be and suggest a solution? Thanks in advance..

Please note that the MDB is working fine after restarting the server.
 
Krishna Maddala
Greenhorn
Posts: 5
  • 0
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Can someone explain what the problem is and how to resolve it?
 
Valery Lezhebokov
Ranch Hand
Posts: 39
  • 0
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
http://www-01.ibm.com/support/docview.wss?uid=swg21229508
 
Krishna Maddala
Greenhorn
Posts: 5
  • 0
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Thanks for the reply Lezhebokov.. I went through the link that you provided. But the connection and session pool settings of our queue connection factories are already similar to the ones mentioned in the link. But we are still facing the problem..
Please advise..
 
Andrew Moko
Ranch Hand
Posts: 55
  • 0
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
It might be a little late but, seems like an exception is being thrown at MDBWrapper.java line 100. Remember if an exception is thrown or the code in the onMessage takes too long, the message is going to be redelivered back to the queue.
 
Don't get me started about those stupid light bulbs.
  • Post Reply
  • Bookmark Topic Watch Topic
  • New Topic