United StatesChange Country, Oracle Worldwide Web Sites Communities I am a... I want to...
Bug ID: JDK-6753380 lazy package and parts does not work in jnlp applets with new plugin
JDK-6753380 : lazy package and parts does not work in jnlp applets with new plugin

Details
Type:
Bug
Submit Date:
2008-09-26
Status:
Closed
Updated Date:
2010-09-08
Project Name:
JDK
Resolved Date:
2009-01-21
Component:
deploy
OS:
generic
Sub-Component:
plugin
CPU:
generic
Priority:
P3
Resolution:
Fixed
Affected Versions:
6u10
Fixed Versions:
6u12 (b01)

Related Reports

Sub Tasks

Description
testcase:  http://javaweb.sfbay.sun.com/~ngthomas/lazypart/testJNLPApplet.html

source:  http://javaweb.sfbay.sun.com/~ngthomas/lazypart/testApplet.java

a simple applet that calls into a method in draw package (draw.drawFoo.hello())

draw.jar is listed in a component-ext jnlp file, with the package tag.

    <jar href="draw.jar" part="draw" download="lazy"/>
<package name="draw.*" part="draw"/>

when you load the applet, exception is thrown:

Hello World testApplet!
basic: JNLP2ClassLoader.findClass: draw.drawfoo: try again ..
basic: Removed progress listener: null
Exception in thread "thread applet-testApplet-1" java.lang.NoClassDefFoundError: draw/drawfoo
	at testApplet.init(testApplet.java:26)
	at sun.plugin2.applet.Plugin2Manager$AppletExecutionRunnable.run(Unknown Source)
	at java.lang.Thread.run(Unknown Source)
Caused by: java.lang.ClassNotFoundException: draw.drawfoo
	at sun.plugin2.applet.Plugin2ClassLoader$3.run(Unknown Source)
	at java.security.AccessController.doPrivileged(Native Method)
	at sun.plugin2.applet.Plugin2ClassLoader.findClassHelper(Unknown Source)
	at sun.plugin2.applet.JNLP2ClassLoader.findClass(Unknown Source)
	at java.lang.ClassLoader.loadClass(Unknown Source)
	at java.lang.ClassLoader.loadClass(Unknown Source)
	at java.lang.ClassLoader.loadClassInternal(Unknown Source)
	... 3 more


but if you remove the "package" tag line from the jnlp file, it works.

draw.jar contains a bunch of classes, including:
  402 Thu Sep 18 15:15:56 PDT 2008 draw/drawfoo.class

                                    

Comments
WORK AROUND

remove the "package" tag line from the jnlp file
                                     
2008-09-26
EVALUATION

JNLP2ClassLoader store lazy package parts in a list. There is a bug when compare the requested jar with the contents in the list. It compares Object which is not the same even the two object describe the same jar.
                                     
2008-10-21



Hardware and Software, Engineered to Work Together