Friday, October 3, 2008

junit.framework.JUnit4TestCaseFacade signer issue in Eclipse

When running a junt test in Eclipse (Ganymede), I got the following exception:

java.lang.SecurityException: class "junit.framework.JUnit4TestCaseFacade"'s signer information does not match signer information of other classes in the same package
at java.lang.ClassLoader.checkCerts(ClassLoader.java:775)

It looks like the problem is because the Eclipse is using Junit 4. As soon as I switched it to Junit 3, it works fine.

To switch from Junit 4 to Junit 3. Click "Run" -> "Run configurations..."->"Test runner".