How to resolve – java.lang.VerifyError java.lang.SecurityException: Signers of org.junit.runner.Runner do not match signers of other classes in package


Have you ever encountered the following exception when you were trying to run a JUnit Class with isolation framework like JMockit?

java.lang.VerifyError: java.lang.SecurityException: Signers of 'org.junit.runner.Runner' do not match signers of other classes in package
	at java.lang.J9VMInternals.verify(
	at java.lang.J9VMInternals.initialize(
	at org.junit.runner.Request.aClass(
	at org.eclipse.jdt.internal.junit4.runner.JUnit4TestClassReference.(
	at org.eclipse.jdt.internal.junit4.runner.JUnit4TestLoader.createTest(
	at org.eclipse.jdt.internal.junit4.runner.JUnit4TestLoader.loadTests(
	at org.eclipse.jdt.internal.junit.runner.RemoteTestRunner.runTests(
	at org.eclipse.jdt.internal.junit.runner.RemoteTestRunner.runTests(
	at org.eclipse.jdt.internal.junit.runner.RemoteTestRunner.main(

Root Cause:

After quite a few attempts and reserch, I discovered that the error is due to the conflict with the default version of the JUnit provided by the eclipse.


Follow the following steps to resolve the issue. Happy JUniting and JMockiting.

  1. Remove the build reference to existing JUnit jar file from your build path.
  2. Download and use the independent Junit Jar file in your library.