jakarta-cactus-user mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Josh Smith <dynape...@yahoo.com>
Subject Linkage Error in JBoss with Cactus
Date Thu, 11 Dec 2008 14:38:29 GMT
I am attempting to run Cactus ServletTestCases against an EAR deployed in JBoss. 

If my test cases should fail due to data validation checks, it seems to work fine, but in
many cases I a getting a Linkage error from inside JBoss that I don't know how to resolve.
I am not sure if the Linkage error is Cactus related or not, but I never had the probem running
under the older version of Cactus using the ServletTestRunner, but I get it after swtiching
to the ServletRedirector (so I can run the tests from Maven). 

The Error message from one of the tests is below.

Occasionally I would see this during normal devlopment when  deployment didn't really go
successfully. The AccountingToken object is in a common jar that is used by several things,
but I can't tell if the error here is due to the Cactus ServletRedirector/Proxy, or if it
is a JBoss issue. The Jar that contains the AccountingToken class exists once inside the EAR
file that contains the app I am testing, and once inside the WAR file (deployed separately)
that contains my integration test cases. 

Any help is appreciated. 




 <testcase time="0" classname="com.nrrs.integration.receivables.EstablishReceivableTestCase"
name="testReceviable_create_happyPath">
    <error message="loader constraint violation: when resolving method &quot;com.nrrs.beans.CommonDataServiceLocalBD.getDebtDiscoveryCodes(Lcom/nrrs/common/token/AccountingToken;)Ljava/util/Map;&quot;
the class loader (instance of org/jboss/web/tomcat/service/WebAppClassLoader) of the current
class, com/nrrs/integration/receivables/EstablishReceivableTestCase, and the class loader
(instance of org/jboss/mx/loading/UnifiedClassLoader3) for resolved class, com/nrrs/beans/CommonDataServiceLocalBD,
have different Class objects for the type com/nrrs/common/token/AccountingToken used in the
signature" type="java.lang.LinkageError">java.lang.LinkageError: loader constraint violation:
when resolving method &quot;com.nrrs.beans.CommonDataServiceLocalBD.getDebtDiscoveryCodes(Lcom/nrrs/common/token/AccountingToken;)Ljava/util/Map;&quot;
the class loader (instance of org/jboss/web/tomcat/service/WebAppClassLoader) of the current
class,
 com/nrrs/integration/receivables/EstablishReceivableTestCase, and the class loader (instance
of org/jboss/mx/loading/UnifiedClassLoader3) for resolved class, com/nrrs/beans/CommonDataServiceLocalBD,
have different Class objects for the type com/nrrs/common/token/AccountingToken used in the
signature
 at com.nrrs.integration.receivables.EstablishReceivableTestCase.setUp(EstablishReceivableTestCase.java:60)
 at junit.framework.TestCase.runBare(TestCase.java:132)
 at org.apache.cactus.internal.AbstractCactusTestCase.runBareServer(AbstractCactusTestCase.java:155)
 at org.apache.cactus.internal.server.AbstractWebTestCaller.doTest(AbstractWebTestCaller.java:120)
 at org.apache.cactus.internal.server.AbstractWebTestController.handleRequest_aroundBody0(AbstractWebTestController.java:94)
 at org.apache.cactus.internal.server.AbstractWebTestController.handleRequest_aroundBody1$advice(AbstractWebTestController.java:225)
 at org.apache.cactus.internal.server.AbstractWebTestController.handleRequest(AbstractWebTestController.java:1)
 at org.apache.cactus.server.ServletTestRedirector.doPost_aroundBody2(ServletTestRedirector.java:102)
 at org.apache.cactus.server.ServletTestRedirector.doPost_aroundBody3$advice(ServletTestRedirector.java:225)
 at org.apache.cactus.server.ServletTestRedirector.doPost(ServletTestRedirector.java:1)
 at org.apache.cactus.server.ServletTestRedirector.doGet_aroundBody0(ServletTestRedirector.java:73)
 at org.apache.cactus.server.ServletTestRedirector.doGet_aroundBody1$advice(ServletTestRedirector.java:225)
 at org.apache.cactus.server.ServletTestRedirector.doGet(ServletTestRedirector.java:1)
 at javax.servlet.http.HttpServlet.service(HttpServlet.java:690)
 at javax.servlet.http.HttpServlet.service(HttpServlet.java:803)
 at org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:290)
 at org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:206)
 at org.jboss.web.tomcat.filters.ReplyHeaderFilter.doFilter(ReplyHeaderFilter.java:96)
 at org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:235)
 at org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:206)
 at org.apache.catalina.core.StandardWrapperValve.invoke(StandardWrapperValve.java:230)
 at org.apache.catalina.core.StandardContextValve.invoke(StandardContextValve.java:175)
 at org.jboss.web.tomcat.security.SecurityAssociationValve.invoke(SecurityAssociationValve.java:179)
 at org.jboss.web.tomcat.security.JaccContextValve.invoke(JaccContextValve.java:84)
 at org.apache.catalina.core.StandardHostValve.invoke(StandardHostValve.java:127)
 at org.apache.catalina.valves.ErrorReportValve.invoke(ErrorReportValve.java:102)
 at org.jboss.web.tomcat.service.jca.CachedConnectionValve.invoke(CachedConnectionValve.java:157)
 at org.apache.catalina.core.StandardEngineValve.invoke(StandardEngineValve.java:109)
 at org.apache.catalina.connector.CoyoteAdapter.service(CoyoteAdapter.java:262)
 at org.apache.coyote.http11.Http11Processor.process(Http11Processor.java:844)
 at org.apache.coyote.http11.Http11Protocol$Http11ConnectionHandler.process(Http11Protocol.java:583)
 at org.apache.tomcat.util.net.JIoEndpoint$Worker.run(JIoEndpoint.java:446)
 at java.lang.Thread.run(Thread.java:619)
</error>

---------------------------------------------------------------------
To unsubscribe, e-mail: cactus-user-unsubscribe@jakarta.apache.org
For additional commands, e-mail: cactus-user-help@jakarta.apache.org


Mime
View raw message