Uploaded image for project: 'JDK'
  1. JDK
  2. JDK-6881931

NPE in findAppletJDKLevel is thrown when NoClassDefFoundError should be thrown

    XMLWordPrintable

Details

    • b05
    • generic, x86
    • generic, windows_xp
    • Verified

    Description

      FULL PRODUCT VERSION :
      Java Plug-in 1.6.0_18
      Using JRE version 1.6.0_18-ea-b02 Java HotSpot(TM) Client VM

      ADDITIONAL OS VERSION INFORMATION :
      Microsoft Windows XP [Version 5.1.2600]

      A DESCRIPTION OF THE PROBLEM :
      When using the next generation java plug-in, and a class file cannot be found in the archive jar file(s), findAppletJDKLevel is thrown as follows:

      java.lang.NullPointerException
      at sun.plugin2.applet.Plugin2Manager.findAppletJDKLevel(Unknown Source)
      at sun.plugin2.applet.Plugin2Manager.createApplet(Unknown Source)
      at sun.plugin2.applet.Plugin2Manager$AppletExecutionRunnable.run(Unknown Source)
      at java.lang.Thread.run(Unknown Source)
      Exception: java.lang.NullPointerException
      Ignored exception: java.lang.NullPointerException



      STEPS TO FOLLOW TO REPRODUCE THE PROBLEM :
      1) Close all browsers, ensuring that there are no plugin coffee cup icons in the Windows taskbar.
      2) Open the Java Control panel (Start->Control Panel->Java).
      2.5) On the General tab, clear cache by clicking Settings..., Delete Files..., OK.
      3) Open the Advanced tab.
      4) Expand the Java Plug-in tree option.
      5) Ensure that the "Enable the next-generation Java Plug-in" option is checked and click OK.
      6) Visit page http://www.printdesktop.com/IeTabbedCrash/IeTabbedCrash.html
      7) View the java console stacktrace. It should include findAppletJDKLevel message.

      Now, to see the correct error message (NoClassDefFoundError) displayed, follow these steps:
      1) Close all browsers, ensuring that there are no plugin coffee cup icons in the Windows taskbar.
      2) Open the Java Control panel (Start->Control Panel->Java).
      2.5) On the General tab, clear cache by clicking Settings..., Delete Files..., OK.
      3) Open the Advanced tab.
      4) Expand the Java Plug-in tree option.
      5) Ensure that the "Enable the next-generation Java Plug-in" option is NOT checked and click OK.
      6) Visit page http://www.printdesktop.com/IeTabbedCrash/IeTabbedCrash.html
      7) View the java console stacktrace. It should include NoClassDefFoundError error message.

      EXPECTED VERSUS ACTUAL BEHAVIOR :
      EXPECTED -
      See a useful stacktrace:

      java.lang.NoClassDefFoundError: IeTabbedCrash$2
      at java.lang.Class.getDeclaredConstructors0(Native Method)
      at java.lang.Class.privateGetDeclaredConstructors(Unknown Source)
      at java.lang.Class.getConstructor0(Unknown Source)
      at java.lang.Class.newInstance0(Unknown Source)
      at java.lang.Class.newInstance(Unknown Source)
      at sun.applet.AppletPanel.createApplet(Unknown Source)
      at sun.plugin.AppletViewer.createApplet(Unknown Source)
      at sun.applet.AppletPanel.runLoader(Unknown Source)
      at sun.applet.AppletPanel.run(Unknown Source)
      at java.lang.Thread.run(Unknown Source)
      Caused by: java.lang.ClassNotFoundException: IeTabbedCrash$2
      at sun.applet.AppletClassLoader.findClass(Unknown Source)
      at java.lang.ClassLoader.loadClass(Unknown Source)
      at sun.applet.AppletClassLoader.loadClass(Unknown Source)
      at java.lang.ClassLoader.loadClass(Unknown Source)
      ... 10 more
      Ignored exception: java.lang.NoClassDefFoundError: IeTabbedCrash$2

      ACTUAL -
      See this misleading stacktrace:

      java.lang.NullPointerException
      at sun.plugin2.applet.Plugin2Manager.findAppletJDKLevel(Unknown Source)
      at sun.plugin2.applet.Plugin2Manager.createApplet(Unknown Source)
      at sun.plugin2.applet.Plugin2Manager$AppletExecutionRunnable.run(Unknown Source)
      at java.lang.Thread.run(Unknown Source)
      Exception: java.lang.NullPointerException
      Ignored exception: java.lang.NullPointerException

      ERROR MESSAGES/STACK TRACES THAT OCCUR :
      java.lang.NullPointerException
      at sun.plugin2.applet.Plugin2Manager.findAppletJDKLevel(Unknown Source)
      at sun.plugin2.applet.Plugin2Manager.createApplet(Unknown Source)
      at sun.plugin2.applet.Plugin2Manager$AppletExecutionRunnable.run(Unknown Source)

      REPRODUCIBILITY :
      This bug can be reproduced always.

      ---------- BEGIN SOURCE ----------
      http://www.printdesktop.com/IeTabbedCrash/IeTabbedCrash.jar
      ---------- END SOURCE ----------

      CUSTOMER SUBMITTED WORKAROUND :
      Disable the Next-generation java plug-in.

      Attachments

        Issue Links

          Activity

            People

              ccheung Calvin Cheung
              ryeung Roger Yeung (Inactive)
              Votes:
              0 Vote for this issue
              Watchers:
              1 Start watching this issue

              Dates

                Created:
                Updated:
                Resolved:
                Imported:
                Indexed: