title: applet in Java7 not working after signing jar
body: <p>We used to have an applet in an Alfresco application which was build and compiled in Java 6. since our systems needed to update to Java7 JVM the applet launch started to show all those anoying security messages and it was quite a pain for our users. </p>
  
  <p>We readed the guideness of Java7 and it seems that we just needed to sign our jars involved in the applet with CA certificate. We did so and now all our jars are signed with the certificate correctly following the Java 7 guide and using Keystore tool. However we have found two issues now with all the applets that invoke these signed jars (for this example I am gonna show only one of our applets)</p>
  
  <p>1) Applets take a lot now to load (before signing and in Java6 JVM used to take 15 secs and now we are talking about minutes!!!).</p>
  
  <p>2) We find the ClassNotfoundException issue that avoids our applets to work.</p>
  
  <p>Most important problem for us is the second issue "ClassNotFoundException" as after spending days reading about possible solutions we are not able to get it to work.</p>
  
  <p>Our applet is in a jsp page inserted like this code</p>
  
  <pre><code>&lt;applet code="uk.co.mmscomputing.application.imageviewer.MainApp.class" 
          codebase="&lt;%= scan.getUrlAlfrescoApplet() %&gt;" 
          archive="scan-plugin-mmsc_v1.2.jar, alfresco-web-service-client.jar, jai_core.jar, jai_codec.jar, activation.jar, alfresco-core.jar, axis-1.4.jar, bcprov-jdk15-137.jar, commons-discovery-0.2.jar, commons-logging-1.1.jar, jaxrpc.jar, mail.jar, opensaml-1.0.1.jar, saaj.jar, wsdl4j-1.5.1.jar, wsdl4j-1.6.2.jar, wss4j.jar, xalan.jar, xercesImpl-2.8.0.jar, xmlsec-1.4.1.jar" 
          width="100%" height="600" name="Veritas Scan"&gt;
          &lt;PARAM name="scanFile" value="&lt;%= scan.getFileName() %&gt;"&gt;
          &lt;PARAM name="container" value="&lt;%= scan.getSpaceNodeRef().getId() %&gt;"&gt;
          &lt;PARAM name="multipage" value="&lt;%= scan.getFactMultipage() %&gt;"&gt;
          &lt;PARAM name="urlAlfrescoWS" value="&lt;%= scan.getUrlAlfrescoWS() %&gt;"&gt;
          &lt;PARAM name="ocr" value="&lt;%= scan.getOcr() %&gt;"&gt;
          &lt;PARAM name="cif" value="&lt;%= scan.getCIF() %&gt;"&gt;
          &lt;PARAM name="user" value="&lt;%= scan.getUserName() %&gt;"&gt;
          &lt;PARAM name="ticket" value="&lt;%= scan.getTicket() %&gt;"&gt;
          &lt;PARAM name="sessionId" value="&lt;%= scan.getSessionId() %&gt;"&gt;
          &lt;PARAM name="java_arguments" value="-Xmx256m"&gt;
          &lt;PARAM name="java_version" value="1.6*"&gt;
          &lt;PARAM name="separate_jvm" value="true"&gt;
          Your browser does not support the &lt;code&gt;applet&lt;/code&gt; tag.
       &lt;/applet&gt;  
  </code></pre>
  
  <p>and the jars signed are in </p>
  
  <p>tomcat/alfresco/applets</p>
  
  <p>However when we try to launch this applet in its jsp page at the end we get this error message:</p>
  
  <p>ClassNotFoundException</p>
  
  <p>uk.co.mmscomputing.application.imageviewer.MainApp.class</p>
  
  <p>What we see in the java console is this:</p>
  
  <pre><code> Java Plugin 10.55.2.13
  Usando versión de JRE 1.7.0_55-b13 Java HotSpot(TM) Client VM
  Directorio de inicio del usuario = C:\Documents and Settings\Dolores Sanguinetti
  ----------------------------------------------------
  c:   borrar ventana de consola
  f:   finalizar objetos en la cola de finalización
  g:   recopilación de basura
  h:   mostrar este mensaje de ayuda
  l:   volcar lista de classloader
  m:   imprimir uso de memoria
  o:   disparar registro
  q:   ocultar consola
  r:   recargar configuración de política
  s:   volcar propiedades del sistema y de despliegue
  t:   volcar lista de threads
  v:   volcar pila de threads
  x:   borrar caché de classloader
  0-5: definir nivel de rastreo en &lt;n&gt;
  ----------------------------------------------------
  CacheEntry[http://IP_SERVER:8080/alfresco/applets/scan-plugin-mmsc_v1.2.jar]: updateAvailable=true,lastModified=Thu Jun 16 11:51:52 CEST 2011,length=6280199
  CacheEntry[http://IP_SERVER:8080/alfresco/applets/scan-plugin-mmsc_v1.2.jar]: updateAvailable=true,lastModified=Thu Jun 16 11:51:52 CEST 2011,length=6280199
  CacheEntry[http://IP_SERVER:8080/alfresco/applets/alfresco-web-service-client.jar]: updateAvailable=true,lastModified=Fri Nov 29 12:51:54 CET 2013,length=418382
  CacheEntry[http://IP_SERVER:8080/alfresco/applets/alfresco-web-service-client.jar]: updateAvailable=true,lastModified=Fri Nov 29 12:51:54 CET 2013,length=418382
  CacheEntry[http://IP_SERVER:8080/alfresco/applets/jai_core.jar]: updateAvailable=true,lastModified=Fri Oct 01 12:17:30 CEST 2010,length=1966212
  CacheEntry[http://IP_SERVER:8080/alfresco/applets/jai_core.jar]: updateAvailable=true,lastModified=Fri Oct 01 12:17:30 CEST 2010,length=1966212
  CacheEntry[http://IP_SERVER:8080/alfresco/applets/jai_codec.jar]: updateAvailable=true,lastModified=Fri Oct 01 12:17:30 CEST 2010,length=267173
  CacheEntry[http://IP_SERVER:8080/alfresco/applets/jai_codec.jar]: updateAvailable=true,lastModified=Fri Oct 01 12:17:30 CEST 2010,length=267173
  CacheEntry[http://IP_SERVER:8080/alfresco/applets/activation.jar]: updateAvailable=true,lastModified=Mon May 05 23:35:34 CEST 2014,length=59420
  CacheEntry[http://IP_SERVER:8080/alfresco/applets/activation.jar]: updateAvailable=true,lastModified=Mon May 05 23:35:34 CEST 2014,length=59420
  CacheEntry[http://IP_SERVER:8080/alfresco/applets/alfresco-core.jar]: updateAvailable=true,lastModified=Fri Nov 29 12:51:39 CET 2013,length=173167
  CacheEntry[http://IP_SERVER:8080/alfresco/applets/alfresco-core.jar]: updateAvailable=true,lastModified=Fri Nov 29 12:51:39 CET 2013,length=173167
  CacheEntry[http://IP_SERVER:8080/alfresco/applets/axis-1.4.jar]: updateAvailable=true,lastModified=Fri Nov 29 12:52:13 CET 2013,length=1689344
  CacheEntry[http://IP_SERVER:8080/alfresco/applets/axis-1.4.jar]: updateAvailable=true,lastModified=Fri Nov 29 12:52:13 CET 2013,length=1689344
  CacheEntry[http://IP_SERVER:8080/alfresco/applets/bcprov-jdk15-137.jar]: updateAvailable=true,lastModified=Fri Oct 01 12:17:26 CEST 2010,length=1528841
  CacheEntry[http://IP_SERVER:8080/alfresco/applets/bcprov-jdk15-137.jar]: updateAvailable=true,lastModified=Fri Oct 01 12:17:26 CEST 2010,length=1528841
  CacheEntry[http://IP_SERVER:8080/alfresco/applets/commons-discovery-0.2.jar]: updateAvailable=true,lastModified=Fri Nov 29 12:53:01 CET 2013,length=79805
  CacheEntry[http://IP_SERVER:8080/alfresco/applets/commons-discovery-0.2.jar]: updateAvailable=true,lastModified=Fri Nov 29 12:53:01 CET 2013,length=79805
  CacheEntry[http://IP_SERVER:8080/alfresco/applets/commons-logging-1.1.jar]: updateAvailable=true,lastModified=Fri Nov 29 12:53:15 CET 2013,length=58414
  CacheEntry[http://IP_SERVER:8080/alfresco/applets/commons-logging-1.1.jar]: updateAvailable=true,lastModified=Fri Nov 29 12:53:15 CET 2013,length=58414
  CacheEntry[http://IP_SERVER:8080/alfresco/applets/jaxrpc.jar]: updateAvailable=true,lastModified=Fri Nov 29 12:53:40 CET 2013,length=39674
  CacheEntry[http://IP_SERVER:8080/alfresco/applets/jaxrpc.jar]: updateAvailable=true,lastModified=Fri Nov 29 12:53:40 CET 2013,length=39674
  CacheEntry[http://IP_SERVER:8080/alfresco/applets/mail.jar]: updateAvailable=true,lastModified=Fri Nov 29 12:55:43 CET 2013,length=364719
  CacheEntry[http://IP_SERVER:8080/alfresco/applets/mail.jar]: updateAvailable=true,lastModified=Fri Nov 29 12:55:43 CET 2013,length=364719
  CacheEntry[http://IP_SERVER:8080/alfresco/applets/opensaml-1.0.1.jar]: updateAvailable=true,lastModified=Fri Nov 29 12:55:02 CET 2013,length=112773
  CacheEntry[http://IP_SERVER:8080/alfresco/applets/opensaml-1.0.1.jar]: updateAvailable=true,lastModified=Fri Nov 29 12:55:02 CET 2013,length=112773
  CacheEntry[http://IP_SERVER:8080/alfresco/applets/saaj.jar]: updateAvailable=true,lastModified=Fri Oct 01 12:17:28 CEST 2010,length=22324
  CacheEntry[http://IP_SERVER:8080/alfresco/applets/saaj.jar]: updateAvailable=true,lastModified=Fri Oct 01 12:17:28 CEST 2010,length=22324
  CacheEntry[http://IP_SERVER:8080/alfresco/applets/wsdl4j-1.5.1.jar]: updateAvailable=true,lastModified=Fri Oct 01 12:17:28 CEST 2010,length=136990
  CacheEntry[http://IP_SERVER:8080/alfresco/applets/wsdl4j-1.5.1.jar]: updateAvailable=true,lastModified=Fri Oct 01 12:17:28 CEST 2010,length=136990
  CacheEntry[http://IP_SERVER:8080/alfresco/applets/wsdl4j-1.6.2.jar]: updateAvailable=true,lastModified=Fri Nov 29 12:54:19 CET 2013,length=165762
  CacheEntry[http://IP_SERVER:8080/alfresco/applets/wsdl4j-1.6.2.jar]: updateAvailable=true,lastModified=Fri Nov 29 12:54:19 CET 2013,length=165762
  CacheEntry[http://IP_SERVER:8080/alfresco/applets/wss4j.jar]: updateAvailable=true,lastModified=Fri Nov 29 12:54:41 CET 2013,length=323332
  CacheEntry[http://IP_SERVER:8080/alfresco/applets/wss4j.jar]: updateAvailable=true,lastModified=Fri Nov 29 12:54:41 CET 2013,length=323332
  CacheEntry[http://IP_SERVER:8080/alfresco/applets/xalan.jar]: updateAvailable=true,lastModified=Fri Oct 01 12:17:28 CEST 2010,length=3175437
  CacheEntry[http://IP_SERVER:8080/alfresco/applets/xalan.jar]: updateAvailable=true,lastModified=Fri Oct 01 12:17:28 CEST 2010,length=3175437
  CacheEntry[http://IP_SERVER:8080/alfresco/applets/xercesImpl-2.8.0.jar]: updateAvailable=true,lastModified=Fri Oct 01 12:17:28 CEST 2010,length=1280498
  CacheEntry[http://IP_SERVER:8080/alfresco/applets/xercesImpl-2.8.0.jar]: updateAvailable=true,lastModified=Fri Oct 01 12:17:28 CEST 2010,length=1280498
  CacheEntry[http://IP_SERVER:8080/alfresco/applets/xmlsec-1.4.1.jar]: updateAvailable=true,lastModified=Fri Nov 29 12:55:23 CET 2013,length=455842
  CacheEntry[http://IP_SERVER:8080/alfresco/applets/xmlsec-1.4.1.jar]: updateAvailable=true,lastModified=Fri Nov 29 12:55:23 CET 2013,length=455842
  CacheEntry[http://IP_SERVER:8080/alfresco/applets/scan-plugin-mmsc_v1.2.jar]: updateAvailable=true,lastModified=Thu Jun 16 11:51:52 CEST 2011,length=6280199
  CacheEntry[http://IP_SERVER:8080/alfresco/applets/scan-plugin-mmsc_v1.2.jar]: updateAvailable=true,lastModified=Thu Jun 16 11:51:52 CEST 2011,length=6280199
  CacheEntry[http://IP_SERVER:8080/alfresco/applets/alfresco-web-service-client.jar]: updateAvailable=true,lastModified=Fri Nov 29 12:51:54 CET 2013,length=418382
  CacheEntry[http://IP_SERVER:8080/alfresco/applets/alfresco-web-service-client.jar]: updateAvailable=true,lastModified=Fri Nov 29 12:51:54 CET 2013,length=418382
  CacheEntry[http://IP_SERVER:8080/alfresco/applets/jai_core.jar]: updateAvailable=true,lastModified=Fri Oct 01 12:17:30 CEST 2010,length=1966212
  CacheEntry[http://IP_SERVER:8080/alfresco/applets/jai_core.jar]: updateAvailable=true,lastModified=Fri Oct 01 12:17:30 CEST 2010,length=1966212
  CacheEntry[http://IP_SERVER:8080/alfresco/applets/jai_codec.jar]: updateAvailable=true,lastModified=Fri Oct 01 12:17:30 CEST 2010,length=267173
  CacheEntry[http://IP_SERVER:8080/alfresco/applets/jai_codec.jar]: updateAvailable=true,lastModified=Fri Oct 01 12:17:30 CEST 2010,length=267173
  CacheEntry[http://IP_SERVER:8080/alfresco/applets/activation.jar]: updateAvailable=true,lastModified=Mon May 05 23:35:34 CEST 2014,length=59420
  CacheEntry[http://IP_SERVER:8080/alfresco/applets/activation.jar]: updateAvailable=true,lastModified=Mon May 05 23:35:34 CEST 2014,length=59420
  CacheEntry[http://IP_SERVER:8080/alfresco/applets/alfresco-core.jar]: updateAvailable=true,lastModified=Fri Nov 29 12:51:39 CET 2013,length=173167
  CacheEntry[http://IP_SERVER:8080/alfresco/applets/alfresco-core.jar]: updateAvailable=true,lastModified=Fri Nov 29 12:51:39 CET 2013,length=173167
  CacheEntry[http://IP_SERVER:8080/alfresco/applets/axis-1.4.jar]: updateAvailable=true,lastModified=Fri Nov 29 12:52:13 CET 2013,length=1689344
  CacheEntry[http://IP_SERVER:8080/alfresco/applets/axis-1.4.jar]: updateAvailable=true,lastModified=Fri Nov 29 12:52:13 CET 2013,length=1689344
  CacheEntry[http://IP_SERVER:8080/alfresco/applets/bcprov-jdk15-137.jar]: updateAvailable=true,lastModified=Fri Oct 01 12:17:26 CEST 2010,length=1528841
  CacheEntry[http://IP_SERVER:8080/alfresco/applets/bcprov-jdk15-137.jar]: updateAvailable=true,lastModified=Fri Oct 01 12:17:26 CEST 2010,length=1528841
  CacheEntry[http://IP_SERVER:8080/alfresco/applets/commons-discovery-0.2.jar]: updateAvailable=true,lastModified=Fri Nov 29 12:53:01 CET 2013,length=79805
  CacheEntry[http://IP_SERVER:8080/alfresco/applets/commons-discovery-0.2.jar]: updateAvailable=true,lastModified=Fri Nov 29 12:53:01 CET 2013,length=79805
  CacheEntry[http://IP_SERVER:8080/alfresco/applets/commons-logging-1.1.jar]: updateAvailable=true,lastModified=Fri Nov 29 12:53:15 CET 2013,length=58414
  CacheEntry[http://IP_SERVER:8080/alfresco/applets/commons-logging-1.1.jar]: updateAvailable=true,lastModified=Fri Nov 29 12:53:15 CET 2013,length=58414
  CacheEntry[http://IP_SERVER:8080/alfresco/applets/jaxrpc.jar]: updateAvailable=true,lastModified=Fri Nov 29 12:53:40 CET 2013,length=39674
  CacheEntry[http://IP_SERVER:8080/alfresco/applets/jaxrpc.jar]: updateAvailable=true,lastModified=Fri Nov 29 12:53:40 CET 2013,length=39674
  CacheEntry[http://IP_SERVER:8080/alfresco/applets/mail.jar]: updateAvailable=true,lastModified=Fri Nov 29 12:55:43 CET 2013,length=364719
  CacheEntry[http://IP_SERVER:8080/alfresco/applets/mail.jar]: updateAvailable=true,lastModified=Fri Nov 29 12:55:43 CET 2013,length=364719
  CacheEntry[http://IP_SERVER:8080/alfresco/applets/opensaml-1.0.1.jar]: updateAvailable=true,lastModified=Fri Nov 29 12:55:02 CET 2013,length=112773
  CacheEntry[http://IP_SERVER:8080/alfresco/applets/opensaml-1.0.1.jar]: updateAvailable=true,lastModified=Fri Nov 29 12:55:02 CET 2013,length=112773
  CacheEntry[http://IP_SERVER:8080/alfresco/applets/saaj.jar]: updateAvailable=true,lastModified=Fri Oct 01 12:17:28 CEST 2010,length=22324
  CacheEntry[http://IP_SERVER:8080/alfresco/applets/saaj.jar]: updateAvailable=true,lastModified=Fri Oct 01 12:17:28 CEST 2010,length=22324
  CacheEntry[http://IP_SERVER:8080/alfresco/applets/wsdl4j-1.5.1.jar]: updateAvailable=true,lastModified=Fri Oct 01 12:17:28 CEST 2010,length=136990
  CacheEntry[http://IP_SERVER:8080/alfresco/applets/wsdl4j-1.5.1.jar]: updateAvailable=true,lastModified=Fri Oct 01 12:17:28 CEST 2010,length=136990
  CacheEntry[http://IP_SERVER:8080/alfresco/applets/wsdl4j-1.6.2.jar]: updateAvailable=true,lastModified=Fri Nov 29 12:54:19 CET 2013,length=165762
  CacheEntry[http://IP_SERVER:8080/alfresco/applets/wsdl4j-1.6.2.jar]: updateAvailable=true,lastModified=Fri Nov 29 12:54:19 CET 2013,length=165762
  CacheEntry[http://IP_SERVER:8080/alfresco/applets/wss4j.jar]: updateAvailable=true,lastModified=Fri Nov 29 12:54:41 CET 2013,length=323332
  CacheEntry[http://IP_SERVER:8080/alfresco/applets/wss4j.jar]: updateAvailable=true,lastModified=Fri Nov 29 12:54:41 CET 2013,length=323332
  CacheEntry[http://IP_SERVER:8080/alfresco/applets/xalan.jar]: updateAvailable=true,lastModified=Fri Oct 01 12:17:28 CEST 2010,length=3175437
  CacheEntry[http://IP_SERVER:8080/alfresco/applets/xalan.jar]: updateAvailable=true,lastModified=Fri Oct 01 12:17:28 CEST 2010,length=3175437
  CacheEntry[http://IP_SERVER:8080/alfresco/applets/xercesImpl-2.8.0.jar]: updateAvailable=true,lastModified=Fri Oct 01 12:17:28 CEST 2010,length=1280498
  CacheEntry[http://IP_SERVER:8080/alfresco/applets/xercesImpl-2.8.0.jar]: updateAvailable=true,lastModified=Fri Oct 01 12:17:28 CEST 2010,length=1280498
  CacheEntry[http://IP_SERVER:8080/alfresco/applets/xmlsec-1.4.1.jar]: updateAvailable=true,lastModified=Fri Nov 29 12:55:23 CET 2013,length=455842
  CacheEntry[http://IP_SERVER:8080/alfresco/applets/xmlsec-1.4.1.jar]: updateAvailable=true,lastModified=Fri Nov 29 12:55:23 CET 2013,length=455842
  </code></pre>
  
  <p>Any ideas about how can we get our applets back and running smoothly in Java7???
  We need this so badly :-(.</p>
  
  <p>Thanks a lot. </p>