Signature issue when compiling and running distribution

80 views
Skip to first unread message

Mario Zechner

unread,
Sep 13, 2013, 12:09:35 PM9/13/13
to rob...@googlegroups.com
I just tried to compile a distribution of RoboVM, untar it, then run bin/robovm. The jar refuses to launch due to a missmatch in signature it seems:

badlogic-mbp:robovm-0.0.5-SNAPSHOT badlogic$ bin/robovm 
Exception in thread "main" java.lang.SecurityException: Invalid signature file digest for Manifest main attributes
at sun.security.util.SignatureFileVerifier.processImpl(SignatureFileVerifier.java:240)
at sun.security.util.SignatureFileVerifier.process(SignatureFileVerifier.java:193)
at java.util.jar.JarVerifier.processEntry(JarVerifier.java:305)
at java.util.jar.JarVerifier.update(JarVerifier.java:216)
at java.util.jar.JarFile.initializeVerifier(JarFile.java:345)
at java.util.jar.JarFile.getInputStream(JarFile.java:412)
at sun.misc.URLClassPath$JarLoader$2.getInputStream(URLClassPath.java:752)
at sun.misc.Resource.cachedInputStream(Resource.java:77)
at sun.misc.Resource.getByteBuffer(Resource.java:160)
at java.net.URLClassLoader.defineClass(URLClassLoader.java:436)
at java.net.URLClassLoader.access$100(URLClassLoader.java:71)
at java.net.URLClassLoader$1.run(URLClassLoader.java:361)
at java.net.URLClassLoader$1.run(URLClassLoader.java:355)
at java.security.AccessController.doPrivileged(Native Method)
at java.net.URLClassLoader.findClass(URLClassLoader.java:354)
at java.lang.ClassLoader.loadClass(ClassLoader.java:423)
at sun.misc.Launcher$AppClassLoader.loadClass(Launcher.java:308)
at java.lang.ClassLoader.loadClass(ClassLoader.java:356)
at sun.launcher.LauncherHelper.checkAndLoadMain(LauncherHelper.java:482)

Any idea what could cause this (shade plugin is my guess) and how to resolve it?

Thanks!

Niklas Therning

unread,
Sep 13, 2013, 12:28:25 PM9/13/13
to Mario Zechner, rob...@googlegroups.com
I guess it must have something to do with Bouncycastle which I added as a dependency just a few days ago. I think they sign their jars and the signature is probably copied during the shading. Something that is in the Bouncycastle jars needs to be excluded in the shade config in the compiler/pom.xml file. I don't know exactly what though...


--
You received this message because you are subscribed to the Google Groups "RoboVM" group.
To unsubscribe from this group and stop receiving emails from it, send an email to robovm+un...@googlegroups.com.
For more options, visit https://groups.google.com/groups/opt_out.

Mario Zechner

unread,
Sep 13, 2013, 1:04:18 PM9/13/13
to rob...@googlegroups.com, Mario Zechner
It's indeed bouncy castle. I temporarily excluded it from the shade build, and things work as expected. Removing the BC dependency doesn't trigger any errors either. What is it used for?

Niklas Therning

unread,
Sep 13, 2013, 1:07:01 PM9/13/13
to Mario Zechner, rob...@googlegroups.com
It's only used for parsing .mobileprovision files. You will run into problems if you're building for a device I think.

Mario Zechner

unread,
Sep 13, 2013, 1:09:54 PM9/13/13
to Niklas Therning, rob...@googlegroups.com
I think it can be fixed by removing the manifest signature files. I'll see if i can get that to work.

Niklas Therning

unread,
Sep 13, 2013, 1:10:56 PM9/13/13
to Mario Zechner, rob...@googlegroups.com
Reply all
Reply to author
Forward
0 new messages