Closed GoogleCodeExporter closed 9 years ago
Hi Thorsten,
The com.googlecode.arit.jul code was introduced between 0.6-beta6 and 0.6. This
explains why you are seeing the issue with one version, but not the other.
I had a closer look at how this code behaves in a Tomcat environment, but I was
unable to reproduce the issue and I don't understand yet how one can get a
NullPointerException here. On the other hand, since Tomcat installs its own
java.util.logging.LogManager (called JULI), anyway the JUL plugin in Arit will
not report anything useful in this environment (for more explanation, see
http://code.google.com/p/arit/wiki/JULHandler). Therefore, as a workaround you
can simply remove arit-jul-0.6.jar from WEB-INF/lib to disable this plugin.
To better understand the issue, could you let me know if it occurs only
sporadically or if it is reproducible (e.g. if it occurs every time Arit is
started or stopped)?
Andreas
Original comment by andreas.veithen@gmail.com
on 22 May 2011 at 2:24
The Tomcat instance is started from Eclipse and everytime this instance is
started I get this NullPointerException.
Original comment by thorsten...@gmail.com
on 8 Jun 2011 at 11:28
The issue actually occurs because on Sun JDK 1.6 loggers can be garbage
collected (i.e. LogManager only keeps weak references to Logger instances).
This means that the enumeration returned by LogManager#getLoggerNames may
contain names of loggers that have been garbage collected, and
LogManager#getLogger will return null for these names.
I think the problem is fixed now:
- When deployed on Tomcat, Arit will now use a plugin specific to Tomcat's
java.util.logging implementation (JULI).
- The code supporting the standard LogManager now does a null check on the
return value of LogManager#getLogger.
Original comment by andreas.veithen@gmail.com
on 18 Jun 2011 at 6:14
Original issue reported on code.google.com by
thorsten...@gmail.com
on 20 May 2011 at 12:27