Win a copy of Think Java: How to Think Like a Computer Scientist this week in the Java in General forum!
  • Post Reply
  • Bookmark Topic Watch Topic
  • New Topic

Remote Debugging using Jbuilder X and Jboss 3.2.x

 
Thomas Greene
Ranch Hand
Posts: 127
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
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
 
Mark Spritzler
ranger
Sheriff
Posts: 17278
6
IntelliJ IDE Mac Spring
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
The arguments that you need to add are for the line that calls java.

So there is a line somewhere in there that calls java from the command line, that is where you will need to add the debug arguments.

Or you might have a line in there that sets some variable that is used in the call to Java and could put it there.

You can post your run.sh and we can point you to the correct line.

Mark
 
Thomas Greene
Ranch Hand
Posts: 127
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Thanks for replying
Here is my run.sh


and here is my run.conf


I also tried removing the comment from teh last line of run.conf, but after that the server didn't start. It hanged after displaying the following

 
Thomas Greene
Ranch Hand
Posts: 127
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
changing

-Xrunjdwp:transport=dt_socket,address=8787,server=y,suspend=y
to
-Xrunjdwp:transport=dt_socket,address=8787,server=y,suspend=n

makes the server run properly
but when i try ot attach from my remote Jbuilder, I get the follwoing exception

- IOException attaching Remote Java debug process --
java.net.ConnectException: Connection refused: connect
 
Mark Spritzler
ranger
Sheriff
Posts: 17278
6
IntelliJ IDE Mac Spring
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Here is the options that I put in my Bea Weblogic config file, and the original Options are appended to the variable.

-Xdebug -Xrunjdwp:server=y,transport=dt_socket,address=5005,suspend=n

of course you would change the address to be your port address.

How are you connecting? What IDE, and is it using the same port?

Mark
 
Thomas Greene
Ranch Hand
Posts: 127
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Thanks a lot.
It started working after I restarted the server .
 
  • Post Reply
  • Bookmark Topic Watch Topic
  • New Topic