Uploaded image for project: 'JDK'
  1. JDK
  2. JDK-7169288

ClassNotFoundException for an applet with SSL and Client Authentication

XMLWordPrintable

    • Icon: Bug Bug
    • Resolution: Not an Issue
    • Icon: P4 P4
    • 7u40
    • 7
    • deploy
    • x86
    • windows_7

      FULL PRODUCT VERSION :
      java version "1.7.0_03"
      Java(TM) SE Runtime Environment (build 1.7.0_03-b05)
      Java HotSpot(TM) Client VM (build 22.1-b02, mixed mode, sharing)

      ADDITIONAL OS VERSION INFORMATION :
      Microsoft Windows [Version 6.1.7601]

      EXTRA RELEVANT SYSTEM CONFIGURATION :
      i tested it with an Apache Tomcat 6.0.35 and Firefox 12.0

      A DESCRIPTION OF THE PROBLEM :
      Loading an applet where the server is configured for client authentication causes a ClassNotFoundException for the applet class at least in firefox.

      I tried all possible tags to define an applet (embed, applet, object), all of them leading to the same exception, where the class is not found. I also tried to load the class from an archive, with no success.

      It just works, when i set the clientAuth attribute to "false" in the server.xml, so i guess it has something to do with client authentication.

      STEPS TO FOLLOW TO REPRODUCE THE PROBLEM :
      1. Install an apache tomcat 6.0.35

      2. configure the tomcat for client authentication

      a. insert the following connector in the server.xml:
      <Connector SSLEnabled="true" clientAuth="true" keystoreFile="ssl/keystore.jks" keystorePass="tomcat" maxThreads="150" port="8443" protocol="HTTP/1.1" scheme="https" secure="true" sslProtocol="TLS" truststoreFile="ssl/truststore.jks" truststorePass="tomcat"/>

      here are my sample trust- and keystore + a sample client certificate:
      https://github.com/spuckydaslama/bugreport.appletandclientauth/downloads

      b. copy truststore.jks and keystore.jks to <tomcatinstallation>/ssl

      c. import the tomcat.p12 into your firefox

      3. Deploy/copy the following webapp the tomcat installation:
      https://github.com/downloads/spuckydaslama/bugreport.appletandclientauth/appletandclientauth.zip

      the webapp includes an index.html loading a simple applet which prints out a line on start.

      4. start the server and browse to https://localhost:8443/appletandclientauth/


      EXPECTED VERSUS ACTUAL BEHAVIOR :
      EXPECTED -
      The applet is started without exceptions.
      ACTUAL -
      An exception is thrown (see below) and the applet therefore cannot be started.

      ERROR MESSAGES/STACK TRACES THAT OCCUR :
      network: Verbindung von https://localhost:8443/appletandclientauth/bugreport/appletandclientauth/SimpleApplet.class mit Proxy=DIRECT wird hergestellt
      network: Verbindung von http://localhost:8443/ mit Proxy=DIRECT wird hergestellt
      security: Zertifikate werden aus Deployment-Session-Zertifikatspeicher geladen
      security: Zertifikate wurden aus Deployment-Session-Zertifikatspeicher geladen
      security: Zertifikat wird im Zertifikatspeicher "Deployment denied" gesucht
      security: Zertifikat wird in Deployment-Session-Zertifikatspeicher gesucht
      network: Verbindung von https://localhost:8443/appletandclientauth/bugreport/appletandclientauth/SimpleApplet/class.class mit Proxy=DIRECT wird hergestellt
      network: Verbindung von http://localhost:8443/ mit Proxy=DIRECT wird hergestellt
      security: Zertifikate werden aus Deployment-Session-Zertifikatspeicher geladen
      security: Zertifikate wurden aus Deployment-Session-Zertifikatspeicher geladen
      security: Zertifikat wird im Zertifikatspeicher "Deployment denied" gesucht
      security: Zertifikat wird in Deployment-Session-Zertifikatspeicher gesucht
      java.lang.ClassNotFoundException: bugreport.appletandclientauth.SimpleApplet.class
      at sun.plugin2.applet.Applet2ClassLoader.findClass(Unknown Source)
      at sun.plugin2.applet.Plugin2ClassLoader.loadClass0(Unknown Source)
      at sun.plugin2.applet.Plugin2ClassLoader.loadClass(Unknown Source)
      at sun.plugin2.applet.Plugin2ClassLoader.loadClass(Unknown Source)
      at java.lang.ClassLoader.loadClass(Unknown Source)
      at sun.plugin2.applet.Plugin2ClassLoader.loadCode(Unknown Source)
      at sun.plugin2.applet.Plugin2Manager.initAppletAdapter(Unknown Source)
      at sun.plugin2.applet.Plugin2Manager$AppletExecutionRunnable.run(Unknown Source)
      at java.lang.Thread.run(Unknown Source)
      basic: Laden: Klasse bugreport.appletandclientauth.SimpleApplet.class nicht gefunden.
      java.lang.ClassNotFoundException: bugreport.appletandclientauth.SimpleApplet.class
      at sun.plugin2.applet.Applet2ClassLoader.findClass(Unknown Source)
      at sun.plugin2.applet.Plugin2ClassLoader.loadClass0(Unknown Source)
      at sun.plugin2.applet.Plugin2ClassLoader.loadClass(Unknown Source)
      at sun.plugin2.applet.Plugin2ClassLoader.loadClass(Unknown Source)
      at java.lang.ClassLoader.loadClass(Unknown Source)
      at sun.plugin2.applet.Plugin2ClassLoader.loadCode(Unknown Source)
      at sun.plugin2.applet.Plugin2Manager.initAppletAdapter(Unknown Source)
      at sun.plugin2.applet.Plugin2Manager$AppletExecutionRunnable.run(Unknown Source)
      at java.lang.Thread.run(Unknown Source)
      Ignored exception: java.lang.ClassNotFoundException: bugreport.appletandclientauth.SimpleApplet.class
      basic: Fortschritts-Listener entfernt: sun.plugin.util.ProgressMonitorAdapter@dbd984
      security: Speicher für abgelehnte Sessionzertifikate zurücksetzen


      REPRODUCIBILITY :
      This bug can be reproduced always.

            ccheung Calvin Cheung
            webbuggrp Webbug Group
            Votes:
            0 Vote for this issue
            Watchers:
            1 Start watching this issue

              Created:
              Updated:
              Resolved:
              Imported:
              Indexed: