title: Applets in IPlanet with Firefox (class not found)
body: <p>I have an applet which loads nicely when accessed locally (both IE and Firefox).</p>
  
  <p>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:</p>
  
  <pre><code>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
  </code></pre>
  
  <p>[EDIT]
  By enabling more trace in the java console, I actually get to the root issue :</p>
  
  <pre><code>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)
  </code></pre>
  
  <p>However, by using the URL <a href="https://ZZZ/modules/print/applet/LocalPrinting.jar" rel="nofollow noreferrer">https://ZZZ/modules/print/applet/LocalPrinting.jar</a>, I can successfully download the jar.</p>
  
  <p>Any idea what could explain the different behavior in the webserver?
  <br />I researched the issue of "class not found" already but without finding something relevant.</p>
  
  <p>Some additional information:</p>
  
  <ul>
  <li><p>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</p>
  
  <p>172.16.195.55 - - [10/Jun/2010:11:47:45 +0200] "GET /XXXX/apf/init/XXXX/localprinting/LocalPrintingApplet.class HTTP/1.1" 400 147</p></li>
  <li><p>It works locally (no webserver) on IE/Firefox/Chrome</p></li>
  <li>It works with Tomcat on IE/Firefox/Chrome</li>
  <li>It works with Iplanet on IE/Chrome</li>
  <li><strong>It does not work on Iplanet with Firefox (with or without HTTPS)</strong></li>
  <li>(when I say Iplanet, it's Iplanet for static content and Weblogic for J2EE stuff)</li>
  </ul>
  
  <p>HTML code as given by Firefox in Firebug HTML tab:</p>
  
  <pre><code>&lt;object width="0" height="0" id="eprint_printingApplet" classid="clsid:CAFEEFAC-0015-0000-FFFF-ABCDEFFEDCBA"&gt;
      &lt;param value="application/x-java-applet;version=1.5" name="type"&gt;
      &lt;param value="/modules/print/applet/LocalPrinting.jar" name="archive"&gt;
      &lt;param value="xxx.localprinting.LocalPrintingApplet.class" name="code"&gt;
      &lt;param value="true" name="mayscript"&gt;
      &lt;param value="printingApplet" name="name"&gt;
      &lt;param value="pdt1.glb.XXXX.net,pdt2.glb.XXXX.net" name="host"&gt;
      &lt;param value="10244" name="port"&gt;
      &lt;param value="" name="password"&gt;
      &lt;param value="XXXX" name="unto"&gt;
      &lt;param value="APPLET" name="env.applicationLabel"&gt;
      &lt;param value="1" name="env.applicationIndex"&gt;
      &lt;param value="6X" name="env.XXXX"&gt;
  
      &lt;comment&gt;
          &lt;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"&gt;
          &lt;noembed&gt;No Java Runtime Environment v5.0 support for applet installed&lt;/noembed&gt;
      &lt;/comment&gt;
  </code></pre>
  
  <p></p>