java.lang.SecurityException: class "org.hamcrest.TypeSafeMatcher"'s signer information does not match signer information of other classes in the same package
at java.lang.ClassLoader.checkCerts(ClassLoader.java:851)
at java.lang.ClassLoader.preDefineClass(ClassLoader.java:566)
at java.lang.ClassLoader.defineClass(ClassLoader.java:692)
at java.security.SecureClassLoader.defineClass(SecureClassLoader.java:124)
So, the first thing I did was update JMock to the newest version thinking this was simply an issue with JDK versions or something. That didn't work, but it's helpful to have the 'latest and greatest' I guess, so no harm done.
After some quick googling about I discovered the issue was multiple hamcrest libraries and simply changed my class-path order to place Junit at the end of the classpath (after JMock) and voila, problem solved.
So, if your moving to Galileo and your tests with mocks suddenly start breaking, the simple fix is to make sure JUnit follows JMock (and it's version of hamcrest) in your classpath.
1 comment:
A better option, if possible, might be to replace your JUnit jar with the one without hamcrest, called "junit-dep" (that means it includes no dependencies). Then there should be no clash.
S.
Post a Comment