1 Reply Latest reply on May 9, 2003 12:18 PM by Kevin Hooke

    Struts app gives LinkageError

    Kevin Hooke Newbie

      Hi - I have deployed a war file on JBoss3.0.4 with Tomcat4.0.6 and I am seeing the following exception when I first hit a url that is mapped to a Struts action:

      2003-05-09 10:37:32,930 ERROR [org.jboss.web.localhost.Engine] StandardWrapperValve[action]: Servlet.service() for servlet action threw exception
      javax.servlet.UnavailableException: Cannot initialize RequestProcessor of class org.apache.struts.action.RequestProcessor: java.lang.LinkageError: loader constraints violated when linking org/apache/struts/action/ActionServlet class
      at org.apache.struts.action.ActionServlet.getRequestProcessor(ActionServlet.java:813)
      at org.apache.struts.action.ActionServlet.process(ActionServlet.java:1292)
      at org.apache.struts.action.ActionServlet.doPost(ActionServlet.java:510)
      at javax.servlet.http.HttpServlet.service(HttpServlet.java:760)
      at javax.servlet.http.HttpServlet.service(HttpServlet.java:853)
      at org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:247)
      at org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:193)
      at org.apache.catalina.core.StandardWrapperValve.invoke(StandardWrapperValve.java:243)
      at org.apache.catalina.core.StandardPipeline.invokeNext(StandardPipeline.java:566)
      at org.apache.catalina.core.StandardPipeline.invoke(StandardPipeline.java:472)
      at org.apache.catalina.core.ContainerBase.invoke(ContainerBase.java:943)
      at org.apache.catalina.core.StandardContextValve.invoke(StandardContextValve.java:190)
      at org.apache.catalina.core.StandardPipeline.invokeNext(StandardPipeline.java:566)
      at org.apache.catalina.valves.CertificatesValve.invoke(CertificatesValve.java:246)
      at org.apache.catalina.core.StandardPipeline.invokeNext(StandardPipeline.java:564)
      at org.apache.catalina.core.StandardPipeline.invoke(StandardPipeline.java:472)
      at org.apache.catalina.core.ContainerBase.invoke(ContainerBase.java:943)
      at org.apache.catalina.core.StandardContext.invoke(StandardContext.java:2347)
      at org.apache.catalina.core.StandardHostValve.invoke(StandardHostValve.java:180)
      at org.apache.catalina.core.StandardPipeline.invokeNext(StandardPipeline.java:566)
      at org.apache.catalina.valves.ErrorDispatcherValve.invoke(ErrorDispatcherValve.java:170)
      at org.apache.catalina.core.StandardPipeline.invokeNext(StandardPipeline.java:564)
      at org.apache.catalina.valves.ErrorReportValve.invoke(ErrorReportValve.java:170)
      at org.apache.catalina.core.StandardPipeline.invokeNext(StandardPipeline.java:564)
      at org.apache.catalina.valves.AccessLogValve.invoke(AccessLogValve.java:468)
      at org.apache.catalina.core.StandardPipeline.invokeNext(StandardPipeline.java:564)
      at org.apache.catalina.core.StandardPipeline.invoke(StandardPipeline.java:472)
      at org.apache.catalina.core.ContainerBase.invoke(ContainerBase.java:943)
      at org.apache.catalina.core.StandardEngineValve.invoke(StandardEngineValve.java:174)
      at org.apache.catalina.core.StandardPipeline.invokeNext(StandardPipeline.java:566)
      at org.apache.catalina.core.StandardPipeline.invoke(StandardPipeline.java:472)
      at org.apache.catalina.core.ContainerBase.invoke(ContainerBase.java:943)
      at org.apache.catalina.connector.http.HttpProcessor.process(HttpProcessor.java:1027)
      at org.apache.catalina.connector.http.HttpProcessor.run(HttpProcessor.java:1125)
      at java.lang.Thread.run(Thread.java:536)
      2003-05-09 10:37:32,970 INFO [org.jboss.web.localhost.Engine] StandardWrapper[/sitewatch:action]: Marking servlet action as unavailable

      This same webapp deploys and runs ok on JBoss 2.4.1 with Tomcat3.2.3.

      I have deployed the struts-example app as well and this does work ok.

      Any ideas about what is going wrong?

      Thanks, Kevin

        • 1. Re: Struts app gives LinkageError
          Kevin Hooke Newbie

          I've found the problem myself: my build script in JDeveloper was for some reason expanding the jars in my web-inf/lib and adding them to web-inf/classes, in addition to adding the jar themsevles.

          I guess the struts classes were accessible in two different places to two different classloaders?

          (I replaced the JDeveloper build profile with an ant script instead so now it builds, deploys and runs ok).

          Thanks,