1 Reply Latest reply on Oct 16, 2001 10:15 AM by petersen

    JBoss / Tomcat / Cocoon 2

    petersen

      I have unsuccessfully tried to get the above mentioned products to working together. The exception thrown when trying to access Cocoon is shown at the bottom of this mail.

      I have used various combinations of products versions as described below, every time resulting in the same exception.

      Help would be much appreciated. It is not of importence wich version of Tomcat and JBoss I end up using, so if you have instructions of how to accomplish this, I would like to know.

      It is no requirement for me that the tree products runs in the same VM, but I have been unable to access JBoss from Tomcat when the two are running i different VM's. If you have been able to do this, I would very much like to know how.


      Regards
      KP

      --------------------------------------------------------------------------------

      Versions:
      J2SDK1.4beta2 (also tried with J2SDK1.3.1)
      JBoss 2.4.1+Tomcat 3.2.3
      Xerces 1.3.0 (also tried with Xerces 1.4.3)


      Install notes:
      I have placed cocoon.war in %TOMCAT_HOME%\webapps and replaced jaxp.jar and parser.jar
      in %TOMCAT_HOME%\lib by xerces.jar (renamed as parser.jar) as described in the
      cocoon installation instructions.


      Execution and Exception:

      run_with_tomcat.bat

      http://localhost:8080/cocoon/

      Cocoon 2 - Internal servlet error

      --------------------------------------------------------------------------------

      type internal-servlet-error

      message Internal servlet error

      description Cocoon was not initialized.

      sender org.apache.cocoon.servlet.CocoonServlet

      source Cocoon servlet

      exception

      org.apache.avalon.framework.configuration.ConfigurationException: Error trying to load configurations

      request-uri

      /cocoon

      stacktrace

      org.apache.avalon.framework.configuration.ConfigurationException: Error trying to load configurations
      at org.apache.cocoon.Cocoon.configure(Cocoon.java:275)
      at org.apache.cocoon.Cocoon.initialize(Cocoon.java:198)
      at org.apache.cocoon.servlet.CocoonServlet.createCocoon(CocoonServlet.java:727)
      at org.apache.cocoon.servlet.CocoonServlet.init(CocoonServlet.java:204)
      at org.apache.tomcat.core.ServletWrapper.doInit(ServletWrapper.java:317)
      at org.apache.tomcat.core.Handler.init(Handler.java:215)
      at org.apache.tomcat.core.ServletWrapper.init(ServletWrapper.java:296)
      at org.apache.tomcat.context.LoadOnStartupInterceptor.contextInit(LoadOnStartupInterceptor.java:130)
      at org.apache.tomcat.core.ContextManager.initContext(ContextManager.java:491)
      at org.jboss.tomcat.TomcatEntry.initContext(TomcatEntry.java:144)
      at org.jboss.tomcat.EmbeddedTomcatServiceSX.performDeploy(EmbeddedTomcatServiceSX.java:134)
      at org.jboss.web.AbstractWebContainer.deploy(AbstractWebContainer.java:185)
      at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
      at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:42)
      at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:28)
      at java.lang.reflect.Method.invoke(Method.java:313)
      at com.sun.management.jmx.MBeanServerImpl.invoke(MBeanServerImpl.java:1628)
      at com.sun.management.jmx.MBeanServerImpl.invoke(MBeanServerImpl.java:1523)
      at org.jboss.deployment.J2eeDeployer.startModules(J2eeDeployer.java:509)
      at org.jboss.deployment.J2eeDeployer.startApplication(J2eeDeployer.java:468)
      at org.jboss.deployment.J2eeDeployer.deploy(J2eeDeployer.java:208)
      at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
      at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:42)
      at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:28)
      at java.lang.reflect.Method.invoke(Method.java:313)
      at com.sun.management.jmx.MBeanServerImpl.invoke(MBeanServerImpl.java:1628)
      at com.sun.management.jmx.MBeanServerImpl.invoke(MBeanServerImpl.java:1523)
      at org.jboss.ejb.AutoDeployer.deploy(AutoDeployer.java:379)
      at org.jboss.ejb.AutoDeployer.run(AutoDeployer.java:217)
      at org.jboss.ejb.AutoDeployer.startService(AutoDeployer.java:353)
      at org.jboss.util.ServiceMBeanSupport.start(ServiceMBeanSupport.java:107)
      at sun.reflect.GeneratedMethodAccessor15.invoke(Unknown Source)
      at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:28)
      at java.lang.reflect.Method.invoke(Method.java:313)
      at com.sun.management.jmx.MBeanServerImpl.invoke(MBeanServerImpl.java:1628)
      at com.sun.management.jmx.MBeanServerImpl.invoke(MBeanServerImpl.java:1523)
      at org.jboss.configuration.ConfigurationService$ServiceProxy.invoke(ConfigurationService.java:836)
      at $Proxy0.start(Unknown Source)
      at org.jboss.util.ServiceControl.start(ServiceControl.java:81)
      at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
      at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:42)
      at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:28)
      at java.lang.reflect.Method.invoke(Method.java:313)
      at com.sun.management.jmx.MBeanServerImpl.invoke(MBeanServerImpl.java:1628)
      at com.sun.management.jmx.MBeanServerImpl.invoke(MBeanServerImpl.java:1523)
      at org.jboss.Main.(Main.java:210)
      at org.jboss.Main$1.run(Main.java:116)
      at java.security.AccessController.doPrivileged(Native Method)
      at org.jboss.Main.main(Main.java:112)
      Caused by: org.xml.sax.SAXNotSupportedException: Property: http://xml.org/sax/properties/lexical-handler
      at org.apache.crimson.parser.XMLReaderImpl.setProperty(XMLReaderImpl.java:248)
      at org.apache.cocoon.components.parser.JaxpParser.parse(JaxpParser.java:94)
      at org.apache.cocoon.Cocoon.configure(Cocoon.java:271)
      ... 48 more

        • 1. Re: JBoss / Tomcat / Cocoon 2
          petersen

          Just to close loose ends:

          We have installed the above in windoze 2k with servicepack 2.

          1a. deploy tomcat/jboss. We use versions 4.0/2.4.3, but have tried other combinations with success. Note that according to the Cocoon2 homepage certain beta versions of Tomcat dows not work with Cocoon2.

          1b. Add environment variable CATALINA_OPTS=-Xdebug -Xnoagent -Djava.compiler=NONE -Xrunjdwp:transport=dt_socket,server=y,suspend=n,address=7070. This is to be able to debug java run in Tomcat. We use Netbeans 3.2.1 for programming/debugging (remember to add port 7070 to debugging environment).

          2a. delete in "[your path]/JBoss-2.4.3_Tomcat-4.0/jboss/lib" following:
          -crimson.jar
          -jaxp.jar
          -xml.jar
          (xml.jar is not present in latest versions of JBoss.)

          2b. If Tomcat 3.x is used the following files must be also be deleted: from [your path]/JBoss-xxx_Tomcat-3.x/tomcat/lib:
          -parser.jar
          -jaxp.jar

          3a. new run.bat file in [your path]/JBoss-2.4.3_Tomcat-4.0/jboss/bin to:
          @echo off
          @if not "%ECHO%" == "" echo %ECHO%
          @if "%OS%" == "Windows_NT" setlocal

          set JBOSS_CLASSPATH=%JBOSS_CLASSPATH%;run.jar

          REM Add all login modules for JAAS-based security
          REM and all libraries that are used by them here
          set JBOSS_CLASSPATH=%JBOSS_CLASSPATH%;../lib/xerces.jar

          REM Add the XML parser jars and set the JAXP factory names
          REM Crimson parser JAXP setup(default)
          REM set JBOSS_CLASSPATH=%JBOSS_CLASSPATH%;../lib/crimson.jar
          REM set JAXP=-Djavax.xml.parsers.DocumentBuilderFactory=org.apache.crimson.jaxp.DocumentBuilderFactoryImpl
          REM set JAXP=%JAXP% -Djavax.xml.parsers.SAXParserFactory=org.apache.crimson.jaxp.SAXParserFactoryImpl

          echo JBOSS_CLASSPATH=%JBOSS_CLASSPATH%
          java %JAXP% -classpath "%JBOSS_CLASSPATH%" org.jboss.Main %1 %2 %3 %4 %5 %6 %7 %8 %9

          pause

          3b. If you want to be able to debug JBoss/Tomcat/Cocoon2 replace the last line (before pause) with
          java -Xint -Xdebug -Xnoagent -classpath "%JBOSS_CLASSPATH%" -Xrunjdwp:transport=dt_socket,server=y,address=12999,suspend=n org.jboss.Main %1 %2 %3 %4 %5 %6 %7 %8 %9
          We use Netbeans 3.2.1 for programming/debugging (remember to add port 12999 to debugging environment).


          4. copy xerces.jar to [your path]/JBoss-2.4.3_Tomcat-4.0/jboss/lib. We used versions 1.4.3. Download xerces binary and use .jar file in the downloaded xerces_xxx.zip

          5. delete [your path]/JBoss-2.4.3_Tomcat-4.0/jboss/deploy/tomcat-test.ear. This test does not work with the new xml-parser.

          6a. add environment variable TOMCAT_HOME=[your path]/JBoss-2.4.3_Tomcat-4.0/catalina/ (if a Tomcat 3.x version is used "catalina" must be substituted with "tomcat"). This is for use with Cocoon ant file: build.bat.


          Regards
          KP