class "junit.framework.JUnit4TestCaseFacade"'s signer information does not match signer information of other classes in the same package

Previous Topic Next Topic
 
classic Classic list List threaded Threaded
12 messages Options
Reply | Threaded
Open this post in threaded view
|

class "junit.framework.JUnit4TestCaseFacade"'s signer information does not match signer information of other classes in the same package

viulian
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!
Reply | Threaded
Open this post in threaded view
|

Re: class "junit.framework.JUnit4TestCaseFacade"'s signer information does not match signer information of other classes in the same package

viulian
After I switched the jars (replacing eclipse's junit.jar with the one from the maven dependencies) [and still getting the same errors], I've realised that the error is not related to maven.

I've enabled class loading verbose messages, and discovered that Eclipse Europa is a mess when trying to load some unit tests:

[Loaded junit.framework.Protectable from file:/C:/wtp/plugins/org.junit_3.8.2.v200706111738/junit.jar]
[Loaded org.junit.internal.runners.OldTestClassRunner$1 from file:/C:/Documents%20and%20Settings/Admin/.m2/repository/junit/junit/4.1/junit-4.1.jar]

So it tries to load classes from both 3.8 and 4.1 jars.

Grrr...
Reply | Threaded
Open this post in threaded view
|

Re: class "junit.framework.JUnit4TestCaseFacade"'s signer information does not match signer information of other classes in the same package

viulian
It seemed that there's a setting, in Eclipse, related to the JUnit version (Setting belonging to the project). Default was JUnit 4, and when switching to JUnit 3, everything magically worked..
Reply | Threaded
Open this post in threaded view
|

Q4E usage

adingfelder
 I just noticed on the main maven discussion lists that a "competing" eclipse maven plug-in has been developed (Q4E).

Has anyone here tried it, and what do people here think about it's features ?

I really don't want to use 2 maven plug-ins, so I assume at some point I will have to try it and decide upon one or the other.

Thoughts?


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

    http://xircles.codehaus.org/manage_email

Reply | Threaded
Open this post in threaded view
|

Re: class "junit.framework.JUnit4TestCaseFacade"'s signer information does not match signer information of other classes in the same package

KeMbi
In reply to this post by viulian
Thanks viulian! I had the same problem but thanks to you I got rid of it :)
Reply | Threaded
Open this post in threaded view
|

Re: class "junit.framework.JUnit4TestCaseFacade"'s signer information does not match signer information of other classes in the same package

sunc01
Could you please share with me how you fixed the problem. I am having the same problem after I upgraded my MyEclipse to 6.0 and used my original workspace. My old test cases that were using junit 4 could not be run any more with the same error msg.

Thanks a million!

KeMbi wrote
Thanks viulian! I had the same problem but thanks to you I got rid of it :)
Reply | Threaded
Open this post in threaded view
|

Re: class "junit.framework.JUnit4TestCaseFacade"'s signer information does not match signer information of other classes in the same package

KeMbi
I am using Eclipse Europe and to fix the problem I needed to click "Open Run Dialog..." (from "Run" menu) and on a test tab choose JUnit 3 as a test runner (for the appropriate Class of course). I hope this helps...

En Taro Adun!

sunc01 wrote
Could you please share with me how you fixed the problem. I am having the same problem after I upgraded my MyEclipse to 6.0 and used my original workspace. My old test cases that were using junit 4 could not be run any more with the same error msg.

Thanks a million!
Reply | Threaded
Open this post in threaded view
|

Re: class "junit.framework.JUnit4TestCaseFacade"'s signer information does not match signer information of other classes in the same package

RomanS
In reply to this post by viulian
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!
Reply | Threaded
Open this post in threaded view
|

Re: class "junit.framework.JUnit4TestCaseFacade"'s signer information does not match signer information of other classes in the same package

RomanS
Apparently, even this may not be necessary... The issue comes from the fact the some of the classes are actually implemented using JUnit3 semantics - as the result pretty much no matter what Eclipse decides that it is JUnit3 and gets in a conflict with the Suit. So before anything - MAKE SURE THAT ALL CLASSES ARE IMPLEMENTED WITH JUnit 4 semantics!!!

RomanS wrote
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!
Reply | Threaded
Open this post in threaded view
|

Re: class "junit.framework.JUnit4TestCaseFacade"'s signer information does not match signer information of other classes in the same package

Eugene Kuleshov
In reply to this post by RomanS

  It is really bad idea to change project classpath for projects that
have Maven dependency management enabled. I strongly recommend to use
Maven / Update project configuration command instead.

  As for original problem, please make sure that your project don't have
Eclipse's "JUnit" classpath library in the project build path. It seem
like is conflicting with the "Maven Dependencies" classpath library.

  regards,
  Eugene


RomanS wrote:

> 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!
>>
>>    
>
>  


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

    http://xircles.codehaus.org/manage_email


Reply | Threaded
Open this post in threaded view
|

Re: class "junit.framework.JUnit4TestCaseFacade"'s signer information does not match signer information of other classes in the same package

Milton
This post has NOT been accepted by the mailing list yet.
In reply to this post by RomanS
Very simple approach and worked perfectly. Thanks a ton !
Reply | Threaded
Open this post in threaded view
|

Re: class "junit.framework.JUnit4TestCaseFacade"'s signer information does not match signer information of other classes in the same package

Putterksr
This post has NOT been accepted by the mailing list yet.
In reply to this post by viulian
หลังจากที่ใส่ชื่อผู้ใช้ รหัสผ่าน และหมายเลขตรวจสอบที่กรอกตามหมายเลข 4 ตัว เพื่อเข้าระบบ จากนั้นจะเข้าสู่หน้า ให้สมาชิกทุกคุณมาร่วมสนุกเพลิดเพลินมาร่วมเชียร์ และเป็นเว็บที่มีความปลอดภัยสูง เทียบเท่าธนาคารระดับโลก princess crown จากเมนูทางซ้ายมือหรือจากลิงค์ตรงกลางหน้าแรกเว็บไซต์ก็ได้ โดยเชือ่มโยงไปยังเว็บไซต์จริงที่อยู่ต่างประเทศ นั่นเป็นสิ่งที่เด็กวัยรุ่นไทยเราต่างก็ชื่นชอบกันอยู่แล้วแน่นอนว่าเมื่อเข้ามาเล่นการพนันก็ต้องติดใจกันทุกรายคนที่ชอบเล่น  การแทงบอลไม่ว่าจะเป็นเด็กหรือว่าจะเป็นผู้ใหญ่ก็ต้องการเงินกันทั้งนั้นแน่นอนว่าการแทงบอลทุกเวลานี้จะต้องเล่นเป็นออนไลน์วิธีการเล่นแทงบอลออนไลน์นั่นมีหลากหลายหลายเว็บที่เกินขึ้นมาให้เราได้เลือกเล่นกันมีการโฆษณาอย่างต่อเนื่องที่เข้ามาเล่นพนันจะเลือกเล่นแทงบอลนี่เอง sbobet link และดูแลเอาใจใส่สมาชิกทุกท่านตลอด 24 ชั่วโมง ด้วยระบบที่ทันสมัยที่สุด gclub เพื่อรับหมายเลขบัญชีธนาคารในการเปิดบัญชีของคุณ ที่จะใช้ในการโอนเงินเข้ามาเพื่อแปลงยอดเงินเป็นเครดิตในการเข้าเล่นวางวางเดิมพันกับทางเว็บไซต์ของเรา พร้อมเรายังมีโปรโมชั่นเป็นพิเศษสำหรับสมาชิกไม่ว่าเก่าหรือใหม่อีกด้วยเล่นง่ายได้เงินง่าย ไม่ต้องกังวัลเรื่องเงินอีกต่อไปถ้าท่านเป็นสมชิก เป็นโปรแกรมที่เรียบง่าย ดูสบายตา เลือกเล่นได้สะดวก เปลี่ยนโต๊ะคาสิโนได้ที่เราตลึงได้ง่ายมาก ตอนนี้กำลังได้รับความนิยมสูงมากขึ้นเรื่อยๆจากลูกค้าหลากหลายกลุ่ม ก็อาจจะเป็นเพราะว่าเหตุผลในวิธีเล่นการพนันที่เล่นได้ง่ายและก็สะดวกสบายมากกว่าไปเล่นตามโต๊ะแทงบอลทั่วไป