Java Securityexception: Signer Information Does Not Match

Java SecurityException: signer information does not match

This happens when classes belonging to the same package are loaded from different JAR files, and those JAR files have signatures signed with different certificates - or, perhaps more often, at least one is signed and one or more others are not (which includes classes loaded from directories since those AFAIK cannot be signed).

So either make sure all JARs (or at least those which contain classes from the same packages) are signed using the same certificate, or remove the signatures from the manifest of JAR files with overlapping packages.

Signer information does not match

It means that you have two or more classes in the same package with different signature data. Usually that means the classes come from different JARs, one of which is signed and the other is unsigned.

java.lang.SecurityException: signer information does not match signer information of other classes in the same package in PowerMock

Powermock lib version 1.6.4 has a bug where it fails when mocking a class which is part of signed jar. Upgrading the powermock lib to 1.6.6 solved this issue.

java.lang.SecurityException: class XYZ's signer information does not match signer information of other classes in the same package

It means that inside the same JVM, there are other classes loaded from other jars that have been signed differently (or not signed maybe), also in the default package.

If I interpret your question correctly your applet itself only has one jar, so it must be a jar coming from somewhere else; that only some users have.
My first thought it's maybe the jar of an applet running in another tab (that can be using the same jvm instance). But other applets should be using a separate classloader, so they shouldn't collide like that.
More likely, they have a jar in the boot classpath of their jvm that also has a class in the root package.

Either way, the solution/workaround is simply not to use the default package, but your own package. That way you avoid colliding with the other jar.



Related Topics



Leave a reply



Submit