-
1. Re: DLQHandler and Websphere MQ (MQSeries)
dabramov Jul 31, 2003 2:32 PM (in response to dabramov)Out of desperation I tried JBoss 3.2.2 RC2, which claims some fixes related to handling properties for the DLQHandler. Thing went from bad to worse. As soon as the message delivery fails once (i.e. the first time the DLQHandler is needed) it dies when it tries to figure out how many times the message is delievered:
I get:
2003-07-31 15:30:26,379 ERROR [org.jboss.ejb.plugins.jms.JMSContainerInvoker] Exception in JMSCI message listener
java.lang.NumberFormatException
at com.ibm.jms.JMSMessage.toInt(JMSMessage.java:5764)
at com.ibm.jms.JMSMessage.getIntProperty(JMSMessage.java:3888)
at org.jboss.ejb.plugins.jms.DLQHandler.handleRedeliveredMessage(DLQHandler.java:206)
at org.jboss.ejb.plugins.jms.JMSContainerInvoker$MessageListenerImpl.onMessage(JMSContainerInvoker.java:1106)
at org.jboss.jms.asf.StdServerSession.onMessage(StdServerSession.java:256)
at com.ibm.mq.jms.MQSession.run(MQSession.java:1156)
at org.jboss.jms.asf.StdServerSession.run(StdServerSession.java:182)
at EDU.oswego.cs.dl.util.concurrent.PooledExecutor$Worker.run(PooledExecutor.java:732)
at java.lang.Thread.run(Thread.java:536)
Looking at the code this isn't all that surprising since the the thing it's trying to format is the value of the property JMS_JBOSS_REDELIVERY_COUNT which doesn't appear to be part of my message:
JMS Message class: jms_text
JMSType: null
JMSDeliveryMode: 2
JMSExpiration: 0
JMSPriority: 4
JMSMessageID: ID:414d5120514d5f6d7365706334312020b66a293f20000701
JMSTimestamp: 1059679846920
JMSCorrelationID:null
JMSDestination: null
JMSReplyTo: null
JMSRedelivered: false
JMS_IBM_PutDate:20030731
JMSXAppID:Websphere MQ Client for Java
JMS_IBM_Format:MQSTR
JMS_IBM_PutApplType:28
JMS_IBM_MsgType:8
JMSXUserID:websphere
JMS_IBM_PutTime:19304692
JMSXDeliveryCount:1
Why doesn't it use JMSXDeliveryCount ??
-Dan -
2. Re: DLQHandler and Websphere MQ (MQSeries)
vojdem Sep 19, 2003 1:33 AM (in response to dabramov)Hi,
i also had the same problems with use of Websphere MQ as DLQ. I have managed to make it work only with small changes in the DLQHandler (attachment).
It is not the best solution, but maybe it can help. -
3. Re: DLQHandler and Websphere MQ (MQSeries)
adrian.brock Sep 19, 2003 8:00 AM (in response to dabramov)vojdem can I have the source code to your modified
DLQHandler?
The IBM guy is correct, most properties are set during
the send. We don't know what those properties are so
we just copy them all. It is a bit nannying to throw
an Exception for this (logging a warning should be enough).
The redelivered count property was a bug which was fixed.
It checks for its existence now, before trying to use it.
I've modified the DLQHandler to ignore exceptions thrown
while trying to copy message properties. If you are
really interested, you can enable trace logging on the
DLQHandler to see the exceptions.
Regards,
Adrian -
4. Re: DLQHandler and Websphere MQ (MQSeries)
vojdem Sep 23, 2003 2:31 AM (in response to dabramov)Hi Adrian,
the sources are in the attachment. It is based on jboss sources from release 3.0.4. (i had the problem with DLQ-MQSeries in February/March).
regards
Vojtech -
5. Re: DLQHandler and Websphere MQ (MQSeries)
jdcasey Feb 27, 2004 3:04 PM (in response to dabramov)alright...I feel stupid. How can I get at these attachments? I've started using WSMQ with JBoss 3.2.3, and am experiencing the same problems with the DLQ. I'd like to get this fixed, as it will be critical in my company's adoption of JBoss (it's an integral part of our requirements, and the demo I'll have to do).
Can I get hold of this patch?
Thanks,
John Casey -
6. Re: DLQHandler and Websphere MQ (MQSeries)
adrian.brock Feb 29, 2004 6:22 PM (in response to dabramov)I don't see how you could be getting the same problem, since it has been fixed.
The DLQ handler now correctly checks for the existence of the property
before accessing it.
It also ignores errors trying to copy WSMQ internal properties.
Regards,
Adrian -
7. Re: DLQHandler and Websphere MQ (MQSeries)
jdcasey Mar 1, 2004 8:41 AM (in response to dabramov)Sorry, forgot to post a reply to before leaving work. I didn't read the error closely enough...it turned out that the example code from
http://sourceforge.net/tracker/index.php?func=detail&aid=753022&group_id=22866&atid=376687
which is meant as a tutorial (?) / patch for using WSMQ doesn't include a queue binding in the jboss-service.xml for DLQ...this was the cause of the error I was getting. I haven't had time to patch the zipfile from that URL yet, but I should have posted a reply to this forum.
Sorry again. Thanks for the reply.
-john[/url] -
8. Re: DLQHandler and Websphere MQ (MQSeries)
kouliig Mar 16, 2004 5:38 PM (in response to dabramov)Adrian,
I still have the same problem using JBoss 3.2.3:
2004-03-15 18:17:45,818 WARN [org.jboss.ejb.plugins.jms.DLQHandler] Message resent too many times; sending it to DLQ; message id=ID:414d512
04130393420202020202020204040d5a30de1b992
2004-03-15 18:17:45,820 TRACE [org.jboss.ejb.plugins.jms.DLQHandler] Could not copy message property JMSXUserID
javax.jms.MessageFormatException: MQJMS1058: Invalid message property name: JMSXUserID
at com.ibm.jms.JMSMessage.newMessageFormatException(JMSMessage.java:4557)
at com.ibm.jms.JMSMessage.setObjectProperty(JMSMessage.java:5419)
at org.jboss.ejb.plugins.jms.DLQHandler.makeWritable(DLQHandler.java:371)
at org.jboss.ejb.plugins.jms.DLQHandler.sendMessage(DLQHandler.java:274)
at org.jboss.ejb.plugins.jms.DLQHandler.handleRedeliveredMessage(DLQHandler.java:233)
at org.jboss.ejb.plugins.jms.JMSContainerInvoker$MessageListenerImpl.onMessage(JMSContainerInvoker.java:1105)
at org.jboss.jms.asf.StdServerSession.onMessage(StdServerSession.java:256)
at com.ibm.mq.jms.MQSession.run(MQSession.java:1136)
at org.jboss.jms.asf.StdServerSession.run(StdServerSession.java:182)
at EDU.oswego.cs.dl.util.concurrent.PooledExecutor$Worker.run(PooledExecutor.java:732)
at java.lang.Thread.run(Thread.java:534)
What changes should I do?
Regards,
Igor. -
9. Re: DLQHandler and Websphere MQ (MQSeries)
adrian.brock Mar 16, 2004 5:56 PM (in response to dabramov)That is a TRACE level message not an ERROR.
This property cannot be copied, it is set by WSMQ when the message
is sent to the DLQ. See the javadocs for javax.jms.Message
Regards,
Adrian -
10. Re: DLQHandler and Websphere MQ (MQSeries)
kouliig Mar 17, 2004 9:19 AM (in response to dabramov)You're right, thank you, this is a TRACE, an ERROR I'm getting later.
In my tests the DLQ works fine if MDBs listen to the queue which I populated from MDBs,
but fails when MDBs listen to the MQSeries queue populated directly by our client.
Any idea?
Regards,
Igor.
----------------------------------
2004-03-15 18:17:45,823 TRACE [org.jboss.ejb.plugins.jms.DLQHandler] Could not copy message property JMSXDeliveryCount
javax.jms.MessageFormatException: MQJMS1058: Invalid message property name: JMSXDeliveryCount
at com.ibm.jms.JMSMessage.newMessageFormatException(JMSMessage.java:4557)
at com.ibm.jms.JMSMessage.setObjectProperty(JMSMessage.java:5419)
at org.jboss.ejb.plugins.jms.DLQHandler.makeWritable(DLQHandler.java:371)
at org.jboss.ejb.plugins.jms.DLQHandler.sendMessage(DLQHandler.java:274)
at org.jboss.ejb.plugins.jms.DLQHandler.handleRedeliveredMessage(DLQHandler.java:233)
at org.jboss.ejb.plugins.jms.JMSContainerInvoker$MessageListenerImpl.onMessage(JMSContainerInvoker.java:1105)
at org.jboss.jms.asf.StdServerSession.onMessage(StdServerSession.java:256)
at com.ibm.mq.jms.MQSession.run(MQSession.java:1136)
at org.jboss.jms.asf.StdServerSession.run(StdServerSession.java:182)
at EDU.oswego.cs.dl.util.concurrent.PooledExecutor$Worker.run(PooledExecutor.java:732)
at java.lang.Thread.run(Thread.java:534)
2004-03-15 18:17:45,824 ERROR[org.jboss.ejb.plugins.jms.JMSContainerInvoker] Exception in JMSCI message listener
java.lang.NullPointerException
at org.jboss.ejb.plugins.jms.DLQHandler.sendMessage(DLQHandler.java:279)
at org.jboss.ejb.plugins.jms.DLQHandler.handleRedeliveredMessage(DLQHandler.java:233)
at org.jboss.ejb.plugins.jms.JMSContainerInvoker$MessageListenerImpl.onMessage(JMSContainerInvoker.java:1105)
at org.jboss.jms.asf.StdServerSession.onMessage(StdServerSession.java:256)
at com.ibm.mq.jms.MQSession.run(MQSession.java:1136)
at org.jboss.jms.asf.StdServerSession.run(StdServerSession.java:182)
at EDU.oswego.cs.dl.util.concurrent.PooledExecutor$Worker.run(PooledExecutor.java:732)
at java.lang.Thread.run(Thread.java:534) -
11. Re: DLQHandler and Websphere MQ (MQSeries)
kouliig Mar 17, 2004 9:46 AM (in response to dabramov)You're right, thank you, this is a TRACE, an ERROR I'm getting later.
In my tests DLQ works fine when MDB listens to the MQSeries queue that I populated from other MDB,
but fails when MDB listens to the queue populated by our client.
Any idea?
Regards,
Igor.
--------------
2004-03-15 18:17:45,823 TRACE [org.jboss.ejb.plugins.jms.DLQHandler] Could not copy message property JMSXDeliveryCount
javax.jms.MessageFormatException: MQJMS1058: Invalid message property name: JMSXDeliveryCount
at com.ibm.jms.JMSMessage.newMessageFormatException(JMSMessage.java:4557)
at com.ibm.jms.JMSMessage.setObjectProperty(JMSMessage.java:5419)
at org.jboss.ejb.plugins.jms.DLQHandler.makeWritable(DLQHandler.java:371)
at org.jboss.ejb.plugins.jms.DLQHandler.sendMessage(DLQHandler.java:274)
at org.jboss.ejb.plugins.jms.DLQHandler.handleRedeliveredMessage(DLQHandler.java:233)
at org.jboss.ejb.plugins.jms.JMSContainerInvoker$MessageListenerImpl.onMessage(JMSContainerInvoker.java:1105)
at org.jboss.jms.asf.StdServerSession.onMessage(StdServerSession.java:256)
at com.ibm.mq.jms.MQSession.run(MQSession.java:1136)
at org.jboss.jms.asf.StdServerSession.run(StdServerSession.java:182)
at EDU.oswego.cs.dl.util.concurrent.PooledExecutor$Worker.run(PooledExecutor.java:732)
at java.lang.Thread.run(Thread.java:534)
2004-03-15 18:17:45,824 ERROR [org.jboss.ejb.plugins.jms.JMSContainerInvoker] Exception in JMSCI message listener
java.lang.NullPointerException
at org.jboss.ejb.plugins.jms.DLQHandler.sendMessage(DLQHandler.java:279)
at org.jboss.ejb.plugins.jms.DLQHandler.handleRedeliveredMessage(DLQHandler.java:233)
at org.jboss.ejb.plugins.jms.JMSContainerInvoker$MessageListenerImpl.onMessage(JMSContainerInvoker.java:1105)
at org.jboss.jms.asf.StdServerSession.onMessage(StdServerSession.java:256)
at com.ibm.mq.jms.MQSession.run(MQSession.java:1136)
at org.jboss.jms.asf.StdServerSession.run(StdServerSession.java:182)
at EDU.oswego.cs.dl.util.concurrent.PooledExecutor$Worker.run(PooledExecutor.java:732)
at java.lang.Thread.run(Thread.java:534) -
12. Re: DLQHandler and Websphere MQ (MQSeries)
hofmeister Mar 25, 2004 6:50 AM (in response to dabramov)Hi all,
we encounter the same problem.
I had a look at the DLQHandler sourcecode. There in the sendMessage-method it accesses the JMSDestination by invoking the messages's "getJMSDestination()". Then it tries to apply the "toString()" Method to that destination.
But when you send a message from a non-JMS client (as we do) that field is null, because of the MQSeries internal header-mapping.
I don't really know if we can call this a bug in JBoss. Because assuming we have a JMS-message is ok (and in a certain way we do have one). But it would be great to have a DLQHandler which does not discard a msg when it came from a c-client and an error processing it occured. I'm not quite sure if I should change the code at that point. It would be better if the people at jboss would do it.
Greets,
helge -
13. Re: DLQHandler and Websphere MQ (MQSeries)
genman Mar 25, 2004 6:07 PM (in response to dabramov)
I fixed the NPE problem in the CVS version of JBoss.