LinkageError during specj running
clebert.suconic May 5, 2005 2:29 PMWe are seeing this error during Specj running with JBoss-4.0.2, due to this change on the default ClassLoader for Tomcat:
http://jira.jboss.com/jira/browse/JBAS-1691
The error:
java.lang.LinkageError: loader constraints violated when linking org/spec/jappserver/common/DeliveryInfo class at org.spec.jappserver.supplier.web.SupplierDomainServlet.doPost(SupplierDo mainServlet.java:247) at javax.servlet.http.HttpServlet.service(HttpServlet.java:717) at javax.servlet.http.HttpServlet.service(HttpServlet.java:810) at org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(Applica tionFilterChain.java:252) at org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilt erChain.java:173) at org.jboss.web.tomcat.filters.ReplyHeaderFilter.doFilter(ReplyHeaderFilte r.java:81) at org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(Applica tionFilterChain.java:202) at org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilt erChain.java:173) at org.apache.catalina.core.StandardWrapperValve.invoke(StandardWrapperValv e.java:213) at org.apache.catalina.core.StandardContextValve.invoke(StandardContextValv e.java:178) at org.jboss.web.tomcat.security.CustomPrincipalValve.invoke(CustomPrincipa lValve.java:39) at org.jboss.web.tomcat.security.SecurityAssociationValve.invoke(SecurityAs sociationValve.java:153) at org.jboss.web.tomcat.security.JaccContextValve.invoke(JaccContextValve.j ava:59) at org.apache.catalina.core.StandardHostValve.invoke(StandardHostValve.java :126) at org.apache.catalina.valves.ErrorReportValve.invoke(ErrorReportValve.java :105) at org.apache.catalina.core.StandardEngineValve.invoke(StandardEngineValve. java:107) at org.apache.catalina.connector.CoyoteAdapter.service(CoyoteAdapter.java:1 48) at org.apache.coyote.http11.Http11Processor.process(Http11Processor.java:85 6) at org.apache.coyote.http11.Http11Protocol$Http11ConnectionHandler.processC onnection(Http11Protocol.java:744) at org.apache.tomcat.util.net.PoolTcpEndpoint.processSocket(PoolTcpEndpoint .java:527) at org.apache.tomcat.util.net.MasterSlaveWorkerThread.run(MasterSlaveWorker Thread.java:112) at java.lang.Thread.run(Thread.java:534)
A workaround for this is to change UseJBossWebLoader back to true.
Basically you will have to change this file:
jboss-4.0.2/server/default/deploy/jbossweb-tomcat55.sar/META-INF/jboss-s
ervice.xml
Setting the UseJbossWebLoader back to true:
<attribute name="UseJBossWebLoader">true</attribute>
This is happening because util.jar is defined in the EAR, and some of the WEB classes (Servlets) are using classes defined at the EAR level.
I don't know if I should fix some classloader hierarchy for having this working, but I will have to investigate it. For now this workaroun works just fine.
Clebert Suconic