[arquillian-issues] [JBoss JIRA] (ARQ-1944) Linkage error with arquillian-junit.jar

Chris Rankin (JIRA) issues at jboss.org
Fri Jan 29 08:58:00 EST 2016


    [ https://issues.jboss.org/browse/ARQ-1944?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=13156295#comment-13156295 ] 

Chris Rankin edited comment on ARQ-1944 at 1/29/16 8:57 AM:
------------------------------------------------------------

Confirmed that Tomcat 7.0.50 is actually unaffected, although I have also needed to downgrade my example project to use arquillian-tomcat-embedded-7:1.0.0.CR5 for this version to pass.

Adding {code:XML}<Loader delegate="true"/>{code} to the context.xml also works, although I wouldn't want fundamentally to alter how Tomcat behaves just to work around a problem with using Arquillian!


was (Author: chrisjr):
Confirm that Tomcat 7.0.50 is actually unaffected, although I have also needed to downgrade my example project to use arquillian-tomcat-embedded-7:1.0.0.CR5 for this version to pass.

Adding {code:XML}<Loader delegate="true"/>{code} to the context.xml also works, although I wouldn't want to fundamentally alter how Tomcat behaves just to work around an Arquillian bug.

> Linkage error with arquillian-junit.jar
> ---------------------------------------
>
>                 Key: ARQ-1944
>                 URL: https://issues.jboss.org/browse/ARQ-1944
>             Project: Arquillian
>          Issue Type: Bug
>    Affects Versions: 1.1.7.Final, 1.1.8.Final, 1.1.9.Final, 1.1.10.Final, 1.1.11.Final
>         Environment: JDK7, Windows 7 x64, Linux x64
>            Reporter: Chris Rankin
>         Attachments: arquillian-hamcrest-test.tar.xz
>
>
> Testing a WAR in embedded Tomcat >= 7.0.51 using Restassured, JUnit and Hamcrest matchers. (TestNG works fine).
> The test fails with this error message:
> {code}Tests run: 1, Failures: 0, Errors: 1, Skipped: 0, Time elapsed: 3.404 sec <<< FAILURE! - in org.testing.web.TroubleIT
> testTrouble(org.testing.web.TroubleIT)  Time elapsed: 0.774 sec  <<< ERROR!
> java.lang.LinkageError: loader constraint violation: when resolving interface method "com.jayway.restassured.specification.ResponseSpecification.statusCode(Lorg/hamcrest/Matcher;)Lcom/jayway/restassured/specification/ResponseSpecification;" the class loader (instance of org/apache/catalina/loader/WebappClassLoader) of the current class, org/testing/web/TroubleIT, and the class loader (instance of sun/misc/Launcher$AppClassLoader) for resolved class, com/jayway/restassured/specification/ResponseSpecification, have different Class objects for the type cification.statusCode(Lorg/hamcrest/Matcher;)Lcom/jayway/restassured/specification/ResponseSpecification; used in the signature
> 	at org.testing.web.TroubleIT.testTrouble(TroubleIT.java:35)
> {code}
> This error can be resolved in three different ways:
> - Rewrite the test using TestNG
> - Rewrite the test without using any Hamcrest matchers.
> - Remove "org.hamcrest" from {{org.jboss.arquillian.junit.container.JUnitDeploymentAppender}}.
> See [Issue #78 for arquillian-core|https://github.com/arquillian/arquillian-core/issues/78]



--
This message was sent by Atlassian JIRA
(v6.4.11#64026)


More information about the arquillian-issues mailing list