Bug 27857 - NPE in java.util.logging
Summary: NPE in java.util.logging
Status: RESOLVED FIXED
Alias: None
Product: classpath
Classification: Unclassified
Component: classpath (show other bugs)
Version: unspecified
: P3 normal
Target Milestone: ---
Assignee: Not yet assigned to anyone
URL:
Keywords:
Depends on:
Blocks:
 
Reported: 2006-06-01 12:46 UTC by david.gilbert
Modified: 2006-07-23 09:58 UTC (History)
1 user (show)

See Also:
Host:
Target:
Build:
Known to work:
Known to fail:
Last reconfirmed:


Attachments

Note You need to log in before you can comment on or make changes to this bug.
Description david.gilbert 2006-06-01 12:46:45 UTC
StatCVS-0.2.2 fails at startup with the following exception:

$ jamvm -jar ~/statcvs-0.2.2/statcvs.jar logfile.log mauve 
StatCVS - CVS statistics generation

WARNING: error instantiating 'java.util.logging.ConsoleHandler' referenced by handlers, linkage error
java.lang.reflect.InvocationTargetException
   at java.lang.reflect.Method.invokeNative(Native Method)
   at java.lang.reflect.Method.invoke(Method.java:372)
   at jamvm.java.lang.JarLauncher.main(JarLauncher.java:49)
Caused by: java.lang.NullPointerException
   at java.util.logging.Logger.addHandler(Logger.java:1017)
   at java.util.logging.LogManager.readConfiguration(LogManager.java:560)
   at net.sf.statcvs.Main.initLogManager(Main.java:93)
   at net.sf.statcvs.Main.generateDefaultHTMLSuite(Main.java:170)
   at net.sf.statcvs.Main.main(Main.java:75)
   at java.lang.reflect.Method.invokeNative(Native Method)
   ...2 more

This is a regression...it was working a few months ago, as I ran this just before FOSDEM (and perhaps even more recently).

I'm using JamVM 1.4.3 and a very recent version of GNU Classpath from CVS.
Comment 1 Mark Wielaard 2006-06-01 16:58:44 UTC
I extended the warning code to print what the actual linkage error was:

handlerName: java.util.logging.ConsoleHandler
WARNING: error instantiating 'java.util.logging.ConsoleHandler' referenced by handlers, linkage error
java.lang.NoClassDefFoundError: sun/security/action/GetPropertyAction
   at net.sf.statcvs.util.LogFormatter.<init>(LogFormatter.java:39)
   at java.lang.reflect.Constructor.constructNative(Native Method)
   at java.lang.reflect.Constructor.newInstance(Constructor.java:265)
   at java.lang.Class.newInstance(Class.java:1163)
   at java.util.logging.LogManager.getInstanceProperty(LogManager.java:751)
   at java.util.logging.StreamHandler.<init>(StreamHandler.java:138)
   at java.util.logging.ConsoleHandler.<init>(ConsoleHandler.java:83)
   at java.lang.reflect.Constructor.constructNative(Native Method)
   at java.lang.reflect.Constructor.newInstance(Constructor.java:265)
   at java.lang.Class.newInstance(Class.java:1163)
   at java.util.logging.LogManager.createInstance(LogManager.java:836)
   at java.util.logging.LogManager.readConfiguration(LogManager.java:559)
   at net.sf.statcvs.Main.initLogManager(Main.java:93)
   at net.sf.statcvs.Main.generateDefaultHTMLSuite(Main.java:170)
   at net.sf.statcvs.Main.main(Main.java:75)
   at java.lang.reflect.Method.invokeNative(Native Method)
   at java.lang.reflect.Method.invoke(Method.java:355)
   at jamvm.java.lang.JarLauncher.main(JarLauncher.java:50)

So the statcvs code is using some internal sun class.
Comment 2 david.gilbert 2006-07-23 09:58:58 UTC
Thanks.  I patched StatCVS (some time ago) so that it doesn't require that non-portable class, and now I'll close this bug report.