JDK-6903771 : Plugin3: Applet fails to load classes from /lib/applet
  • Type: Bug
  • Component: deploy
  • Sub-Component: plugin
  • Affected Version: 6u23
  • Priority: P2
  • Status: Closed
  • Resolution: Cannot Reproduce
  • OS: generic
  • CPU: generic
  • Submitted: 2009-11-23
  • Updated: 2011-03-28
  • Resolved: 2011-03-28
The Version table provides details related to the release that this issue/RFE will be addressed.

Unresolved : Release in which this issue/RFE will be addressed.
Resolved: Release in which this issue/RFE has been resolved.
Fixed : Release in which this issue/RFE has been fixed. The release containing this fix may be available for download as an Early Access Release or a General Availability Release.

To download the current JDK release, click here.
JDK 7
7Resolved
Related Reports
Relates :  
Description
With Plugin3 applets fails to load classes from jars sitting inside <jre>/lib/applet 

Steps to reproduce:
------------------
1) Copy hostile.jar from following location and copy it inside the <jre>/lib/applet directory
http://sqeweb.sfbay.sun.com/deployment2/jitu/deployment_mustang_exec_ws/deployment/src/plugin/AppletSecurity/AppletSecurity/lib/
2) try to load applet 
http://sqeweb.sfbay.sun.com/deployment2/jitu/deployment_mustang_exec_ws/deployment/src/plugin/AppletSecurity/AppletSecurity/html/app_security02.html
If applets fail to load by throwing following exception then bug is reproduced
java.lang.reflect.InvocationTargetException
	at sun.plugin2.awtless.impl.awt.ui.UIEventUtilImpl.invokeAndWait(Unknown Source)
	at sun.plugin2.applet.Plugin2Manager.runOnEDT(Unknown Source)
	at sun.plugin2.applet.Plugin2Manager.createAppletObjectRaw(Unknown Source)
	at sun.plugin2.applet.Plugin2Manager.createAppletObject(Unknown Source)
	at sun.plugin2.applet.Plugin2Manager$AppletExecutionRunnable.run(Unknown Source)
	at java.lang.Thread.run(Unknown Source)
Caused by: java.lang.RuntimeException: java.lang.NoClassDefFoundError: StaticHolder
	at sun.plugin2.applet.Plugin2Manager$13.run(Unknown Source)
	at java.awt.event.InvocationEvent.dispatch(Unknown Source)
	at java.awt.EventQueue.dispatchEvent(Unknown Source)
	at java.awt.EventDispatchThread.pumpOneEventForFilters(Unknown Source)
	at java.awt.EventDispatchThread.pumpEventsForFilter(Unknown Source)
	at java.awt.EventDispatchThread.pumpEventsForHierarchy(Unknown Source)
	at java.awt.EventDispatchThread.pumpEvents(Unknown Source)
	at java.awt.EventDispatchThread.pumpEvents(Unknown Source)
	at java.awt.EventDispatchThread.run(Unknown Source)
Caused by: java.lang.NoClassDefFoundError: StaticHolder
	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)
	... 9 more
Caused by: java.lang.ClassNotFoundException: StaticHolder
	at sun.plugin2.applet.Applet2ClassLoader.findClass(Unknown Source)
	at java.lang.ClassLoader.loadClass(Unknown Source)
	at java.lang.ClassLoader.loadClass(Unknown Source)
	... 14 more
Caused by: java.io.IOException: open HTTP connection failed:http://sqeweb.sfbay.sun.com/deployment2/jitu/deployment_mustang_exec_ws/deployment/src/plugin/AppletSecurity/AppletSecurity/classes/wwwX/StaticHolder.class
	at sun.plugin2.applet.Applet2ClassLoader.getBytes(Unknown Source)
	at sun.plugin2.applet.Applet2ClassLoader.access$000(Unknown Source)
	at sun.plugin2.applet.Applet2ClassLoader$1.run(Unknown Source)
	at java.security.AccessController.doPrivileged(Native Method)
	... 17 more
java.lang.NoClassDefFoundError: Appletmain
	at java.lang.ClassLoader.defineClass1(Native Method)
	at java.lang.ClassLoader.defineClassCond(Unknown Source)
	at java.lang.ClassLoader.defineClass(Unknown Source)
	at java.security.SecureClassLoader.defineClass(Unknown Source)
	at sun.plugin2.applet.Applet2ClassLoader.findClass(Unknown Source)
	at java.lang.ClassLoader.loadClass(Unknown Source)
	at java.lang.ClassLoader.loadClass(Unknown Source)
	at sun.plugin2.applet.Plugin2ClassLoader.loadCode(Unknown Source)
	at sun.plugin2.applet.Plugin2Manager.createAppletObjectRaw(Unknown Source)
	at sun.plugin2.applet.Plugin2Manager.createAppletObject(Unknown Source)
	at sun.plugin2.applet.Plugin2Manager$AppletExecutionRunnable.run(Unknown Source)
	at java.lang.Thread.run(Unknown Source)
Caused by: java.lang.ClassNotFoundException: Appletmain
	at sun.plugin2.applet.Applet2ClassLoader.findClass(Unknown Source)
	at java.lang.ClassLoader.loadClass(Unknown Source)
	at java.lang.ClassLoader.loadClass(Unknown Source)
	... 12 more
Caused by: java.io.IOException: open HTTP connection failed:http://sqeweb.sfbay.sun.com/deployment2/jitu/deployment_mustang_exec_ws/deployment/src/plugin/AppletSecurity/AppletSecurity/classes/wwwY/Appletmain.class
	at sun.plugin2.applet.Applet2ClassLoader.getBytes(Unknown Source)
	at sun.plugin2.applet.Applet2ClassLoader.access$000(Unknown Source)
	at sun.plugin2.applet.Applet2ClassLoader$1.run(Unknown Source)
	at java.security.AccessController.doPrivileged(Native Method)
	... 15 more
Exception: java.lang.NoClassDefFoundError: Appletmain
Exception: java.lang.reflect.InvocationTargetException
java.lang.NullPointerException
	at sun.plugin2.applet.Plugin2Manager.findAppletJDKLevel(Unknown Source)
	at sun.plugin2.applet.Plugin2Manager.createAppletObjectRaw(Unknown Source)
	at sun.plugin2.applet.Plugin2Manager.createAppletObject(Unknown Source)
	at sun.plugin2.applet.Plugin2Manager$AppletExecutionRunnable.run(Unknown Source)
	at java.lang.Thread.run(Unknown Source)
Exception: java.lang.NullPointerException
java.lang.reflect.InvocationTargetException
	at sun.plugin2.awtless.impl.awt.ui.UIEventUtilImpl.invokeAndWait(Unknown Source)
	at sun.plugin2.applet.Plugin2Manager.runOnEDT(Unknown Source)
	at sun.plugin2.applet.Plugin2Manager.createAppletObjectRaw(Unknown Source)
	at sun.plugin2.applet.Plugin2Manager.createAppletObject(Unknown Source)
	at sun.plugin2.applet.Plugin2Manager$AppletExecutionRunnable.run(Unknown Source)
	at java.lang.Thread.run(Unknown Source)
Caused by: java.lang.RuntimeException: java.lang.NoClassDefFoundError: B
	at sun.plugin2.applet.Plugin2Manager$13.run(Unknown Source)
	at java.awt.event.InvocationEvent.dispatch(Unknown Source)
	at java.awt.EventQueue.dispatchEvent(Unknown Source)
	at java.awt.EventDispatchThread.pumpOneEventForFilters(Unknown Source)
	at java.awt.EventDispatchThread.pumpEventsForFilter(Unknown Source)
	at java.awt.EventDispatchThread.pumpEventsForHierarchy(Unknown Source)
	at java.awt.EventDispatchThread.pumpEvents(Unknown Source)
	at java.awt.EventDispatchThread.pumpEvents(Unknown Source)
	at java.awt.EventDispatchThread.run(Unknown Source)
Caused by: java.lang.NoClassDefFoundError: B
	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)
	... 9 more
Caused by: java.lang.ClassNotFoundException: B
	at sun.plugin2.applet.Applet2ClassLoader.findClass(Unknown Source)
	at java.lang.ClassLoader.loadClass(Unknown Source)
	at java.lang.ClassLoader.loadClass(Unknown Source)
	... 14 more
Caused by: java.io.IOException: open HTTP connection failed:http://sqeweb.sfbay.sun.com/deployment2/jitu/deployment_mustang_exec_ws/deployment/src/plugin/AppletSecurity/AppletSecurity/classes/wwwA/B.class
	at sun.plugin2.applet.Applet2ClassLoader.getBytes(Unknown Source)
	at sun.plugin2.applet.Applet2ClassLoader.access$000(Unknown Source)
	at sun.plugin2.applet.Applet2ClassLoader$1.run(Unknown Source)
	at java.security.AccessController.doPrivileged(Native Method)
	... 17 more
Exception: java.lang.reflect.InvocationTargetException
java.lang.NullPointerException
	at sun.plugin2.applet.Plugin2Manager.findAppletJDKLevel(Unknown Source)
	at sun.plugin2.applet.Plugin2Manager.createAppletObjectRaw(Unknown Source)
	at sun.plugin2.applet.Plugin2Manager.createAppletObject(Unknown Source)
	at sun.plugin2.applet.Plugin2Manager$AppletExecutionRunnable.run(Unknown Source)
	at java.lang.Thread.run(Unknown Source)
Exception: java.lang.NullPointerException

Comments
EVALUATION Not reproducible with latest deploy PIT build on 3/24.
28-03-2011

SUGGESTED FIX http://sa.sfbay.sun.com/projects/deployment_data/6u20/6903771
26-11-2009

EVALUATION After checking the plugin3 source code, this bug is due to the fix for 6891332 hasn't been merged into the plugin3 source yet.
23-11-2009