Issue 5264 in selenium: While running i got java.lang.SecurityException: Invalid signature file digest for Manifest main attributes

12 views
Skip to first unread message

sele...@googlecode.com

unread,
Mar 1, 2013, 12:34:31 PM3/1/13
to selenium-develope...@googlegroups.com
Status: New
Owner: ----
Labels: Type-Defect Priority-Medium Status-Untriaged

New issue 5264 by emmanuel...@gmail.com: While running i got
java.lang.SecurityException: Invalid signature file digest for Manifest
main attributes
http://code.google.com/p/selenium/issues/detail?id=5264

We are using the jars

<dependency org="org.seleniumhq.selenium" name="selenium-server"
rev="2.30.0">
<exclude module="org.mortbay.jetty" />
<exclude module="selenium-chrome-driver" />
<exclude module="selenium-firefox-driver" />
<exclude module="selenium-ie-driver" />
<exclude module="selenium-android-driver" />
<exclude module="selenium-safari-driver" />
<exclude module="selenium-iphone-driver" />
</dependency>
<dependency org="org.seleniumhq.selenium" name="selenium-java"
rev="2.30.0">
<exclude module="commons-exec" />
<exclude module="selenium-chrome-driver" />
<exclude module="selenium-firefox-driver" />
<exclude module="selenium-ie-driver" />
<exclude module="selenium-android-driver" />
<exclude module="selenium-safari-driver" />
<exclude module="selenium-iphone-driver" />
</dependency>
<dependency org="org.seleniumhq.selenium" name="selenium-htmlunit-driver"
rev="2.29.1"/>
<dependency org="org.seleniumhq.selenium" name="selenium-remote-driver"
rev="2.29.1"/>

and put them together in our own big jar.

The problem is whenever we want to run something,
we got java.lang.SecurityException: Invalid signature file digest for
Manifest main attributes.

I've tried to sign the jar, check there is no RSA, SF,etc in the jar,etc.
Out of ideas, please help!


--
You received this message because this project is configured to send all
issue notifications to this address.
You may adjust your notification preferences at:
https://code.google.com/hosting/settings

sele...@googlecode.com

unread,
Mar 1, 2013, 3:30:32 PM3/1/13
to selenium-develope...@googlegroups.com
Updates:
Status: WontFix
Cc: luke.semerau

Comment #1 on issue 5264 by luke.semerau: While running i got
java.lang.SecurityException: Invalid signature file digest for Manifest
main attributes
http://code.google.com/p/selenium/issues/detail?id=5264

why are you mismatching the selenium components? you're asking for
failure...

this is a completely unsupported configuration, i'm going to close as won't
fix as this wonders off into the realm of personal (hacking) customization.

The recommended dependency inclusion is to merely specify:

<dependency>
<groupId>org.seleniumhq.selenium</groupId>
<artifactId>selenium-server</artifactId>
<version>2.31.0</version>
</dependency>

sele...@googlecode.com

unread,
Mar 2, 2013, 4:41:59 AM3/2/13
to selenium-develope...@googlegroups.com

Comment #2 on issue 5264 by emmanuel...@gmail.com: While running i got
java.lang.SecurityException: Invalid signature file digest for Manifest
main attributes
http://code.google.com/p/selenium/issues/detail?id=5264

Won't fix? Hacking?
This was the nth attempt (desperate btw) trying to solve the problem.
The fact is that if i take you recommendation i got the same error.
Quid?

sele...@googlecode.com

unread,
Mar 2, 2013, 6:11:51 AM3/2/13
to selenium-develope...@googlegroups.com
Updates:
Status: NeedsClarification

Comment #3 on issue 5264 by luke.semerau: While running i got
java.lang.SecurityException: Invalid signature file digest for Manifest
main attributes
http://code.google.com/p/selenium/issues/detail?id=5264

You'll need to explain in more detail then what you are doing and what you
are trying to accomplish. You have provided almost no information, it looks
like you're using the maven build artifacts, but using what? Ivy? Gradle?
Something else?
What causes your error? Building? Executing a test? Is there more of a
stack trace?

sele...@googlecode.com

unread,
Mar 2, 2013, 6:17:32 AM3/2/13
to selenium-develope...@googlegroups.com

Comment #4 on issue 5264 by luke.semerau: While running i got
java.lang.SecurityException: Invalid signature file digest for Manifest
main attributes
http://code.google.com/p/selenium/issues/detail?id=5264

Please also provide detailed steps to reproduce the issue

sele...@googlecode.com

unread,
Mar 2, 2013, 8:29:16 AM3/2/13
to selenium-develope...@googlegroups.com

Comment #5 on issue 5264 by emmanuel...@gmail.com: While running i got
java.lang.SecurityException: Invalid signature file digest for Manifest
main attributes
http://code.google.com/p/selenium/issues/detail?id=5264

ok, i have packed other jars with selenium jars (resolved with Ivy through
nexus!) using Ant (standard <jar> task!).

<jar jarfile="${dist}/${fileName}" update="true" duplicate="preserve">
<zipgroupfileset dir="${lib}">
<include name="compile/*-*.jar" />
<!--include name="runtime/*-*.jar" / -->
</zipgroupfileset>

</jar>

Then when i execute a program such as running:

java -cp MyJarsContainingSeleniumJars z.y.x.MyApp

then i've got only that:

/software/jdk1.7.0_04/bin/java -Xmx14g -XX:MaxPermSize=512M -cp
conf:/home/agistest/AGIS/dist/AGIS-11.0.0.jar
-Dlog4j.configuration=file:conf/logging.properties -Dhostid=2
-DrunDesc=NIGHTLY_T3_CG_28-02-2013-20:09:38_1 x.y.z.Launcher args
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:262)
at java.util.jar.JarVerifier.update(JarVerifier.java:216)
at java.util.jar.JarFile.initializeVerifier(JarFile.java:341)
at java.util.jar.JarFile.getInputStream(JarFile.java:406)
at sun.misc.JarIndex.getJarIndex(JarIndex.java:137)
at sun.misc.URLClassPath$JarLoader$1.run(URLClassPath.java:668)
at sun.misc.URLClassPath$JarLoader$1.run(URLClassPath.java:660)
at java.security.AccessController.doPrivileged(Native Method)
at sun.misc.URLClassPath$JarLoader.ensureOpen(URLClassPath.java:659)
at sun.misc.URLClassPath$JarLoader.<init>(URLClassPath.java:632)
at sun.misc.URLClassPath$3.run(URLClassPath.java:362)
at sun.misc.URLClassPath$3.run(URLClassPath.java:352)
at java.security.AccessController.doPrivileged(Native Method)
at sun.misc.URLClassPath.getLoader(URLClassPath.java:351)
at sun.misc.URLClassPath.getLoader(URLClassPath.java:328)
at sun.misc.URLClassPath.getResource(URLClassPath.java:194)
at java.net.URLClassLoader$1.run(URLClassLoader.java:358)
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:480)

The question is, is there any SF, RSA or any other type of file signed in
the Selenium dist that could cause that???

Thanks for support!

sele...@googlecode.com

unread,
Mar 4, 2013, 2:48:31 AM3/4/13
to selenium-develope...@googlegroups.com

Comment #6 on issue 5264 by luke.semerau: While running i got
java.lang.SecurityException: Invalid signature file digest for Manifest
main attributes
http://code.google.com/p/selenium/issues/detail?id=5264

Selenium does not include any of those files, possibly one of it's
dependencies do. Either way I think they would be easily viewable in your
jar (can you double check the contents or your jar? or please email me your
jar so that I can take a look at it)

Since to reproduce this requires an ivy file and an ant build.xml of some
kind, I'm not able to easily reproduce this issue. If you can recreate the
issue with complete reproducible steps (sample ivy and build file and
possibly java too). Or I could try to see what is going on with your jar.
But likely there is something happening with one of the many dependencies
either in your project or the selenium project that causes this if you are
re-packing the jars. This may help you, but i'm not sure:
http://stackoverflow.com/a/9594412/725944

sele...@googlecode.com

unread,
Mar 4, 2013, 5:21:49 AM3/4/13
to selenium-develope...@googlegroups.com

Comment #7 on issue 5264 by emmanuel...@gmail.com: While running i got
java.lang.SecurityException: Invalid signature file digest for Manifest
main attributes
http://code.google.com/p/selenium/issues/detail?id=5264

Ok, found the problem. One of the library from selenium-server pom is
bouncycastle.org which include /META-INF/BCKEY.DSA file.

Excluding this packages in ivy.xml fix my problem for now.

<exclude module="bcpkix-jdk15on" />
<exclude module="bcprov-jdk15on" />

Thanks.
E.

sele...@googlecode.com

unread,
Mar 4, 2013, 8:47:14 AM3/4/13
to selenium-develope...@googlegroups.com
Updates:
Status: WorkingAsIntended

Comment #8 on issue 5264 by luke.semerau: While running i got
java.lang.SecurityException: Invalid signature file digest for Manifest
main attributes
http://code.google.com/p/selenium/issues/detail?id=5264

Glad you found your problem.
Reply all
Reply to author
Forward
0 new messages