Author |
Message
|
Mohit Gupta |
Posted: Mon Dec 06, 2004 1:28 am Post subject: Debugging Java Plugin Node |
|
|
Apprentice
Joined: 16 Sep 2004 Posts: 34
|
Hi ,
Can anybody tell me the steps of debugging the java plugin node.
I have enable the java source debugging option from Window->preferences->FlowDebug and i have also put the source code jar file in the Properties editor of the java plugin node by clicking on Attach Source.
But still I am not able to debug and the control is not coming on evaluate method.
Cheers,
Mohit |
|
Back to top |
|
 |
chenulu |
Posted: Mon Dec 06, 2004 2:19 pm Post subject: |
|
|
Voyager
Joined: 27 Mar 2002 Posts: 87 Location: Research Triangle Park, NC
|
Hi Mohit,
Make sure you have the check box Enable Java Debugging check box is checked under (Window -> Preferences -> Flow Debug)
-- Chenulu |
|
Back to top |
|
 |
hallmark |
Posted: Thu Mar 10, 2005 7:21 am Post subject: Java Node Debugging |
|
|
 Voyager
Joined: 10 Mar 2005 Posts: 76
|
Hi
Using
Message Brokers Toolkit for WebSphere Studio
Version: 5.0.4
I have enabled java debugging in windows preferences
I have run the following command to set up jvm for debugging
mqsichangeproperties SEM_BKR1 -e default -o ComIbmJVMManager -n jvmDebugPort -v 10007
I have attached the flow with the java node to the debugger
But still, when I reach a breakpoint before my node there is no option to step into the node code, nor does it stop at a breakpoint set in the java code for that node. What have I missed?
Thanks in advance
Rob |
|
Back to top |
|
 |
frankies |
Posted: Thu Mar 10, 2005 6:28 pm Post subject: Hi , hallmark ! |
|
|
Newbie
Joined: 07 Mar 2005 Posts: 6
|
Hi , hallmark !
How to attach the java source to the java node in toolkite. In your words, you said that your node is not option to step into node code ,
in my option , you must choose either "Debug in java source" or "Debug
node with source" . It means you must choose one of them.
Here maybe can help you ,
[url] http://www.mqseries.net/phpBB2/viewtopic.php?t=20928 [/url]
Good luck! |
|
Back to top |
|
 |
hallmark |
Posted: Fri Mar 11, 2005 12:33 am Post subject: Java Node Debugging |
|
|
 Voyager
Joined: 10 Mar 2005 Posts: 76
|
Thanks Frankies,
I had read that post but I still could not get it to work, however, it works now.
Here is what I did for anyone else who wants to know
1. Deployed my flow (which included the Java Plugin Node)
2. Ran mqsichangeproperties <BrokerName> -e <ExecutionGroup> -o ComIbmJVMManager -n jvmDebugPort -v <DebugPort> from the command line
3. In the toolkit, in the debug perspective, selected debug from the run menu and set up the java node for debug using the port defined in the step above.
4. Attached the flow to the flow debugger in the normal way and put message to the queue.
5. With prudent breakpoint setting you should now be able to step into the java source of your custom node.
Hope this helps the other me
rob |
|
Back to top |
|
 |
tbp3272 |
Posted: Fri Jul 15, 2005 10:50 am Post subject: |
|
|
Newbie
Joined: 21 Jun 2002 Posts: 8
|
So how do you turn the debugger off? |
|
Back to top |
|
 |
hallmark |
Posted: Sun Jul 17, 2005 11:15 am Post subject: |
|
|
 Voyager
Joined: 10 Mar 2005 Posts: 76
|
In windows preferences, flow debug, there is a check box for java debugging. It is automatically unchecked if the debugger fails |
|
Back to top |
|
 |
bbakerman |
Posted: Wed Aug 03, 2005 6:58 pm Post subject: Re: Java Node Debugging |
|
|
Apprentice
Joined: 17 Dec 2003 Posts: 41
|
hallmark wrote: |
Thanks Frankies,
I had read that post but I still could not get it to work, however, it works now.
Here is what I did for anyone else who wants to know
1. Deployed my flow (which included the Java Plugin Node)
2. Ran mqsichangeproperties <BrokerName> -e <ExecutionGroup> -o ComIbmJVMManager -n jvmDebugPort -v <DebugPort> from the command line
3. In the toolkit, in the debug perspective, selected debug from the run menu and set up the java node for debug using the port defined in the step above.
4. Attached the flow to the flow debugger in the normal way and put message to the queue.
5. With prudent breakpoint setting you should now be able to step into the java source of your custom node.
Hope this helps the other me
rob |
Can some one please give a more detailed example of how to remotely debug a Java plugin node. Eg how do I set up the Java / Debug part in step 3.
Also will this interfere/clash with the remote agent debugger 5.02 that allows you to step debug ESQL? I dont think it can listen on multiple ports or have multiple debug managers.
I was hoping I could step through the ESQL and step into the Java node. Is this possible? |
|
Back to top |
|
 |
bbakerman |
Posted: Wed Aug 03, 2005 9:11 pm Post subject: |
|
|
Apprentice
Joined: 17 Dec 2003 Posts: 41
|
Thanks to anyone who may have looked into this but I got it working.
As far as I can tell, you cant have both the ESQl debugging and the Java source debugging working at the same time. My guess is because you can only have one remote debugging agent working at the same time eg listening on the same port (eg 10002).
What I did was :
1. Deployed my flow (which included the Java Plugin Node)
2. Ran mqsichangeproperties <BrokerName> -e <ExecutionGroup> -o ComIbmJVMManager -n jvmDebugPort -v 10002 from the command line
3. In the toolkit, in the debug perspective, selected debug from the run menu and set up the java node for debug using the port defined in the step above. Choose Run / Debug and inside there choose Remote Java Application and click on New to set up a new connection.
I then chose the port I wanted to connect to in this case 10002.
Then press Debug to attach to the remote Java JVM inside the broker.
4. With prudent breakpoint setting you should now be able to step into the java source of your custom node.
Unlike the other poster I was not able to do "Attached the flow to the flow debugger in the normal way and put message to the queue. " I am not sure if you can do ESQL and Java debugging at the same time. |
|
Back to top |
|
 |
jefflowrey |
Posted: Thu Aug 04, 2005 3:23 am Post subject: |
|
|
Grand Poobah
Joined: 16 Oct 2002 Posts: 19981
|
bbakerman wrote: |
My guess is because you can only have one remote debugging agent working at the same time eg listening on the same port (eg 10002) |
You can only ever have a single network service using a network address - which in TCP/IP is address+port.
There is no reason that you have to use the same port # (and by default, therefore, the same IP+port) for the Java debugger as for the RAC. _________________ I am *not* the model of the modern major general. |
|
Back to top |
|
 |
bbakerman |
Posted: Tue Aug 16, 2005 4:16 pm Post subject: |
|
|
Apprentice
Joined: 17 Dec 2003 Posts: 41
|
jefflowrey wrote: |
bbakerman wrote: |
My guess is because you can only have one remote debugging agent working at the same time eg listening on the same port (eg 10002) |
You can only ever have a single network service using a network address - which in TCP/IP is address+port.
There is no reason that you have to use the same port # (and by default, therefore, the same IP+port) for the Java debugger as for the RAC. |
Yes that I understand what I found was that the mqsi statement
mqsichangeproperties BROKERNAME -e default -o ComIbmJVMManager -n jvmDebugPort -v 10007
means that Java remote debugger can work but at the expense of the IBM RAC.
Say the default 10002 port is used for RAC.
When I do the above mqsichangeproperties command, the RAC no lonfer works even though the Java remote debugger does (on 10007).
Have I got this right or am I missing something?
Has anyone else debugged both Java plugins and ESQL at the same time and if so can you give a detailed example of the setup? |
|
Back to top |
|
 |
hallmark |
Posted: Wed Aug 17, 2005 12:18 am Post subject: |
|
|
 Voyager
Joined: 10 Mar 2005 Posts: 76
|
bbakerman wrote: |
Have I got this right or am I missing something?
Has anyone else debugged both Java plugins and ESQL at the same time and if so can you give a detailed example of the setup? |
Hi bbakerman
I have debugged both at the same time almost straight away having used the initial advice in this thread. A colleague of mine recently has been unable to do so and as far as I can tell the only difference is his version of the broker toolkit 5.0.0 whereas mine is 5.0.4
What version are you running?
If you are running the same as me I will re-state the steps that I took to get it working after I set it up again from scratch.
Rob |
|
Back to top |
|
 |
bbakerman |
Posted: Wed Aug 17, 2005 2:56 pm Post subject: |
|
|
Apprentice
Joined: 17 Dec 2003 Posts: 41
|
I am running 5.06 which is WBI 5 with CSD 6.
Thanks to this forum I was able to get both working.
First off IBM RAC wworks on port 10002 by default. This allows ESQL debugging. This has always worked.
I then had to start the broker and then set a different port for Java debugging, in my case 1005
mqsichangeproperties WBRK -e default -o ComIbmJVMManager -n jvmDebugPort -v 10005
Then inside the Eclipse tooling I can go to the flow debug perspective (the ladybird icon) and attach to the broker via the RAC agent. This allows message flow breakpoints to be set.
Also within the java perpertive I can click Run / Debug....
Choose a Remote Java Application and specify the 10005 port to connect on. This would then bring up another program in the debug perspective which is the remote JVM of the broker.
I am not sure why I couldnt get this to work before. I think I was confused in thinking that the mqsichangeproperties was allowing Java debugging at the expense of ESQL debugging.
This does not seem to be the case as long as you use different ports.
Thanks to all for their help on this. |
|
Back to top |
|
 |
|