5 Replies Latest reply: Mar 10, 2011 11:16 AM by 793415 RSS

    Error: Found unsigned entry in resource

    843802
      Hi,

      I have a Java application that I run regularly on both my Linux box and my Windows 7 box. (It is independently compiled on each machine).

      As a learning experience I am trying to run it using Web Start to run it from the Windows 7 machine.

      These have worked:
      keytool -genkey -alias My_DB -keypass thepassword -keystore My_DB -storepass thepassword
      and
      jarsigner -keystore My_DB -signedjar My_DB.jar My_DB1.jar My_DB
      and
      jarsigner -verify -keystore My_DB My_DB.jar My_DB
      jar verified.

      The application comes up OK thru my html and jnlp files.
      But it (the application) has a 'Load' button where I load-up/read-in a local (C:\ drive) ascii text file.
      When I press load, nothing happens - no error, but it doesn't load up the file.

      So I put this in the jnlp file:
      <security>
      <all-permissions/>
      </security>

      but now I get:
      Error: Found unsigned entry in resource:
      file:/C:/Software/Java/Projects/NetBeans/My_DB/dist/My_DB.jar

      com.sun.deploy.net.JARSigningException: Found unsigned entry in resource:

      file:/C:/Software/Java/Projects/NetBeans/My_DB/dist/My_DB.jar
           at com.sun.javaws.security.SigningInfo.getCommonCodeSignersForJar(Unknown Source)
           at com.sun.javaws.security.SigningInfo.check(Unknown Source)
           at com.sun.javaws.LaunchDownload.checkSignedResourcesHelper(Unknown Source)
           at com.sun.javaws.LaunchDownload.checkSignedResources(Unknown Source)
           at com.sun.javaws.Launcher.prepareResources(Unknown Source)
           at com.sun.javaws.Launcher.prepareAllResources(Unknown Source)
           at com.sun.javaws.Launcher.prepareToLaunch(Unknown Source)
           at com.sun.javaws.Launcher.prepareToLaunch(Unknown Source)
           at com.sun.javaws.Launcher.launch(Unknown Source)
           at com.sun.javaws.Main.launchApp(Unknown Source)
           at com.sun.javaws.Main.continueInSecureThread(Unknown Source)
           at com.sun.javaws.Main$1.run(Unknown Source)
           at java.lang.Thread.run(Unknown Source)

      Any idea what's wrong?

      Thanks in adavnce, Matt
        • 1. Re: Error: Found unsigned entry in resource
          843802
          Here is the jnlp
          My_DB.jnlp:
          <?xml version="1.0" encoding="UTF-8"?>
          <jnlp spec="1.0+">
             <information>
                <title>My_DB</title>
                <vendor>Matt</vendor>
             </information>
             <resources>
                <!-- Application Resources -->
                <j2se version="1.6+"
                href="http://java.sun.com/products/autodl/j2se"/>
                <jar href="My_DB.jar" main="true" />
             </resources>
             <application-desc
                name="My_DB DBMS"
                main-class="my_db.My_DB_GUI"
                width="900"
                height="1100">
             </application-desc>
             <update check="background"/>
          </jnlp>
          The above is without the error-generating security code as described above.
          But here it is again, and I insert it just before the last line:
          <security>
             <all-permissions/>
          </security>
          And the html:
          <body>
             <script src="http://www.java.com/js/deployJava.js"></script>
             <script>
                // using JavaScript to get location of JNLP file relative to
                HTML page
                var dir = location.href.substring(0,
                location.href.lastIndexOf('/')+1);
                var url = dir + "My_DB.jnlp";
                deployJava.createWebStartLaunchButton(url, '1.6.0');
             </script>
          </body>
          (Yes, it just gives me a Launch button)

          I am going to try to duplicate this with a REAL simple code set that, via a GUI, all it does is read in a local file.
          I think I will see exactly the same problem/results.

          Edited by: matt_thumper on Aug 10, 2010 3:15 AM

          Edited by: matt_thumper on Aug 10, 2010 5:40 AM
          • 2. RESOLVED: Error: Found unsigned entry in resource
            843802
            Thanks Matt that worked! The application can now read/write to local files via Web Start.
            • 3. Re: Error: Found unsigned entry in resource
              832219
              Dear Friends,

              I had exact same problem with Java Web Start:

              1) com.sun.deploy.net.JARSigningException: Found unsigned entry in resource: http://localhost/saa/designer.jar
              2) But the jar was signed, I verified it:


              C:\Documents and Settings\jrao>jarsigner -verify -certs C:\Applications\AppServ\www\saa\designer.jar
              jar verified.

              How did you solve your problem?

              Thanks a lot in advance!

              -Ju

              Please send me email to jrao@cghtech.com
              • 4. Re: RESOLVED: Error: Found unsigned entry in resource
                4105
                We experience the same problem.

                Can you pls let us know what you changed to solve this ?
                • 5. Re: RESOLVED: Error: Found unsigned entry in resource
                  793415
                  See the instructions at Mixing Signed and Unsigned Code.

                  Also, for the future please note that if you have a problem that seems similar to an old thread, it is best to start your own thread and link to the old thread. I will ask the moderators to lock this one.