3 Replies Latest reply: Jun 20, 2013 3:42 PM by 876181 RSS

    Code base mismatch - Java 7 update 25

    876181

      Starting in Java 7 update 25, all jar files need to be signed, and in the manifest file there needs to be a code base parameter, and a permissions parameter - see link http://docs.oracle.com/javase/7/docs/technotes/guides/jweb/no_redeploy.html

       

      Here is the problem I am having.  I have a Java Web Start program in netbeans.  The codebase for my top level program is http://www.example.com.  However, I have a library directory with four or five .jar files.  The jar files in the lib directory's codebase is www.example.com/lib. 

       

      Here is my problem I have a codebase missmatch with every single one of my jar files in the lib directory.  As a result, my java web start program is blocked from running by security.

       

      How do I fix this?

       

      thank you

        • 1. Re: Code base mismatch - Java 7 update 25
          946128

          Have you tried to add 'Codebase: *' to the manifest file of each jar?

          • 2. Re: Code base mismatch - Java 7 update 25
            876181

            Hi,

             

            I have added a manifest file with codebase in each of my jar files.  I am receiving a codebase mismatch in one of my jar files's manifest. Here's more

             

            the lib directory is out the jar file I am creating for my java webstart jar.  I think I may need to move the lib directory to inside the java webstart jar.  Netbeans creates the lib directory out of the java web start jar.

             

            I am all ears looking for a better solution.

            • 3. Re: Code base mismatch - Java 7 update 25
              876181

              I think I got my manifest file correct.  However I am still getting null pointer errors using Java 7 update 25. BTW, my Java Webstart Applications works in Java 7 update 21.

              java.lang.NullPointerException

              at com.sun.jnlp.JNLPClassLoader.getPermissions(Unknown Source) at java.security.SecureClassLoader.getProtectionDomain(Unknown Source)

              at java.security.SecureClassLoader.defineClass(Unknown Source) at java.net.URLClassLoader.defineClass(Unknown Source)

              at java.net.URLClassLoader.access$100(Unknown Source) at java.net.URLClassLoader$1.run(Unknown Source) at java.net.URLClassLoader$1.run(Unknown Source) at java.security.AccessController.doPrivileged(Native Method) at java.net.URLClassLoader.findClass(Unknown Source)

              at com.sun.jnlp.JNLPClassLoader.findClass(Unknown Source) at java.lang.ClassLoader.loadClass(Unknown Source) at java.lang.ClassLoader.loadClass(Unknown Source) at java.lang.Class.getDeclaredMethods0(Native Method) at java.lang.Class.privateGetDeclaredMethods(Unknown Source)

              at java.lang.Class.getMethod0(Unknown Source) at java.lang.Class.getMethod(Unknown Source) at com.sun.javaws.Launcher.executeApplication(Unknown Source) at com.sun.javaws.Launcher.executeMainClass(Unknown Source) at com.sun.javaws.Launcher.doLaunchApp(Unknown Source)

              at com.sun.javaws.Launcher.run(Unknown Source) at java.lang.Thread.run(Unknown Source)