Author |
Message
|
balareddy |
Posted: Thu Sep 13, 2007 8:26 am Post subject: StringIndexOutOfBoundsException while receiving message |
|
|
Acolyte
Joined: 06 Feb 2006 Posts: 54
|
Hello,
I am getting StringIndexOutOfBoundsException exception while getting message from MQ Queue. I am using Standard JMS connecting MQSeries with JNDI with QCF name which is configured with JMSAdmin tool.
While receiving message from Queue (QueueReiver.receive()) , application throws the following exception. This Exception happens very rarely.
java.lang.StringIndexOutOfBoundsException: String index out of range: 1248
at java.lang.String.checkBounds(String.java(Compiled Code))
at java.lang.String.<init>(String.java(Inlined Compiled Code))
at com.ibm.mq.jms.MQJMSMessage.createJMSMessage(MQJMSMessage.java(Compiled Code))
at com.ibm.mq.jms.MQMessageConsumer.getMessageQ(MQMessageConsumer.java(Compiled Code))
at com.ibm.mq.jms.MQMessageConsumer.getMessage(MQMessageConsumer.java(Compiled Code))
at com.ibm.mq.jms.MQMessageConsumer.receiveInternalQ(MQMessageConsumer.java(Compiled Code))
at com.ibm.mq.jms.MQMessageConsumer.receiveQ(MQMessageConsumer.java(Compiled Code))
at com.ibm.mq.jms.MQMessageConsumer.receive(MQMessageConsumer.java(Compiled Code))
I browsed the message in MQ Queue with MQ commands and can see the message has 2 different JMS messages combined as single message. 2 RFH headers, 2 headers,..
How is this possbile in MQ side to combine 2 messages to single??
Message in MQ Queue:
RFH  ¸RFH ¸ ¸ ¸<mcd><Msd>jms_object</Msd></mcd> <mcd><Msd>jms_object</Msd></mcd>,<jms><Dst>queue:///TESTQ</Dst></jms> ,<jms><Dst>queue:///TEST1</Dst></jms> $Lsageîk~¨Ü4fMaptLjava/util/HashMap$TimetLjava/util/Date;Lsageîk~¨Ü4fMaptLjava/util/HashMap;
Please help. MQ used in AIX5.3 |
|
Back to top |
|
 |
EddieA |
Posted: Thu Sep 13, 2007 9:34 am Post subject: |
|
|
 Jedi
Joined: 28 Jun 2001 Posts: 2453 Location: Los Angeles
|
What CSD level are you running.
It was quite a while ago, but I had problems with occasional messages failing due to the way the NameValue pairs were being handled. It was a Java problem, where it tried to convert past the end of the RFH header, because of alignment, and it failed. At some CSD, the MQ code was changed to work around this bug.
Cheers, _________________ Eddie Atherton
IBM Certified Solution Developer - WebSphere Message Broker V6.1
IBM Certified Solution Developer - WebSphere Message Broker V7.0 |
|
Back to top |
|
 |
balareddy |
Posted: Thu Sep 13, 2007 11:08 am Post subject: |
|
|
Acolyte
Joined: 06 Feb 2006 Posts: 54
|
EddieA wrote: |
What CSD level are you running.
|
I am using
Version: 530.9 CSD09
CMVC level: p530-09-L041213 _________________ bala |
|
Back to top |
|
 |
jefflowrey |
Posted: Thu Sep 13, 2007 11:14 am Post subject: |
|
|
Grand Poobah
Joined: 16 Oct 2002 Posts: 19981
|
CSD 09 has been withdrawn, specifically because of issues with Java and JMS.
You should be upgrading to version 6. Version 5.3 goes out of support very very very very very soon. _________________ I am *not* the model of the modern major general. |
|
Back to top |
|
 |
balareddy |
Posted: Thu Sep 13, 2007 10:59 pm Post subject: |
|
|
Acolyte
Joined: 06 Feb 2006 Posts: 54
|
In MQ Queue level, i can see message format is Format : 'MQHRF2 ' . I am sending message ti MQ Queue with Standard JMS with JNDI-MQContext.
One recommondation/suggestion from IBM is to set format to MQSTR or something else. But both sender and receiver are using Standard JMS in AIX.
Is there any way to change the message format ?? because i cannot set MQ message format in JMS code ,it is pure JMS code. _________________ bala |
|
Back to top |
|
 |
jefflowrey |
Posted: Fri Sep 14, 2007 4:00 am Post subject: |
|
|
Grand Poobah
Joined: 16 Oct 2002 Posts: 19981
|
You can configure the JMS destination to tell the JMS subsystem not to send an RFH.
You will then not be able to send JMS Properties.
The problem is not caused because you are sending an RFH. _________________ I am *not* the model of the modern major general. |
|
Back to top |
|
 |
atheek |
Posted: Fri Sep 14, 2007 5:33 am Post subject: |
|
|
 Partisan
Joined: 01 Jun 2006 Posts: 327 Location: Sydney
|
Set the TARGCLIENT property of the destination Q to "MQ" in the JNDI bindings (using JMSAdmin). |
|
Back to top |
|
 |
jefflowrey |
Posted: Fri Sep 14, 2007 5:42 am Post subject: |
|
|
Grand Poobah
Joined: 16 Oct 2002 Posts: 19981
|
atheek wrote: |
Set the TARGCLIENT property of the destination Q to "MQ" in the JNDI bindings (using JMSAdmin). |
Yes, that will remove the RFH.
The problem is not caused by the RFH.
Removing the RFH on a communication between two JMS apps may break the communication, as the JMS apps may be expecting data that can only be carried in the RFH. _________________ I am *not* the model of the modern major general. |
|
Back to top |
|
 |
fjb_saper |
Posted: Fri Sep 14, 2007 6:36 am Post subject: |
|
|
 Grand High Poobah
Joined: 18 Nov 2003 Posts: 20756 Location: LI,NY
|
jefflowrey wrote: |
CSD 09 has been withdrawn, specifically because of issues with Java and JMS.
You should be upgrading to version 6. Version 5.3 goes out of support very very very very very soon. |
Reread Jeff's response which I highlighted...
So upgrade already and let us know if you are still experiencing the problem after the upgrade... _________________ MQ & Broker admin |
|
Back to top |
|
 |
|