This discussion is archived
1 Reply Latest reply: Nov 8, 2013 2:09 PM by user13699226 RSS

NullPointerException on running Applet (self signed jar) on 1.7.0_40-b43/Firefox

user11233254 Newbie
Currently Being Moderated

Hello,

 

I have a self-signed applet jar running on Java 1.7 update 40.

- The jar was signed using the jarsigner command using a keystore file generated using keytool.

- The html page is using the <applet> tag (No jnlp).

 

The applet worked fine, prior Java 1.7 update 40/25 (on Java 6).

The applet now, works fine on IE 10. When I open the applet via IE and the applet is cached, the applet starts working fine on Firefox/Chrome too.

I checked (and double checked) the java plugin version for both IE/Firefox.

I can not find documentation on the getTrustedCodeSources method or what I am missing here. Any inputs?

 

The stacktrace is below:

network: Wrote URL https://127.0.0.1/testApp/html/applet.jar to File C:\Users\USERNAME~1.001\AppData\Local\Temp\jar_cache8498250414396017856.tmp

security: Blacklist revocation check is enabled

security: blacklist: Reconstruct cache

security: blacklist: created: NEED_CREATE, lastModified: 1378995151086

security: The jar file isnt signed so the blacklist check will be skipped

security: Trusted libraries list check is enabled

security: Trusted libraries list file not found

security: The jar file isnt signed so the blacklist check will be skipped

network: Disconnect connection to https://127.0.0.1/testApp/html/applet.jar

network: Downloaded https://127.0.0.1/testApp/html/applet.jar: C:\Users\USERNAME~1.001\AppData\Local\Temp\jar_cache8498250414396017856.tmp

cache: Adding MemoryCache entry: https://127.0.0.1/testApp/html/applet.jar

basic: exception: null.

java.lang.NullPointerException

  at sun.plugin2.applet.Plugin2ClassLoader.getTrustedCodeSources(Unknown Source)

  at com.sun.deploy.security.CPCallbackHandler$ParentCallback.strategy(Unknown Source)

  at com.sun.deploy.security.CPCallbackHandler$ParentCallback.openClassPathElement(Unknown Source)

  at com.sun.deploy.security.DeployURLClassPath$JarLoader.getJarFile(Unknown Source)

  at com.sun.deploy.security.DeployURLClassPath$JarLoader.access$1000(Unknown Source)

  at com.sun.deploy.security.DeployURLClassPath$JarLoader$1.run(Unknown Source)

  at java.security.AccessController.doPrivileged(Native Method)

  at com.sun.deploy.security.DeployURLClassPath$JarLoader.ensureOpen(Unknown Source)

  at com.sun.deploy.security.DeployURLClassPath$JarLoader.<init>(Unknown Source)

  at com.sun.deploy.security.DeployURLClassPath$3.run(Unknown Source)

  at java.security.AccessController.doPrivileged(Native Method)

  at com.sun.deploy.security.DeployURLClassPath.getLoader(Unknown Source)

  at com.sun.deploy.security.DeployURLClassPath.getLoader(Unknown Source)

  at com.sun.deploy.security.DeployURLClassPath.getResource(Unknown Source)

  at sun.plugin2.applet.Plugin2ClassLoader$2.run(Unknown Source)

  at java.security.AccessController.doPrivileged(Native Method)

  at sun.plugin2.applet.Plugin2ClassLoader.findClassHelper(Unknown Source)

  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.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)

 

Thanks!

  • 1. Re: NullPointerException on running Applet (self signed jar) on 1.7.0_40-b43/Firefox
    user13699226 Newbie
    Currently Being Moderated

    I have the same exception with a .jar that is signed by a trusted CA in java 1.7.0_45-b18

     

    This error occurs in firefox and chrome, but not IE9.

    This problem also only occurs when I use my "hostname" to access my localhost,  (http://<hostName>)

     

    If I use "http://localhost" or "http://<ip address>" it works fine.

     

    Clearing my applet cache does not help.

     

    Here is my stack trace that is identical to the one above:

     

    basic: Plugin2ClassLoader.addURL parent called for http://<hostname>/wbapplet-3.8.34.jar

    basic: exception: null.

    java.lang.NullPointerException

      at sun.plugin2.applet.Plugin2ClassLoader.getTrustedCodeSources(Unknown Source)

      at com.sun.deploy.security.CPCallbackHandler$ParentCallback.strategy(Unknown Source)

      at com.sun.deploy.security.CPCallbackHandler$ParentCallback.openClassPathElement(Unknown Source)

      at com.sun.deploy.security.DeployURLClassPath$JarLoader.getJarFile(Unknown Source)

      at com.sun.deploy.security.DeployURLClassPath$JarLoader.access$1000(Unknown Source)

      at com.sun.deploy.security.DeployURLClassPath$JarLoader$1.run(Unknown Source)

      at java.security.AccessController.doPrivileged(Native Method)

      at com.sun.deploy.security.DeployURLClassPath$JarLoader.ensureOpen(Unknown Source)

      at com.sun.deploy.security.DeployURLClassPath$JarLoader.<init>(Unknown Source)

      at com.sun.deploy.security.DeployURLClassPath$3.run(Unknown Source)

      at java.security.AccessController.doPrivileged(Native Method)

      at com.sun.deploy.security.DeployURLClassPath.getLoader(Unknown Source)

      at com.sun.deploy.security.DeployURLClassPath.getLoader(Unknown Source)

      at com.sun.deploy.security.DeployURLClassPath.getResource(Unknown Source)

      at sun.plugin2.applet.Plugin2ClassLoader$2.run(Unknown Source)

      at java.security.AccessController.doPrivileged(Native Method)

      at sun.plugin2.applet.Plugin2ClassLoader.findClassHelper(Unknown Source)

      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.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)

Legend

  • Correct Answers - 10 points
  • Helpful Answers - 5 points