jvm hangs in debug, never connects

I am using jdk1.7.0_04 with IntelliJ 11.1.2 64 bit version on Windows 7 running Glassfish 3.1.2 utilizing Maven for the build.  I am not sure if the debugger ever actually starts or if the issue is that is takes FAR too long to be useful.  When I first set up the environment I was able to debug without issue and quickly.  Even now, in run mode everything starts up quickly, the application is deployed and it runs as expected.  While putting together this posting I started the debugger through IntelliJ.  It has been 14 minutes and the debugger has not started.  I have the following message in my server tab:

C:\glassfish3\glassfish\bin\asadmin.bat start-domain --debug domain1
Debugging is enabled and the server is suspended.  Please attach to the debugging port at: 9009
Attempting to start domain1.... Please look at the server log for more details.....
Connected to the target VM, address: '', transport: 'socket'
[2012-06-19 08:46:54,352] Artifact rpavis-app-im:ear exploded: Server is not connected. Press 'Deploy' to start deployment.

When it was working this would then switch to the server starting and would deploy.  In this case it just sits there.  It never starts.  The Glassfish log adds lines but so incredibly slowly that it appears to be locked up until you wait another 10 minutes or so.  It is entirely possible that if I wait another hour or so the debugger will start but it will be so slow and non-responsive as to not be useful.  There are no errors in the log.  It is just extremely slow, or it is locked up and I am just hopeful hours later.

If I reset the domain.xml manually to server=y, suspend=n I can get debugging to start for the client side code.  Of course, server side breakpoints are never hit with the settings this way.  But at least the debugger starts as expected.

I have also set my Xmx memory to the max available of 512 min and 2048 max.  The IDE appears to be using the maximum amount of memory.  If I drop the amount of memory however, there is no change there either.

I have been struggling with this for a week now.  I have uninstalled and completely reinstalled Glassfish, IntelliJ and Java several times.  Please, can anyone give me an idea of what might be the issue here?  If you need more information, please do let me know.

Thank you,

1 comment
Comment actions Permalink

Thanks to Serge Baranov at JetBrains support for having me create a whole new project and seeing if the debugger worked.  It turns out something was corrupt in my local copy of the project I was working on.  I removed the project folder entirely and recreated it from source control.  Debugging is now working as expected.


Please sign in to leave a comment.