|
RSS Feed - WebSphere MQ Support
|
RSS Feed - Message Broker Support
|
 |
|
MQSeries message.format issue-Getting MQSTR on Aix for RFH2 |
« View previous topic :: View next topic » |
Author |
Message
|
xan_yan_zan |
Posted: Sat Oct 01, 2011 5:18 am Post subject: MQSeries message.format issue-Getting MQSTR on Aix for RFH2 |
|
|
Newbie
Joined: 01 Oct 2011 Posts: 4
|
Folks need your help desperately ,your help is greatly appreciated
Issue - Getting MQSTR for message.format value when reading a Mqmessage from java (using MQ API)
In my local system (OS -XP,MQ V6),when Read a message (message has RFH2 header) i am getting correcet value-msg.format : MQHRF2 (this is correct),When the same code I run on AIX I am getting that value as MQSTR so my below condition always satisfying(so throwing expection)
if (!mqMessage.format.equals(MQC.MQFMT_RF_HEADER_2)) {
throw new Exception("Invalid MQRFH2 format. MQFormat["+mqMessage.format+"] should be["+MQC.MQFMT_RF_HEADER_2+"]");
}
My Tries -I removed this condition check ,then i am getting out of memory error on AIX -OS,but still my local sytem processing well.
JVMDUMP006I Processing dump event "systhrow", detail "java/lang/OutOfMemoryError" - please wait.
JVMDUMP032I JVM requested Snap dump using '/home/isingh/scripts/Snap.20111001.054038.20644082.0001.trc' in response to an event
JVMDUMP010I Snap dump written to /home/isingh/scripts/Snap.20111001.054038.20644082.0001.trc
JVMDUMP032I JVM requested Heap dump using '/home/isingh/scripts/heapdump.20111001.054038.20644082.0002.phd' in response to an event
JVMDUMP010I Heap dump written to /home/isingh/scripts/heapdump.20111001.054038.20644082.0002.phd
JVMDUMP032I JVM requested Java dump using '/home/isingh/scripts/javacore.20111001.054038.20644082.0003.txt' in response to an event
JVMDUMP010I Java dump written to /home/isingh/scripts/javacore.20111001.054038.20644082.0003.txt
JVMDUMP013I Processed dump event "systhrow", detail "java/lang/OutOfMemoryError".
Exception in thread "main" java.lang.OutOfMemoryError
at java.nio.HeapCharBuffer.<init>(HeapCharBuffer.java:54)
at java.nio.CharBuffer.allocate(CharBuffer.java:327)
at com.ibm.mq.MQMessage.readConvertedString(xxxxxxx:3147)
at com.ibm.mq.MQMessage.readStringOfCharLength(xxxxx.java:1253)
at com.ibm.mq.MQMessage.readString(MQMessage.java:1844)
at com.ibm.common.SupportUtility.parseMQRFH2(SupportUtility.java:438)
at com.ibm.common.SupportUtility.getFromLogMsg(SupportUtility.java:287)
at com.ibm.common.MQSuper.getGlobalIds(xxxxx.java:621)
at com.ibm.common.MQSuper.moveMatchedMsgs(xxxxxx.java:200)
at com.ibm.pss.util.mqtools.MoveMatchedMsgs.main(xxxxxx.java:30)
The line above out of memory is - xml = mqMessage.readString(dataLen); //Get the XML data
I followed to read the mqrfh2 from one of these forms - link below
I referred the link in one of these forms to read mqrfh2 header-
http://www.mqseries.net/phpBB2/viewtopic.php?t=35456
for running i am using java5-
java version "1.5.0"
Java(TM) 2 Runtime Environment, Standard Edition (build pap32dev-20091106a (SR11 ))
IBM J9 VM (build 2.3, J2RE 1.5.0 IBM J9 2.3 AIX ppc-32 j9vmap3223-20091104 (JIT enabled)
J9VM - 20091103_45935_bHdSMr
JIT - 20091016_1845_r8
GC - 20091026_AA)
JCL - 20091106
 |
|
Back to top |
|
 |
fjb_saper |
Posted: Sat Oct 01, 2011 10:07 am Post subject: |
|
|
 Grand High Poobah
Joined: 18 Nov 2003 Posts: 20756 Location: LI,NY
|
Well ... if you have a broker license you should be using it and let the broker handle the parsing...
If you don't then you need to read up on the different xml parsing techniques and perhaps use the one that is least resource intensive (SAX parser vs DOM parser...)
In any case the RFH is just a header in front of your payload. So you can look at the format, read the header length and discard the header... or if the header is not present go directly for the payload....
Have fun.  _________________ MQ & Broker admin |
|
Back to top |
|
 |
xan_yan_zan |
Posted: Tue Oct 11, 2011 3:55 am Post subject: Same Issue |
|
|
Newbie
Joined: 01 Oct 2011 Posts: 4
|
Yes,Couple of times i got in my local TP also,Core dump.My understanding some thing it is reading which is not in limits.Came to know MQ 7 has some API - like HeaderList,Trying that....keep you all updated.If any body has any idea on this new API please let me know. |
|
Back to top |
|
 |
mqjeff |
Posted: Tue Oct 11, 2011 4:58 am Post subject: |
|
|
Grand Master
Joined: 25 Jun 2008 Posts: 17447
|
If you are getting different results running the same code on different platforms, then something is broken.
In this case, it's likely the messages that are being processed. They are likely not constructed the same in both cases, somehow.
You should enable and examine mq tracing to get a better idea of what's going on, and you should look very closely at the output of amqsbcg on the messages that are causing the error. |
|
Back to top |
|
 |
fjb_saper |
Posted: Tue Oct 11, 2011 11:22 am Post subject: |
|
|
 Grand High Poobah
Joined: 18 Nov 2003 Posts: 20756 Location: LI,NY
|
You might want to change your queue setting on the V7 qmgr to set the property control to Compat. What you might be experiencing is the transformation of the RFH2 into V7 properties....
Have fun  _________________ MQ & Broker admin |
|
Back to top |
|
 |
|
|
 |
|
Page 1 of 1 |
|
You cannot post new topics in this forum You cannot reply to topics in this forum You cannot edit your posts in this forum You cannot delete your posts in this forum You cannot vote in polls in this forum
|
|
|
|