Unable to connect to targert VM with JBoss plugin in debug mode

I am using IDEA 5.1, JBoss 4.0.3SP1 and JBoss plugin is 2.12 .
When I start my application to debug it starts but displays the below error in message box

Failed to establish connection to the target VM, adress:127.0.0.1:3114, transport:'socket'

and can not debug. Does not stop at break points, basically due to connection from debugger to JBoss server VM has failed (as I understand with the error msg).

I am literally stuck in my late development stage in fixing my application bugs. Its almost impossible to fix bugs quickly without debuging.

Has anyone come across this problem or anyone has any tips/suggestions/precautions/etc to overcome this problem.

Any help will be greatly appreciated.

Thanks in advance
- Madhav

6 comments
Comment actions Permalink

Are you launching JBoss from within IDEA (local run configuration) or are you trying to attach to an already running JBoss server (remote run configuration)?

0
Comment actions Permalink

Martin,

I am launching from IDEA as local run. I am using my own startup script (runMine.bat), which sets additional classpaths and calls the default run.bat

as

run.bat -c pearl

where pearl is my application context name

Ah, for ur information, in my runMine.bat i have a setting

set JAVA_OPTS=-server -Dxxxx -Dyyyy .....

Could that be a problem. coz, there is JAVA_OPTS env variable setting in JBoss run configuration which is not allowing me to delete or edit.

Funny thing is, its running properly in my other collegues machine. He has everything same as me. I configured for him and it worked. But not working for me on my machine.

Thanks for your soon reply.
- Madhav

0
Comment actions Permalink

In a first attempt I would have said that you're doing something wrong in your start script. But if the same script is working on your colleagues machine, then I would definitively search for differences between the two machines.

Why don't you give it a try without your own script anyway? Maybe you're luckier with the default settings.

0
Comment actions Permalink

Martin,

I tried with default and the application does not startup properly. Cheerful thing is, it did connect to target VM for debug.
My application needs additional JAVA_OPTS and CLASSPTAHs . I read the hibernate datasource details from JAVA_OPTS. So, if I does not use my runMine.bat which sets those paths, my app does not load up properly.

Can u tell me, what for JAVA_OPTS in JBoss Run/Debug configuration is used for? Is it used by both JBoss plugin and JBoss . I mean the settings

-Xdebug -Xnoagent -Djava.compiler=NONE -Xrunjdwp:transport=dt_socket,address=127.0.0.1:3114,suspend=y,server=n

which I cannot edit in the run/debug configuration screen.


- Madhav

0
Comment actions Permalink

Madhav,

Those settings are used by JBoss (to launch JBoss in debug mode) and by IDEA (to connect the debugger to JBoss). The plugin itself isn't involved.

So either you prepend your JAVA_OPTS setting in your run script with exactly those settings, or you don't use your run script and add your JAVA_OPTS settings to the ones created by IDEA.

It's true that you can't edit or delete the default settings, but you can edit the name. So just change the name JAVA_OPTS to something other and add your own JAVA_OPTS variable.

0
Comment actions Permalink

Martin,

I got it solved. I have prepended the JAVA_OPTS in my runMine.bat . And hurray, it worked.

Thanks for all your support.

- Madhav

0

Please sign in to leave a comment.