views:

4722

answers:

4

I've been working with web start for a couple years now and have experience with signing the jars and what not. I am taking my first attempt at deploying a RCP app with web start and though I have in fact signed all of the jars with the same certificate I keep getting this error: 'jar resources in jnlp are not signed by the same certificate'

Has anyone else came across this? If so, any ideas on how to fix?

+3  A: 

When I had similar problems after checking the jars it turned out that some 3rd party jar was signed by someone else.

You should create a separate jnlp file for the jars signed by the other certificate and read this jnlp from your jnlp file:

<resources>
  ...
  <extension name="other" href="other.jnlp"/>
</resources>

Here or here you can find an example.

asalamon74
That makes total sense, thanks!
javamonkey79
I came across this same problem. Rather than using extensions, I wrote a small script to strip the signature files (e.g. META-INF/*.RSA, *.DSA, and *.SF) from the 3rd party jars before signing them myself.
qualidafial
That's ok if you don't need the original signature. But sometimes you need that.
asalamon74
+2  A: 

This may be a stale manifest entry from an already signed jar that you use as a library. I encountered this problem with jogl via webstart. Try this:

Unzip all jars, purge all META-INF directories, jar and sign them again.

Stefan Tannenbaum
+1  A: 

I've found that JNLP/Webstart does not like multiple signatures/signing via jarsigner.exe for a given JAR. If a JAR such as BouncyCastle (which comes presigned) is signed again with your Company's certificate, visual inspection leads me to believe that the new Certificate and Signatures are performed properly in the JAR. but that JNLP may be reading only the first (Alphabetical?) signature in the META-INF, and thereby complaining it doesn't match your other JARs (which have only one, Corporate, signature on each JAR).

Matthew McCullough
A: 

How Can i find the 3rd party jar file. Im running application in netbeans and this is my Exception shown after running application ... Can u judge which one is doing wrong .....

JNLPException[category: Launch File Error : Exception: null : LaunchDesc: DGImageApplication sidharth DGImageApplication DGImageApplication ] at com.sun.javaws.LaunchDownload.checkSignedResourcesHelper(LaunchDownload.java:1436) at com.sun.javaws.LaunchDownload.checkSignedResources(LaunchDownload.java:1170) at com.sun.javaws.Launcher.prepareLaunchFile(Launcher.java:1020) at com.sun.javaws.Launcher.prepareToLaunch(Launcher.java:306) at com.sun.javaws.Launcher.prepareToLaunch(Launcher.java:183) at com.sun.javaws.Launcher.launch(Launcher.java:104) at com.sun.javaws.Main.launchApp(Main.java:403) at com.sun.javaws.Main.continueInSecureThread(Main.java:250) at com.sun.javaws.Main$1.run(Main.java:111) at java.lang.Thread.run(Unknown Source)

vivek