Besides using the tools provided by JDK, here are some ways to troubleshoot Java problem specifically for Solaris.
Threading models are different between Solaris 8 and 9. A good description can be found at http://java.sun.com/docs/hotspot/threads/threads.html.
- Get a Java level stack trace by using “kill -SIGQUIT <pid>”. It will not work if JVM is configured to ignore system signals using “-Xrs”. On Solaris OS or Linux, the combination of pressing the Ctrl key and the backslash (\) key at the application console (standard input) causes the HotSpot VM to print a thread dump to the
application’s standard output. On Windows the equivalent key sequence is the Ctrl and Break keys. The general term for these key combinations is the Ctrl-Break handler.
- Get a snapshots of all LWPs using “prstat -L”
- Use “pstack” to get a native stack trace.
- Try throwing SIGWAITING signal. Specific to Solaris 8.
- Force the process to dump a core using “gcore”
- Switch to alternate thread library and try reproducing the problem.
- Learn to use DTrace. It is useful.
- Check out the cool tools.
- Read out Java SE Troubleshooting and Diagnostic Guide.