Author |
Message
|
lancelotlinc |
Posted: Wed Apr 24, 2013 7:07 am Post subject: GlobalCache Walkthrough |
|
|
 Jedi Knight
Joined: 22 Mar 2010 Posts: 4941 Location: Bloomington, IL USA
|
|
Back to top |
|
 |
mqjeff |
Posted: Wed Apr 24, 2013 7:51 am Post subject: |
|
|
Grand Master
Joined: 25 Jun 2008 Posts: 17447
|
so is "message" an MbMessage object?
Does getRootElement() return a valid MbElement object?
Is the message being sent from MQ, and does the esql path InputRoot.MQMD.MsgId valid, and have a value? I mean, if you use a trace node to see the tree... |
|
Back to top |
|
 |
lancelotlinc |
Posted: Wed Apr 24, 2013 8:39 am Post subject: |
|
|
 Jedi Knight
Joined: 22 Mar 2010 Posts: 4941 Location: Bloomington, IL USA
|
Yes, getRootElement returns
MbElement( type: 1000000 name: Root )
handle 184931056
isAttached true
isReadOnly false
Code: |
2013-04-24 10:22:59.257109
=======================
Root:
( ['MQROOT' : 0xafab920]
(0x01000000:Name ):Properties = ( ['MQPROPERTYPARSER' : 0xafd9a80]
(0x03000000:NameValue):MessageSet = '' (CHARACTER)
(0x03000000:NameValue):MessageType = '' (CHARACTER)
(0x03000000:NameValue):MessageFormat = '' (CHARACTER)
(0x03000000:NameValue):Encoding = 546 (INTEGER)
(0x03000000:NameValue):CodedCharSetId = 1208 (INTEGER)
(0x03000000:NameValue):Transactional = TRUE (BOOLEAN)
(0x03000000:NameValue):Persistence = FALSE (BOOLEAN)
(0x03000000:NameValue):CreationTime = GMTTIMESTAMP '2013-04-24 14:25:17.470' (GMTTIMESTAMP)
(0x03000000:NameValue):ExpirationTime = -1 (INTEGER)
(0x03000000:NameValue):Priority = 0 (INTEGER)
(0x03000000:NameValue):ReplyIdentifier = X'000000000000000000000000000000000000000000000000' (BLOB)
(0x03000000:NameValue):ReplyProtocol = 'MQ' (CHARACTER)
(0x03000000:NameValue):Topic = NULL
(0x03000000:NameValue):ContentType = '' (CHARACTER)
(0x03000000:NameValue):IdentitySourceType = '' (CHARACTER)
(0x03000000:NameValue):IdentitySourceToken = '' (CHARACTER)
(0x03000000:NameValue):IdentitySourcePassword = '' (CHARACTER)
(0x03000000:NameValue):IdentitySourceIssuedBy = '' (CHARACTER)
(0x03000000:NameValue):IdentityMappedType = '' (CHARACTER)
(0x03000000:NameValue):IdentityMappedToken = '' (CHARACTER)
(0x03000000:NameValue):IdentityMappedPassword = '' (CHARACTER)
(0x03000000:NameValue):IdentityMappedIssuedBy = '' (CHARACTER)
)
(0x01000000:Name ):MQMD = ( ['MQHMD' : 0xaf6fd00]
(0x03000000:NameValue):SourceQueue = 'DQL.REQUEST' (CHARACTER)
(0x03000000:NameValue):Transactional = TRUE (BOOLEAN)
(0x03000000:NameValue):Encoding = 546 (INTEGER)
(0x03000000:NameValue):CodedCharSetId = 1208 (INTEGER)
(0x03000000:NameValue):Format = 'MQHRF2 ' (CHARACTER)
(0x03000000:NameValue):Version = 2 (INTEGER)
(0x03000000:NameValue):Report = 0 (INTEGER)
(0x03000000:NameValue):MsgType = 8 (INTEGER)
(0x03000000:NameValue):Expiry = -1 (INTEGER)
(0x03000000:NameValue):Feedback = 0 (INTEGER)
(0x03000000:NameValue):Priority = 0 (INTEGER)
(0x03000000:NameValue):Persistence = 0 (INTEGER)
(0x03000000:NameValue):MsgId = X'414d51204d4238514d47522020202020bbd4775120001d8c' (BLOB)
(0x03000000:NameValue):CorrelId = X'000000000000000000000000000000000000000000000000' (BLOB)
(0x03000000:NameValue):BackoutCount = 0 (INTEGER)
(0x03000000:NameValue):ReplyToQ = ' ' (CHARACTER)
(0x03000000:NameValue):ReplyToQMgr = 'WMQRTPD1 ' (CHARACTER)
(0x03000000:NameValue):UserIdentifier = 'local_mqadmi' (CHARACTER)
(0x03000000:NameValue):AccountingToken = X'16010515000000ef9bc4fbf0b5674f07390083eb03000000000000000000000b' (BLOB)
(0x03000000:NameValue):ApplIdentityData = ' ' (CHARACTER)
(0x03000000:NameValue):PutApplType = 11 (INTEGER)
(0x03000000:NameValue):PutApplName = 'C:\apps\ibm\ih03\rfhutil.exe' (CHARACTER)
(0x03000000:NameValue):PutDate = DATE '2013-04-24' (DATE)
(0x03000000:NameValue):PutTime = GMTTIME '14:25:17.470' (GMTTIME)
(0x03000000:NameValue):ApplOriginData = ' ' (CHARACTER)
(0x03000000:NameValue):GroupId = X'000000000000000000000000000000000000000000000000' (BLOB)
(0x03000000:NameValue):MsgSeqNumber = 1 (INTEGER)
(0x03000000:NameValue):Offset = 0 (INTEGER)
(0x03000000:NameValue):MsgFlags = 0 (INTEGER)
(0x03000000:NameValue):OriginalLength = -1 (INTEGER)
)
(0x01000000:Name ):MQRFH2 = ( ['MQHRF2' : 0xb0b1560]
(0x03000000:NameValue):Version = 2 (INTEGER)
(0x03000000:NameValue):Format = ' ' (CHARACTER)
(0x03000000:NameValue):Encoding = 546 (INTEGER)
(0x03000000:NameValue):CodedCharSetId = 1208 (INTEGER)
(0x03000000:NameValue):Flags = 0 (INTEGER)
(0x03000000:NameValue):NameValueCCSID = 1208 (INTEGER)
(0x01000000:Name ):usr = (
(0x01000000:Name):identifer = (
(0x03000000:NameValue):dt = 'i4' (CHARACTER)
(0x02000000:Value ): = '1' (CHARACTER)
)
)
)
(0x01000000:Folder):XMLNSC = ( ['xmlnsc' : 0x1b346b0]
(0x01000400:NamespaceDecl):XmlDeclaration = (
(0x03000100:Attribute):Version = '1.0' (CHARACTER)
(0x03000100:Attribute):Encoding = 'UTF-8' (CHARACTER)
(0x03000100:Attribute):StandAlone = 'yes' (CHARACTER)
)
(0x01000000:Folder |
_________________ http://leanpub.com/IIB_Tips_and_Tricks
Save $20: Coupon Code: MQSERIES_READER |
|
Back to top |
|
 |
mqjeff |
Posted: Wed Apr 24, 2013 9:42 am Post subject: |
|
|
Grand Master
Joined: 25 Jun 2008 Posts: 17447
|
And you're sure getFirstElementByPath("/MQMD/MsgId") returns Null?
It's not the getValueAsString() that's returning null? |
|
Back to top |
|
 |
lancelotlinc |
Posted: Wed Apr 24, 2013 9:48 am Post subject: |
|
|
 Jedi Knight
Joined: 22 Mar 2010 Posts: 4941 Location: Bloomington, IL USA
|
Good question, thanks for helping me through this. I had thought of that.
All these "fbp*" return null (rootElement is valid/not null):
Code: |
MbElement rootElement = inMessage.getRootElement();
MbElement fbp = rootElement.getFirstElementByPath("/MQMD/MsgId");
MbElement fbp1 = rootElement.getFirstElementByPath("MQMD/MsgId");
MbElement fbp2 = rootElement.getFirstElementByPath("/Root/MQMD/MsgId");
MbElement fbp3 = rootElement.getFirstElementByPath("/MQMD");
MbElement fbp4 = rootElement.getFirstElementByPath("/MQRFH2");
MbElement fbp5 = rootElement.getFirstElementByPath("MQMD");
MbElement fbp6 = rootElement.getFirstElementByPath("MQRFH2"); |
_________________ http://leanpub.com/IIB_Tips_and_Tricks
Save $20: Coupon Code: MQSERIES_READER |
|
Back to top |
|
 |
mqjeff |
Posted: Wed Apr 24, 2013 9:52 am Post subject: |
|
|
Grand Master
Joined: 25 Jun 2008 Posts: 17447
|
I didn't doubt you had thought of it... But it's easy to forget to check things.
Try using a path of "//MQMD/MsgId". |
|
Back to top |
|
 |
lancelotlinc |
Posted: Wed Apr 24, 2013 10:10 am Post subject: |
|
|
 Jedi Knight
Joined: 22 Mar 2010 Posts: 4941 Location: Bloomington, IL USA
|
|
Back to top |
|
 |
mqjeff |
Posted: Wed Apr 24, 2013 10:23 am Post subject: |
|
|
Grand Master
Joined: 25 Jun 2008 Posts: 17447
|
|
Back to top |
|
 |
Esa |
Posted: Wed Apr 24, 2013 11:34 am Post subject: |
|
|
 Grand Master
Joined: 22 May 2008 Posts: 1387 Location: Finland
|
I have just recently implemented similar queries with V 8.0.0.2 without problems.
What about restarting your toolkit, cleaning the projects, recompiling and redeploying?
Obviously the message that is being processed is not the input message but something else, an uninitialized output message, LocalEnvironment etc.
Try something like this to find out where you are:
Code: |
MbElement cursor = message.getRootElement().getFirstChild();
String firstElement = cursor.getName();
cursor = cursor.getNextSibling();
String secondElement = cursor.getName(); |
After you have solved this little problem it would be interesting to hear if you manage to access the global cache. I couldn't. It seems the eXtreme Scale java client jars and the server components in v 8.0.0.2 are in different version levels that are incompatible. Or there is something wrong with my environment.
You can always do this:
Code: |
String key = "dummy";
String value = "another dummy";
<the global map stuff>.put(key, value); |
just to find out if you are able to connect to the global cache and issue a put. |
|
Back to top |
|
 |
lancelotlinc |
Posted: Wed Apr 24, 2013 12:38 pm Post subject: |
|
|
 Jedi Knight
Joined: 22 Mar 2010 Posts: 4941 Location: Bloomington, IL USA
|
Using your code, Esa, firstElement is successfully read as "Properties". Upon cursor.getNextSibling, cursor becomes null.
Something is wrong with the 8.0.0.2 tree-walk in Java. I'll file a PMR on it shortly.
This morning, I was successful in storing items in the cache. Something happened this afternoon, and when I try to getGlobalMap, the attempt times out because the client is not able to connect to the catalog server. I'll troubleshoot that later. _________________ http://leanpub.com/IIB_Tips_and_Tricks
Save $20: Coupon Code: MQSERIES_READER |
|
Back to top |
|
 |
kimbert |
Posted: Thu Apr 25, 2013 2:17 am Post subject: |
|
|
 Jedi Council
Joined: 29 Jul 2003 Posts: 5542 Location: Southampton
|
Quote: |
firstElement is successfully read as "Properties". Upon cursor.getNextSibling, cursor becomes null.
Something is wrong with the 8.0.0.2 tree-walk in Java. I'll file a PMR on it shortly. |
I agree that this looks very strange. The Trace node output clearly shows that the next sibling of 'Properties' is 'MQMD'.
I assume that the Trace node output is from a Trace node that is positioned *immediately* before the JavaCompute node? If not, that would be the next thing to try.
Before you open that PMR, please can you replace the JavaCompute node with a Compute node that does *exactly* the same job using ESQL reference variables. I still suspect ( and hope ) that there is a straightforward explanation for this. |
|
Back to top |
|
 |
lancelotlinc |
Posted: Thu Apr 25, 2013 3:02 am Post subject: |
|
|
 Jedi Knight
Joined: 22 Mar 2010 Posts: 4941 Location: Bloomington, IL USA
|
kimbert wrote: |
Quote: |
firstElement is successfully read as "Properties". Upon cursor.getNextSibling, cursor becomes null.
Something is wrong with the 8.0.0.2 tree-walk in Java. I'll file a PMR on it shortly. |
I agree that this looks very strange. The Trace node output clearly shows that the next sibling of 'Properties' is 'MQMD'.
I assume that the Trace node output is from a Trace node that is positioned *immediately* before the JavaCompute node? If not, that would be the next thing to try.
Before you open that PMR, please can you replace the JavaCompute node with a Compute node that does *exactly* the same job using ESQL reference variables. I still suspect ( and hope ) that there is a straightforward explanation for this. |
I thought about this as I fell to sleep last night. You know, I do my best coding in my sleep. I had placed a Compute node just prior to the JCN and I'm sure I did not pass along the message. Thanks all for commenting.
Once I verify this is indeed the issue, the next step is to figure out why the GlobalMap is not connecting to the catalog server. _________________ http://leanpub.com/IIB_Tips_and_Tricks
Save $20: Coupon Code: MQSERIES_READER |
|
Back to top |
|
 |
McueMart |
Posted: Thu Apr 25, 2013 3:24 am Post subject: |
|
|
 Chevalier
Joined: 29 Nov 2011 Posts: 490 Location: UK...somewhere
|
Just tested and all is working the same in 8.0.0.2 as 8.0.0.1 thankfully!  |
|
Back to top |
|
 |
mqjeff |
Posted: Thu Apr 25, 2013 3:59 am Post subject: |
|
|
Grand Master
Joined: 25 Jun 2008 Posts: 17447
|
lancelotlinc wrote: |
kimbert wrote: |
Quote: |
firstElement is successfully read as "Properties". Upon cursor.getNextSibling, cursor becomes null.
Something is wrong with the 8.0.0.2 tree-walk in Java. I'll file a PMR on it shortly. |
I agree that this looks very strange. The Trace node output clearly shows that the next sibling of 'Properties' is 'MQMD'.
I assume that the Trace node output is from a Trace node that is positioned *immediately* before the JavaCompute node? If not, that would be the next thing to try.
Before you open that PMR, please can you replace the JavaCompute node with a Compute node that does *exactly* the same job using ESQL reference variables. I still suspect ( and hope ) that there is a straightforward explanation for this. |
I thought about this as I fell to sleep last night. You know, I do my best coding in my sleep. I had placed a Compute node just prior to the JCN and I'm sure I did not pass along the message. Thanks all for commenting.
Once I verify this is indeed the issue, the next step is to figure out why the GlobalMap is not connecting to the catalog server. |
Yeah, it's either that the compute node is not passing along the message, or that the MbMessage element you're starting with is pointing to a relatively empty OutputRoot rather than a relatively populated InputRoot... |
|
Back to top |
|
 |
lancelotlinc |
Posted: Thu Apr 25, 2013 6:22 am Post subject: |
|
|
 Jedi Knight
Joined: 22 Mar 2010 Posts: 4941 Location: Bloomington, IL USA
|
|
Back to top |
|
 |
|