Author |
Message
|
chris boehnke |
Posted: Thu May 29, 2014 5:49 pm Post subject: Debugging java code |
|
|
 Partisan
Joined: 25 Jul 2006 Posts: 369
|
Hi Guys,
I am trying to debug the Java compute node. I am not able to debug. I am getting error "Local variables unavailable" at code
Quote: |
MbMessage outLocalEnv = new MbMessage(contact admin.getLocalEnvironment()); |
Can you pls let me know what i am missing during compilation.
Thanks |
|
Back to top |
|
 |
leona313 |
Posted: Thu May 29, 2014 6:53 pm Post subject: |
|
|
Newbie
Joined: 29 May 2014 Posts: 2
|
anything related to barcode? |
|
Back to top |
|
 |
chris boehnke |
Posted: Thu May 29, 2014 7:10 pm Post subject: |
|
|
 Partisan
Joined: 25 Jul 2006 Posts: 369
|
i am seeign this
The JAR file "C:\Program Files (x86)\IBM\SDPShared\plugins\com.ibm.etools.mft.jcn_7.0.200.v20101130_1524\javacompute.jar" has no source atatchment.
DO I need to add anything? |
|
Back to top |
|
 |
fjb_saper |
Posted: Fri May 30, 2014 4:25 am Post subject: Re: Debugging java code |
|
|
 Grand High Poobah
Joined: 18 Nov 2003 Posts: 20756 Location: LI,NY
|
chris boehnke wrote: |
Hi Guys,
I am trying to debug the Java compute node. I am not able to debug. I am getting error "Local variables unavailable" at code
Quote: |
MbMessage outLocalEnv = new MbMessage(contact admin.getLocalEnvironment()); |
Can you pls let me know what i am missing during compilation.
Thanks |
I hope your contact admin really was outAssembly...
As you are looking to work with the output local environment. I would expect the input local environment not to be mutable...
Of course it all depends on what type of message building template you initially chose and on how your outAssembly was created...
On the other hand I would not use new MbMessage as the output of outAssembly.getLocalEnvironment() is already an MbMessage...
I get the new Message thing, but you would still have to create a new output assembly passing the outlocalEnv... so why not just retrieve it from the current outAssembly and modify it?? It most likely already got copied from the input assembly to the output assembly at the point where the code hits the user part of the evaluate method...
Don't try to emulate ESQL exactly. On the JCN there is no property to determine which part of the assembly gets propagated to the output and no need to copy the input local env to the output local env.
This happens by default in the outAssembly constructor... before you hit the user part the evaluate method...
Have fun  _________________ MQ & Broker admin |
|
Back to top |
|
 |
chris boehnke |
Posted: Fri May 30, 2014 9:09 am Post subject: |
|
|
 Partisan
Joined: 25 Jul 2006 Posts: 369
|
Thanks fjb.
I am trying to debug a flow with java node. When i see the variables window to check the tree structure during debug , i am seeing as below. I dont see the data.
Can anyone help me on what should i set to see the data as well..which we see when debugging esql.
Quote: |
MbMessageAssembly
(
Message:
com.ibm.broker.plugin.MbMessage@44264426
Local environment:
com.ibm.broker.plugin.MbMessage@45e845e8
Global environment:
com.ibm.broker.plugin.MbMessage@46dd46dd
Exception list:
com.ibm.broker.plugin.MbMessage@48054805
) |
|
|
Back to top |
|
 |
fjb_saper |
Posted: Sat May 31, 2014 2:54 am Post subject: |
|
|
 Grand High Poobah
Joined: 18 Nov 2003 Posts: 20756 Location: LI,NY
|
Hi Chris,
You are forgetting that the java reference is just a "pass through" reference to the underlying jni that actually manipulates the message in C.
Unlike ESQL you will only see the reference and not it's content as that content is only accessible through the corresponding method or through MbElement.getObjectAsString(); .
So the only values you may see in JCN debug are the leaf values you are looking at in the code. Any tree node will just be a reference.
May be the output of MbElement.getName() into a debug variable would help you determine where in the tree you actually are.
Working as designed...
Have fun  _________________ MQ & Broker admin |
|
Back to top |
|
 |
McueMart |
Posted: Mon Jun 02, 2014 12:41 am Post subject: |
|
|
 Chevalier
Joined: 29 Nov 2011 Posts: 490 Location: UK...somewhere
|
I remember speaking to one of the developers a while back and they say it would be possible to expose the logical tree variables in a similar way to how it is seen in ESQL.
I guess it would just need someone to raise an RFE and enough people to get behind it - it'd get my vote  |
|
Back to top |
|
 |
ghoshly |
Posted: Mon Jun 02, 2014 7:14 am Post subject: RFE - Enable Debug tool to debug java with logical structure |
|
|
Partisan
Joined: 10 Jan 2008 Posts: 333
|
|
Back to top |
|
 |
|