ASG
IBM
Zystems
Cressida
Icon
Netflexity
 
  MQSeries.net
Search  Search       Tech Exchange      Education      Certifications      Library      Info Center      SupportPacs      LinkedIn  Search  Search                                                                   FAQ  FAQ   Usergroups  Usergroups
 
Register  ::  Log in Log in to check your private messages
 
RSS Feed - WebSphere MQ Support RSS Feed - Message Broker Support

MQSeries.net Forum Index » WebSphere Message Broker (ACE) Support » Debugging java code

Post new topic  Reply to topic
 Debugging java code « View previous topic :: View next topic » 
Author Message
chris boehnke
PostPosted: Thu May 29, 2014 5:49 pm    Post subject: Debugging java code Reply with quote

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
View user's profile Send private message
leona313
PostPosted: Thu May 29, 2014 6:53 pm    Post subject: Reply with quote

Newbie

Joined: 29 May 2014
Posts: 2

anything related to barcode?
Back to top
View user's profile Send private message
chris boehnke
PostPosted: Thu May 29, 2014 7:10 pm    Post subject: Reply with quote

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
View user's profile Send private message
fjb_saper
PostPosted: Fri May 30, 2014 4:25 am    Post subject: Re: Debugging java code Reply with quote

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
View user's profile Send private message Send e-mail
chris boehnke
PostPosted: Fri May 30, 2014 9:09 am    Post subject: Reply with quote

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
View user's profile Send private message
fjb_saper
PostPosted: Sat May 31, 2014 2:54 am    Post subject: Reply with quote

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
View user's profile Send private message Send e-mail
McueMart
PostPosted: Mon Jun 02, 2014 12:41 am    Post subject: Reply with quote

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
View user's profile Send private message
ghoshly
PostPosted: Mon Jun 02, 2014 7:14 am    Post subject: RFE - Enable Debug tool to debug java with logical structure Reply with quote

Partisan

Joined: 10 Jan 2008
Posts: 333

Please vote -

http://www.ibm.com/developerworks/rfe/execute?use_case=viewRfe&CR_ID=54280
Back to top
View user's profile Send private message
Display posts from previous:   
Post new topic  Reply to topic Page 1 of 1

MQSeries.net Forum Index » WebSphere Message Broker (ACE) Support » Debugging java code
Jump to:  



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
Protected by Anti-Spam ACP
 
 


Theme by Dustin Baccetti
Powered by phpBB © 2001, 2002 phpBB Group

Copyright © MQSeries.net. All rights reserved.