users@glassfish.java.net

JTS error message detail

From: <glassfish_at_javadesktop.org>
Date: Thu, 24 Jan 2008 16:33:00 PST

Hi,

I've recently run into a problem with the JTS where upon commit, an exception was being thrown within com.sun.jts.CosTransactions.RegisteredSyncs.distributeBefore method. The exception is caught and logged at line 169 of RegisteredSyncs.java but the stack trace is not printed. The exception in my case was an ExceptionInInitializerError with msg == null, hence no detail.

If the entire stack trace could be printed I would have been able to resolve this issue in 2 minutes flat simply by looking at server.log. Instead I had to download the glassfish source , attach to the server's debugger and step through the JTS code in order to find the root cause.

A change, something like the following inserted at line 172 of RegisteredSyncs.java would be perfect:

if(_logger.isLoggable(Level.FINEST)) {
    exc.printStackTrace();
}

Regards,

Andrew.
[Message sent by forum member 'carrolla' (carrolla)]

http://forums.java.net/jive/thread.jspa?messageID=255694