db-derby-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Frank Griffin <...@roadrunner.com>
Subject Re: Junit hang
Date Mon, 10 Mar 2008 16:58:44 GMT
Rick Hillegas wrote:
> I would appreciate people's advice about how to track down a hang in
> the Junit tests.
A little more complex than the other suggestions, but approach would be
to install NetBeans 6.0 on your system, and add the source directory for
Derby as a new project with an existing Ant build file.  Don't worry,
you're not going to be changing anything in this directory from
NetBeans; doing this just allows NetBeans to resolve stacktraces later on.

Then do what you need to do to make the JUnit JVM start with the
following switches:

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

"5555" can be any available port >1024.

When you get the hang, open NetBeans, choose Attach Debugger, and give a
host of localhost and the port you specified above.  Once it attaches,
click Pause.  You should then be able to select threads (double-click)
and open the Call Stack and Local Variable Debugging windows to see
where you are.


Mime
View raw message