3 Replies Latest reply on Apr 21, 2002 6:57 PM by Roger Guillen Quiroz

    How to make Cocoon accessible to other apps in JBoss+Tomcat?

    John Clarke Newbie

      My question is how to enable apps to access eachother in JBoss 2.4.4 + Tomcat 4.0.1. Here's my problem and what I've done -

      I have the Cocoon 2 cocoon.war app running ok in its /cocoon app context.

      Eoin Lane's jaba.war deploys to /jaba with no report of errors. (Eoin explains how to add XML content to J2EE apps using Cocoon is his paper http://www.javaworld.com/javaworld/jw-02-2001/jw-0209-xmlj2ee.html)

      But when I run the /jaba login.xml page, the Tomcat loader/dispatcher for /jaba can't find the Cocoon servlet in /cocoon. The server.log contents are below.

      Cocoon loads before jaba, and the web.xml for /jaba includes


      <servlet-name>org.apache.cocoon.Cocoon</servlet-name>
      <servlet-class>org.apache.cocoon.Cocoon</servlet-class>
      <init-param>
      <param-name>properties</param-name>
      <param-value>
      cocoon.properties
      </param-value>
      </init-param>

      <servlet-mapping>
      <servlet-name>org.apache.cocoon.Cocoon</servlet-name>
      <url-pattern>*.xml</url-pattern>
      </servlet-mapping>

      From reviewing other reports I believe this is a classpath/config issue rather than a bug.

      To attempt a fix I added [path snipped] jboss\tmp\deploy\Default\cocoon.war\web1004\WEB-INF\lib\cocoon-2.0.jar to the JBOSS_CLASSPATH, but that causes a runtime error early in JBoss startup. So I assume this is the wrong approach.

      Any suggestions would be appreciated. John

      ------- server.log ---------

      [10:01:10,886,Default] JBoss-2.4.4 Started in 0m:22s.342
      [10:31:48,238,EmbeddedCatalinaServiceSX] jsp: init
      [10:31:48,378,EmbeddedCatalinaServiceSX]
      StandardWrapper[/jaba:org.apache.cocoon.Cocoon]: Marking servlet
      org.apache.cocoon.Cocoon as unavailable
      [10:31:48,388,EmbeddedCatalinaServiceSX] ApplicationDispatcher[/jaba]
      Allocate exception for servlet org.apache.cocoon.Cocoon
      javax.servlet.ServletException: Wrapper cannot find servlet class
      org.apache.cocoon.Cocoon or a class it depends on
      at
      org.apache.catalina.core.StandardWrapper.load(StandardWrapper.java:807)
      at
      org.apache.catalina.core.StandardWrapper.allocate(StandardWrapper.java:615)
      at
      org.apache.catalina.core.ApplicationDispatcher.invoke(ApplicationDispatcher.java:648)
      at
      org.apache.catalina.core.ApplicationDispatcher.doForward(ApplicationDispatcher.java:431)
      at
      org.apache.catalina.core.ApplicationDispatcher.forward(ApplicationDispatcher.java:355)
      at
      org.apache.jasper.runtime.PageContextImpl.forward(PageContextImpl.java:409)
      at org.apache.jsp.reserve$jsp._jspService(reserve$jsp.java:149)
      at org.apache.jasper.runtime.HttpJspBase.service(HttpJspBase.java:107)
      at javax.servlet.http.HttpServlet.service(HttpServlet.java:853)
      at
      org.apache.jasper.servlet.JspServlet$JspServletWrapper.service(JspServlet.java:202)
      at
      org.apache.jasper.servlet.JspServlet.serviceJspFile(JspServlet.java:382)
      at org.apache.jasper.servlet.JspServlet.service(JspServlet.java:474)
      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:201)
      at
      org.apache.catalina.core.StandardPipeline.invokeNext(StandardPipeline.java:566)
      at
      org.apache.catalina.authenticator.AuthenticatorBase.invoke(AuthenticatorBase.java:472)
      at
      org.apache.catalina.core.StandardPipeline.invokeNext(StandardPipeline.java:564)
      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:2344)
      at
      org.apache.catalina.core.StandardHostValve.invoke(StandardHostValve.java:164)
      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.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:163)
      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:1011)
      at
      org.apache.catalina.connector.http.HttpProcessor.run(HttpProcessor.java:1106)
      at java.lang.Thread.run(Thread.java:498)
      [10:31:48,438,EmbeddedCatalinaServiceSX] ----- Root Cause -----
      java.lang.ClassNotFoundException: org.apache.cocoon.Cocoon
      at
      org.apache.catalina.loader.WebappClassLoader.loadClass(WebappClassLoader.java:1307)
      at
      org.apache.catalina.loader.WebappClassLoader.loadClass(WebappClassLoader.java:1156)
      at
      org.apache.catalina.core.StandardWrapper.load(StandardWrapper.java:801)