java.lang.ExceptionInInitializerError

JDK Bug System | Alan Bateman | 3 years ago
  1. 0

    FULL PRODUCT VERSION : Java Web Start 10.40.2.43 Using JRE version 1.7.0_40-b43 Java HotSpot(TM) Client VM ADDITIONAL OS VERSION INFORMATION : Microsoft Windows XP [Version 5.1.2600] A DESCRIPTION OF THE PROBLEM : My application was running fine until i upgraded my jre to 7u40. When my application is initializing its doing Logger.getLogger("ClassName"), i am getting following exception. java.lang.ExceptionInInitializerError at java.util.logging.Logger.demandLogger(Unknown Source) at java.util.logging.Logger.getLogger(Unknown Source) at com.company.Application.Applet.<clinit>(Unknown Source) at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method) at sun.reflect.NativeMethodAccessorImpl.invoke(Unknown Source) at sun.reflect.DelegatingMethodAccessorImpl.invoke(Unknown Source) at java.lang.reflect.Method.invoke(Unknown Source) at com.sun.javaws.Launcher.executeApplication(Unknown Source) at com.sun.javaws.Launcher.executeMainClass(Unknown Source) at com.sun.javaws.Launcher.doLaunchApp(Unknown Source) at com.sun.javaws.Launcher.run(Unknown Source) at java.lang.Thread.run(Unknown Source) Caused by: java.lang.NullPointerException at java.util.logging.Logger.setParent(Unknown Source) at java.util.logging.LogManager$6.run(Unknown Source) at java.security.AccessController.doPrivileged(Native Method) at java.util.logging.LogManager.doSetParent(Unknown Source) at java.util.logging.LogManager.access$1100(Unknown Source) at java.util.logging.LogManager$LogNode.walkAndSetParent(Unknown Source) at java.util.logging.LogManager$LoggerContext.addLocalLogger(Unknown Source) at java.util.logging.LogManager$LoggerContext.addLocalLogger(Unknown Source) at java.util.logging.LogManager.addLogger(Unknown Source) at java.util.logging.LogManager$1.run(Unknown Source) at java.security.AccessController.doPrivileged(Native Method) at java.util.logging.LogManager.<clinit>(Unknown Source) The exception is coming from this line private static Logger logger = Logger.getLogger(Applet.class.getName()); Could it be because of any sideeffects with fix http://bugs.sun.com/bugdatabase/view_bug.do?bug_id=8017174 ? Workaround is to open java control center and enable logging. This is a concern since by default "Enable Logging" is unchecked. If i select "Enable Logging", application starts fine REGRESSION. Last worked in version 7u25 STEPS TO FOLLOW TO REPRODUCE THE PROBLEM : 1) Launch java control center and unselect "Enable Logging" from advanced tab 2) Create a sample westart application which initialize logging private static Logger logger = Logger.getLogger(Applet.class.getName()); 3) Application is not launching 4) If you enable "Enable Logging", application launches EXPECTED VERSUS ACTUAL BEHAVIOR : EXPECTED - Should launch always irrespective of the "Enable Logging" checkbox. ACTUAL - Application fails with a nullpointer exception. ERROR MESSAGES/STACK TRACES THAT OCCUR : java.lang.ExceptionInInitializerError at java.util.logging.Logger.demandLogger(Unknown Source) at java.util.logging.Logger.getLogger(Unknown Source) at com.company.Application.Applet.<clinit>(Unknown Source) at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method) at sun.reflect.NativeMethodAccessorImpl.invoke(Unknown Source) at sun.reflect.DelegatingMethodAccessorImpl.invoke(Unknown Source) at java.lang.reflect.Method.invoke(Unknown Source) at com.sun.javaws.Launcher.executeApplication(Unknown Source) at com.sun.javaws.Launcher.executeMainClass(Unknown Source) at com.sun.javaws.Launcher.doLaunchApp(Unknown Source) at com.sun.javaws.Launcher.run(Unknown Source) at java.lang.Thread.run(Unknown Source) Caused by: java.lang.NullPointerException at java.util.logging.Logger.setParent(Unknown Source) at java.util.logging.LogManager$6.run(Unknown Source) at java.security.AccessController.doPrivileged(Native Method) at java.util.logging.LogManager.doSetParent(Unknown Source) at java.util.logging.LogManager.access$1100(Unknown Source) at java.util.logging.LogManager$LogNode.walkAndSetParent(Unknown Source) at java.util.logging.LogManager$LoggerContext.addLocalLogger(Unknown Source) at java.util.logging.LogManager$LoggerContext.addLocalLogger(Unknown Source) at java.util.logging.LogManager.addLogger(Unknown Source) at java.util.logging.LogManager$1.run(Unknown Source) at java.security.AccessController.doPrivileged(Native Method) at java.util.logging.LogManager.<clinit>(Unknown Source) REPRODUCIBILITY : This bug can be reproduced always. ---------- BEGIN SOURCE ---------- a simple logging enabled applet ---------- END SOURCE ---------- CUSTOMER SUBMITTED WORKAROUND : Select "Enable Logging"

    JDK Bug System | 3 years ago | Alan Bateman
    java.lang.ExceptionInInitializerError
  2. 0

    FULL PRODUCT VERSION : Java Web Start 10.40.2.43 Using JRE version 1.7.0_40-b43 Java HotSpot(TM) Client VM ADDITIONAL OS VERSION INFORMATION : Microsoft Windows XP [Version 5.1.2600] A DESCRIPTION OF THE PROBLEM : My application was running fine until i upgraded my jre to 7u40. When my application is initializing its doing Logger.getLogger("ClassName"), i am getting following exception. java.lang.ExceptionInInitializerError at java.util.logging.Logger.demandLogger(Unknown Source) at java.util.logging.Logger.getLogger(Unknown Source) at com.company.Application.Applet.<clinit>(Unknown Source) at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method) at sun.reflect.NativeMethodAccessorImpl.invoke(Unknown Source) at sun.reflect.DelegatingMethodAccessorImpl.invoke(Unknown Source) at java.lang.reflect.Method.invoke(Unknown Source) at com.sun.javaws.Launcher.executeApplication(Unknown Source) at com.sun.javaws.Launcher.executeMainClass(Unknown Source) at com.sun.javaws.Launcher.doLaunchApp(Unknown Source) at com.sun.javaws.Launcher.run(Unknown Source) at java.lang.Thread.run(Unknown Source) Caused by: java.lang.NullPointerException at java.util.logging.Logger.setParent(Unknown Source) at java.util.logging.LogManager$6.run(Unknown Source) at java.security.AccessController.doPrivileged(Native Method) at java.util.logging.LogManager.doSetParent(Unknown Source) at java.util.logging.LogManager.access$1100(Unknown Source) at java.util.logging.LogManager$LogNode.walkAndSetParent(Unknown Source) at java.util.logging.LogManager$LoggerContext.addLocalLogger(Unknown Source) at java.util.logging.LogManager$LoggerContext.addLocalLogger(Unknown Source) at java.util.logging.LogManager.addLogger(Unknown Source) at java.util.logging.LogManager$1.run(Unknown Source) at java.security.AccessController.doPrivileged(Native Method) at java.util.logging.LogManager.<clinit>(Unknown Source) The exception is coming from this line private static Logger logger = Logger.getLogger(Applet.class.getName()); Could it be because of any sideeffects with fix http://bugs.sun.com/bugdatabase/view_bug.do?bug_id=8017174 ? Workaround is to open java control center and enable logging. This is a concern since by default "Enable Logging" is unchecked. If i select "Enable Logging", application starts fine REGRESSION. Last worked in version 7u25 STEPS TO FOLLOW TO REPRODUCE THE PROBLEM : 1) Launch java control center and unselect "Enable Logging" from advanced tab 2) Create a sample westart application which initialize logging private static Logger logger = Logger.getLogger(Applet.class.getName()); 3) Application is not launching 4) If you enable "Enable Logging", application launches EXPECTED VERSUS ACTUAL BEHAVIOR : EXPECTED - Should launch always irrespective of the "Enable Logging" checkbox. ACTUAL - Application fails with a nullpointer exception. ERROR MESSAGES/STACK TRACES THAT OCCUR : java.lang.ExceptionInInitializerError at java.util.logging.Logger.demandLogger(Unknown Source) at java.util.logging.Logger.getLogger(Unknown Source) at com.company.Application.Applet.<clinit>(Unknown Source) at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method) at sun.reflect.NativeMethodAccessorImpl.invoke(Unknown Source) at sun.reflect.DelegatingMethodAccessorImpl.invoke(Unknown Source) at java.lang.reflect.Method.invoke(Unknown Source) at com.sun.javaws.Launcher.executeApplication(Unknown Source) at com.sun.javaws.Launcher.executeMainClass(Unknown Source) at com.sun.javaws.Launcher.doLaunchApp(Unknown Source) at com.sun.javaws.Launcher.run(Unknown Source) at java.lang.Thread.run(Unknown Source) Caused by: java.lang.NullPointerException at java.util.logging.Logger.setParent(Unknown Source) at java.util.logging.LogManager$6.run(Unknown Source) at java.security.AccessController.doPrivileged(Native Method) at java.util.logging.LogManager.doSetParent(Unknown Source) at java.util.logging.LogManager.access$1100(Unknown Source) at java.util.logging.LogManager$LogNode.walkAndSetParent(Unknown Source) at java.util.logging.LogManager$LoggerContext.addLocalLogger(Unknown Source) at java.util.logging.LogManager$LoggerContext.addLocalLogger(Unknown Source) at java.util.logging.LogManager.addLogger(Unknown Source) at java.util.logging.LogManager$1.run(Unknown Source) at java.security.AccessController.doPrivileged(Native Method) at java.util.logging.LogManager.<clinit>(Unknown Source) REPRODUCIBILITY : This bug can be reproduced always. ---------- BEGIN SOURCE ---------- a simple logging enabled applet ---------- END SOURCE ---------- CUSTOMER SUBMITTED WORKAROUND : Select "Enable Logging"

    JDK Bug System | 3 years ago | Alan Bateman
    java.lang.ExceptionInInitializerError
  3. 0

    NPE with logging while launching webstart on jre7 update 40

    Stack Overflow | 3 years ago | atulsm
    java.lang.ExceptionInInitializerError
  4. Speed up your debug routine!

    Automated exception search integrated into your IDE

    Not finding the right solution?
    Take a tour to get the most out of Samebug.

    Tired of useless tips?

    Automated exception search integrated into your IDE

    Root Cause Analysis

    1. java.lang.NullPointerException

      No message provided

      at java.util.logging.Logger.setParent()
    2. Java RT
      Logger.getLogger
      1. java.util.logging.Logger.setParent(Logger.java:1560)
      2. java.util.logging.LogManager$6.run(LogManager.java:990)
      3. java.security.AccessController.doPrivileged(Native Method)
      4. java.util.logging.LogManager.doSetParent(LogManager.java:988)
      5. java.util.logging.LogManager.access$1100(LogManager.java:148)
      6. java.util.logging.LogManager$LogNode.walkAndSetParent(LogManager.java:1401)
      7. java.util.logging.LogManager$LoggerContext.addLocalLogger(LogManager.java:654)
      8. java.util.logging.LogManager$LoggerContext.addLocalLogger(LogManager.java:584)
      9. java.util.logging.LogManager.addLogger(LogManager.java:949)
      10. java.util.logging.LogManager$1.run(LogManager.java:201)
      11. java.security.AccessController.doPrivileged(Native Method)
      12. java.util.logging.LogManager.<clinit>(LogManager.java:173)
      13. java.util.logging.Logger.demandLogger(Logger.java:336)
      14. java.util.logging.Logger.getLogger(Logger.java:390)
      14 frames
    3. com.sun.deploy
      LoggerTraceListener.getOrCreateSharedInstance
      1. com.sun.deploy.trace.LoggerTraceListener.<init>(Unknown Source)
      2. com.sun.deploy.trace.LoggerTraceListener.getOrCreateSharedInstance(Unknown Source)
      2 frames
    4. sun.plugin
      JavaRunTime.initTraceEnvironment
      1. sun.plugin.JavaRunTime.initTraceEnvironment(Unknown Source)
      1 frame
    5. sun.plugin2.applet
      Applet2Environment$2.run
      1. sun.plugin2.applet.Applet2Environment$2.run(Unknown Source)
      1 frame
    6. Java RT
      Thread.run
      1. java.lang.Thread.run(Thread.java:744)
      1 frame