I have an applet which loads nicely when accessed locally (both IE and Firefox).
However, when I put my webpage in a webserver (local IPlanet), it refuses to load on Firefox (but still fine on IE). I get the following error in the java console:
load: class XXX.localprinting.LocalPrintingApplet.class not found.
java.lang.ClassNotFoundException: XXX.localprinting.LocalPrintingApplet.class
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.createApplet(Unknown Source)
at sun.plugin2.applet.Plugin2Manager$AppletExecutionRunnable.run(Unknown Source)
at java.lang.Thread.run(Unknown Source)
Caused by: java.io.IOException: open HTTP connection failed:https://XXX/test/XXX/localprinting/LocalPrintingApplet/class.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)
... 7 more
Exception: java.lang.ClassNotFoundException: XXX.localprinting.LocalPrintingApplet.class
[EDIT] By enabling more trace in the java console, I actually get to the root issue :
network: Connecting http://ZZZ:443/ with proxy=DIRECT
security: Loading Root CA certificates from C:\Program Files\Java\jre6\lib\security\cacerts
security: Loaded Root CA certificates from C:\Program Files\Java\jre6\lib\security\cacerts
security: Loading SSL Root CA certificates from C:\Program Files\Java\jre6\lib\security\cacerts
security: Loaded SSL Root CA certificates from C:\Program Files\Java\jre6\lib\security\cacerts
security: Loading Deployment SSL certificates from C:\Documents and Settings\ZZZ\Application Data\Sun\Java\Deployment\security\trusted.jssecerts
security: Loaded Deployment SSL certificates from C:\Documents and Settings\ZZZ\Application Data\Sun\Java\Deployment\security\trusted.jssecerts
security: Loading certificates from Deployment session certificate store
security: Loaded certificates from Deployment session certificate store
security: Checking if certificate is in Deployment denied certificate store
security: Checking if certificate is in Deployment session certificate store
security: Checking if SSL certificate is in Deployment permanent certificate store
network: Connecting https://ZZZ/modules/print/applet/LocalPrinting.jar with cookie "aria_user_profile={DSƌ!,!C!"ÍÔaÃæK9eä|IC¦!A:i̤!?!7æâ!A7!*E!%!'!F"ú°!4QÎ!B:N´)!'RJ6a\IS"
network: Connecting https://ZZZ/modules/print/applet/LocalPrinting.jar with proxy=DIRECT
network: Connecting http://ZZZ:443/ with proxy=DIRECT
network: Connecting https://ZZZ/modules/print/applet/LocalPrinting.jar with cookie "aria_user_profile={DSƌ!,!C!"ÍÔaÃæK9eä|IC¦!A:i̤!?!7æâ!A7!*E!%!'!F"ú°!4QÎ!B:N´)!'RJ6a\IS"
**java.io.IOException: Server returned HTTP response code: 400 for URL: https://ZZZ/modules/print/applet/LocalPrinting.jar**
at sun.net.www.protocol.http.HttpURLConnection.getInputStream(Unknown Source)
at sun.net.www.protocol.https.HttpsURLConnectionImpl.getInputStream(Unknown Source)
at sun.plugin.PluginURLJarFileCallBack.downloadJAR(Unknown Source)
at sun.plugin.PluginURLJarFileCallBack.access$000(Unknown Source)
at sun.plugin.PluginURLJarFileCallBack$2.run(Unknown Source)
However, by using the URL https://ZZZ/modules/print/applet/LocalPrinting.jar, I can successfully download the jar.
Any idea what could explain the different behavior in the webserver?
I researched the issue of "class not found" already but without finding something relevant.
Some additional information:
The applet uses a jar file which should be downloaded. However, I can see in the logs that it tries to download the class file
172.16.195.55 - - [10/Jun/2010:11:47:45 +0200] "GET /XXXX/apf/init/XXXX/localprinting/LocalPrintingApplet.class HTTP/1.1" 400 147
It works locally (no webserver) on IE/Firefox/Chrome
- It works with Tomcat on IE/Firefox/Chrome
- It works with Iplanet on IE/Chrome
- It does not work on Iplanet with Firefox (with or without HTTPS)
- (when I say Iplanet, it's Iplanet for static content and Weblogic for J2EE stuff)
HTML code as given by Firefox in Firebug HTML tab:
<object width="0" height="0" id="eprint_printingApplet" classid="clsid:CAFEEFAC-0015-0000-FFFF-ABCDEFFEDCBA">
<param value="application/x-java-applet;version=1.5" name="type">
<param value="/modules/print/applet/LocalPrinting.jar" name="archive">
<param value="xxx.localprinting.LocalPrintingApplet.class" name="code">
<param value="true" name="mayscript">
<param value="printingApplet" name="name">
<param value="pdt1.glb.XXXX.net,pdt2.glb.XXXX.net" name="host">
<param value="10244" name="port">
<param value="" name="password">
<param value="XXXX" name="unto">
<param value="APPLET" name="env.applicationLabel">
<param value="1" name="env.applicationIndex">
<param value="6X" name="env.XXXX">
<comment>
<embed width="0" height="0" env.XXXX="6X" env.applicationindex="1" env.applicationlabel="APPLET" unto="XXXX" password="" port="10244" host="pdt1.glb.XXXX.net,pdt2.glb.XXXX.net" mayscript="true" name="printingApplet" code="XXXX.localprinting.LocalPrintingApplet.class" archive="/modules/print/applet/LocalPrinting.jar" type="application/x-java-applet;version=1.5">
<noembed>No Java Runtime Environment v5.0 support for applet installed</noembed>
</comment>