This content has been marked as final. Show 5 replies
Regardless of any code you might have, that error message is saying that the class junit.framework.JUnit4TestAdapter was loaded from a different jar than earlier JUnit classes. And the original JUnit jar was sealed, so loading subsequent JUnit classes from a different jar indicates possible interference with the product.
Could someone perhaps give any help on how to resolve this problem?
The error I'm getting is:
class "junit.framework.JUnit4TestAdapter"'s signer information does not match signer information of other classes in the same package
I searched and found two junit jars on my computer. I tried both, but both result in this error. I have cleaned the project and built it again, but nothing helps. BTW, I get this error when I run an ant file in an effort to build html output of my junit tests.
Any help would be greatly appreciated because I'm now getting desperate to get these files generated.
Edited by: jakkals on Apr 16, 2008 1:52 AM
Edited by: jakkals on Apr 16, 2008 2:16 AM
I got this error also when running a JUnit4 test inside eclipse (3.3). It turned out I had the JUnit3 jar in the classpath and not the JUnit4 jar.
In eclipse, I added a 'library' to the Classpath tab on the run configuration for the JUnit test and selected Junit and then Junit4. The jar it added to the classpath was \eclipse\plugins\org.junit4_4.3.1\junit.jar
I got the same error with eclipse. The problem was that besides the junit4 library, which was added to the project I started the test from, there are other projects this one depends on which have the junit3 library in their classpath. Although these projects do not export the junit3 library it was included in the classpath in the run configurations (not in the build path of the project though). I deleted all user entries from the run configurations of the test class and added explicitly only those things required. Also the project the test class is contained in needs to be added, BUT "add required projects ...." needs to be OFF.
Please, don't resurrect old threads. I'm locking this.