Name: skT88420 Date: 05/06/99
This bug report actually refers to the Java Plug-In 1.2.2
provided with the JDK 1.2.2 EA release. The Plug-In crashes with
a NullPointerException when handling applet calls with
non-existent jar-archives (see details below) while going over
a https-connection.
The initial webpage for our applet contains the following
call for our applet:
<OBJECT ID="ilm" classid="clsid:8AD9C840-044E-11D1-B3E9-00805F499D93"
WIDTH = 100% HEIGHT = 100% NAME = "ILM" ALIGN = middle VSPACE = 0 HSPACE = 0 codebase="http://java.sun.com/products/plugin/1.2/jinstall-12-win32.cab#Version=1,2,0,0">
<PARAM NAME = ARCHIVE VALUE = "ilm.jar" >
<PARAM NAME = CODE VALUE = "de.prodv.ilm.ILM.class" >
<PARAM NAME = NAME VALUE = "ILM" >
<PARAM NAME="type" VALUE="application/x-java-applet;version=1.2">
<COMMENT>
<EMBED type="application/x-java-applet;version=1.2" java_CODE = "de.prodv.ilm.ILM.class"
NAME = "TestApplet" WIDTH=100% HEIGHT=100% ALIGN = middle VSPACE = 0 HSPACE = 0 pluginspage="http://java.sun.com/products/plugin/1.2/plugin-install.html" archive=ilm.jar"><NOEMBED></COMMENT>
<font face=Verdana,Helvetica,Arial>
<b>JAVA</b> muß aktiviert sein, um ILM nutzen zu können.
</font>
</NOEMBED></EMBED>
</OBJECT>
The important thing about the call is that we define an archive
called 'ilm.jar' to be loaded. In our test environment during
development time we usually do not create the jar-archive to
save some time between compilation stages. This works fine
when calling the applet over a normal http-URL: If the jar
archive exists on the server, it is loaded, otherwise the
classes in the corresponding directory are loaded directly.
Now we are evaluating the Plug-In contained in the JDK 1.2.2
EA release to determine whether https works for us. Except
for one bug this seems to work: when the jar-archive above is not
available on the web server we get the following NullPointerException:
java.lang.NullPointerException
at sun.net.www.protocol.jar.JarFileFactory$1.run(JarFileFactory.java:157)
at java.security.AccessController.doPrivileged(Native Method)
at sun.net.www.protocol.jar.JarFileFactory.retrieve(JarFileFactory.java:146)
at sun.net.www.protocol.jar.JarFileFactory.get(JarFileFactory.java:86)
at sun.net.www.protocol.jar.JarURLConnection.connect(JarURLConnection.java:92)
at sun.net.www.protocol.jar.JarURLConnection.getJarFile(JarURLConnection.java:76)
at sun.misc.URLClassPath$JarLoader.getJarFile(URLClassPath.java:443)
at sun.misc.URLClassPath$JarLoader.<init>(URLClassPath.java:427)
at sun.misc.URLClassPath$2.run(URLClassPath.java:250)
at java.security.AccessController.doPrivileged(Native Method)
at sun.misc.URLClassPath.getLoader(URLClassPath.java:240)
at sun.misc.URLClassPath.getLoader(URLClassPath.java:216)
at sun.misc.URLClassPath.getResource(URLClassPath.java:131)
at java.net.URLClassLoader$1.run(URLClassLoader.java:194)
at java.security.AccessController.doPrivileged(Native Method)
at java.net.URLClassLoader.findClass(URLClassLoader.java:191)
at sun.applet.AppletClassLoader.findClass(AppletClassLoader.java:132)
at java.lang.ClassLoader.loadClass(ClassLoader.java:290)
at sun.applet.AppletClassLoader.loadClass(AppletClassLoader.java:112)
at java.lang.ClassLoader.loadClass(ClassLoader.java:247)
at sun.applet.AppletClassLoader.loadCode(AppletClassLoader.java:372)
at sun.applet.AppletPanel.createApplet(AppletPanel.java:508)
at sun.plugin.AppletViewer.createApplet(AppletViewer.java:763)
at sun.applet.AppletPanel.runLoader(AppletPanel.java:444)
at sun.applet.AppletPanel.run(AppletPanel.java:282)
at java.lang.Thread.run(Thread.java:479)
The same applet tag works fine when loading the applet over http, so it seems that your https-code fails to check whether a jar file could be loaded or not.
(Review ID: 57889)
======================================================================