• Status: Solved
  • Priority: Medium
  • Security: Public
  • Views: 340
  • Last Modified:

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
0
thomas908
Asked:
thomas908
  • 7
  • 7
1 Solution
 
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
 
aozarovCommented:
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
Concerto Cloud for Software Providers & ISVs

Can Concerto Cloud Services help you focus on evolving your application offerings, while delivering the best cloud experience to your customers? From DevOps to revenue models and customer support, the answer is yes!

Learn how Concerto can help you.

 
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

Featured Post

What does it mean to be "Always On"?

Is your cloud always on? With an Always On cloud you won't have to worry about downtime for maintenance or software application code updates, ensuring that your bottom line isn't affected.

  • 7
  • 7
Tackle projects and never again get stuck behind a technical roadblock.
Join Now