Remote Debugging using Jbuilder X and Jboss 3.2.x

I want to do remote debugging using Jbuilder X and Jboss 3.2.x
The Jboss server is installed on a Linux Machine (Red Hat 9) and Jbuilder is on a Windows 2000 machine.
To do remote debugging I need to start the Jboss server on the linux machine in debug mode, for which I need to make some changes in run.sh file.
I have consulted this document
http://www.oracle.com/technology/products/jdev/howtos/appservers/debug_in_jboss.html

but the lines it suggests to change in UNIX are not there in my Linux run.sh file. There is no seperate information about Linux.

Also i have consulted
http://www.borland.com/products/white_papers/pdf/jb_ejb_development_using_jbx_and_jboss.pdf

But it doesn't say anything about the remote machine being a Linux machine.
Can some please tell me what changes do i need to make in run.sh so that remote debugging is possible

Thanks
LVL 8
thomas908Asked:
Who is Participating?
 
aozarovConnect With a Mentor Commented:
It acually started.
It just wait for your debugger to attach. Onced attached it will continue.
This is like having a break point in the main method.
If you want the JBoss to continue running without attaching (you can still attached to the running process later) then change:
-Xrunjdwp:transport=dt_socket,address=8787,server=y,suspend=y
to
-Xrunjdwp:transport=dt_socket,address=8787,server=y,suspend=n

Basically saying no need to suspend the application at startup.
0
 
aozarovCommented:
>> but the lines it suggests to change in UNIX are not there in my Linux run.sh file. There is no seperate information about Linux.
Applying the change to run.sh (it is actully the change in run.conf) which is basically just to remove the comment for:
JAVA_OPTS="-Xdebug -Xrunjdwp:transport=dt_socket,address=8787,server=y,suspend=y $JAVA_OPTS"
will work for Linux fine.
When you remote debug a Java process it doesn't matter which platform (windows/linux/...) that process is running on.
0
 
thomas908Author Commented:
Thanks for replying aozarov
I removed the comment from run.conf, but now the server doesn't start. It just hangs after displaying the following few lines

[root@srv root]# /usr/local/jboss/bin/run.sh =========================================================================

  JBoss Bootstrap Environment

  JBOSS_HOME: /usr/local/jboss

  JAVA: /usr/java/j2sdk1.4.2_06/bin/java

  JAVA_OPTS: -Xdebug
-Xrunjdwp:transport=dt_socket,address=8787,server=y,suspend=y
-Dprogram.name=run.sh

  CLASSPATH:
/usr/local/jboss/bin/run.jar:/usr/java/j2sdk1.4.2_06/lib/tools.jar

=========================================================================



 
0
Cloud Class® Course: CompTIA Cloud+

The CompTIA Cloud+ Basic training course will teach you about cloud concepts and models, data storage, networking, and network infrastructure.

 
thomas908Author Commented:
thanks, it does work
But when i trying to connect from JBuilder it gives me the follwoing exception

- IOException attaching Remote Java debug process --
java.net.ConnectException: Connection refused: connect

0
 
aozarovCommented:
You need to point it to port 8787
0
 
thomas908Author Commented:
I am pointing it to 8787
It opens a tab called localhost:8787
or should the tab be
ipOf RemoteMachine:8787

0
 
thomas908Author Commented:
I have done as per this doc
http://www.borland.com/products/white_papers/pdf/jb_ejb_development_using_jbx_and_jboss.pdf

It says tab should be opened with localhost:8787 and it does
0
 
aozarovCommented:
Ok, the problem is not the port but rather the ip address.
You are pointing to Linux box (this is where you run the JBoss server, right?)
And running from Windows (different box).
You need to change it to: your_linux_host_name:8787
0
 
thomas908Author Commented:
Another thing, the jboss server I am accessing is through the internet, its not on the same LAN.
Does that make a difference?
0
 
thomas908Author Commented:
>>You are pointing to Linux box (this is where you run the JBoss server, right?)
Right

>>and running from Windows (different box)
Yes, Jbuilder is on a differenct machine (Windows 2000)


0
 
aozarovCommented:
No, as long as you have access to it on port 8787. (it might be a bit slow though).
0
 
aozarovCommented:
Did you manage to attach to the remote Jboss?
0
 
thomas908Author Commented:
Thanks a lot aozarov, its working now.
It was so nice of you to work it all the way.
0
 
aozarovCommented:
:-)
0
Question has a verified solution.

Are you are experiencing a similar issue? Get a personalized answer when you ask a related question.

Have a better answer? Share it in a comment.

All Courses

From novice to tech pro — start learning today.