Apparently, the solution is very simple:

Just make sure that JUnit4 libraries are at the beginning of your classpath. 
In other words:
1. Project/Build Path/Configure Build Path
2. Order and Export tab
3. Move JUnit4 on top.


viulian wrote:
> 
> Hello!
> 
> I am working on a project created with Maven2 and imported in Eclipse
> (Europa).
> In my pom file there's a dependency to junit:
> 
>               <dependency>
>                       <groupId>junit</groupId>
>                       <artifactId>junit</artifactId>
>                       <version>4.1</version>
>                       <scope>compile</scope>
>               </dependency>
> 
> Now, when I right click on a test in Eclipse and select "Run as -> JUnit
> test" I get an error, after the test starts, that:
> 
> 9:47:39,093  INFO BaseClientTest:34 -
> Porperties={java.naming.provider.url=localhost:1099,
> java.naming.factory.initial=org.jnp.interfaces.NamingContextFactory,
> java.naming.factory.url.pkgs=org.jboss.naming:org.jnp.interfaces}]
> 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)
>       at java.lang.ClassLoader.preDefineClass(ClassLoader.java:487)
>       at java.lang.ClassLoader.defineClass(ClassLoader.java:614)
>       at
> java.security.SecureClassLoader.defineClass(SecureClassLoader.java:124)
>       at java.net.URLClassLoader.defineClass(URLClassLoader.java:260)
>       at java.net.URLClassLoader.access$100(URLClassLoader.java:56)
>       at java.net.URLClassLoader$1.run(URLClassLoader.java:195)
> ...
> 
> After some investigation, I discovered that Eclipse has its junit plugin
> signed, however, it probably tries to load JUnit4TestCaseFacade from the
> project's dependency, even if that's specified for compile time only.
> 
> Now, I tried to replace eclipse's junit.jar with the one from the project,
> but I still get those errors (and I searched all the archives (.jars) in
> Eclipse, and it should find JUnit4TestCaseFacade.class in the junit I put
> there).
> 
> Do you guys know anything about this - seems my hands are tied at the
> moment (the unit test can be ran outside Eclipse, using TestRunner or
> maven).
> 
> Thanks!
> 

-- 
View this message in context: 
http://www.nabble.com/class-%22junit.framework.JUnit4TestCaseFacade%22%27s-signer-information-does-not-match-signer-information-of-other-classes-in-the-same-package-tp12307504p21696875.html
Sent from the Maven Eclipse - User mailing list archive at Nabble.com.


---------------------------------------------------------------------
To unsubscribe from this list, please visit:

    http://xircles.codehaus.org/manage_email


Reply via email to