Jahia in English > Server libs not...

0 (0 Good)
0 (0 Bad)

Server libs not copied by mvn jahia:deploy

by  hwellmann »  2012/11/27 21:09

I've followed the instructions in jahia/trunk/README, and I'm unable to start Jahia after running jahia:deploy. All I get is the following error message in the Tomcat logs:

SEVERE: Error configuring application listener of class org.jahia.bin.listeners.JahiaContextLoaderListener
java.lang.NoClassDefFoundError: org/apache/pluto/container/PortletContainerException

The problem disappears after manually copying the extra libs from a standalone Jahia installation to CATALINA_HOME/lib.

Is this expected, or am I missing some config property?

Best regards,

Harald

 

  • Server libs not copied by mvn jahia:deploy
    2012/11/27 21:09

    hwellmann <p> I&#39;ve followed the instructions in jahia/trunk/README, and I&#39;m unable to start Jahia after running jahia:deploy. All I get is the following error message in the Tomcat logs:</p> <p> SEVERE: Error configuring application listener of class org.jahia.bin.listeners.JahiaContextLoaderListener<br /> java.lang.NoClassDefFoundError: org/apache/pluto/container/PortletContainerException</p> <p> The problem disappears after manually copying the extra libs from a standalone Jahia installation to CATALINA_HOME/lib.</p> <p> Is this expected, or am I missing some config property?</p> <p> Best regards,</p> <p> Harald</p> <p> &nbsp;</p>

  • Number of messages  22
    Registration date Nov 27, 2012
    0 (0 Good)
    0 (0 Bad)

    Re: Server libs not copied by mvn jahia:deploy

    by  glucazeau »  2012/11/28 15:40

    Hello Harald,

    you didn't miss any step, the Jahia maven plugin is supposed to copy those libraries during the deploy goal execution. If you didn't have any errors, that may be just one or two missing libraries. As the trunk is not stable, it's something possible. I will try and see if I can reproduce and fix it. Thansk for your feedbacks.

    Best regards,

    Guillaume

  • Re: Server libs not copied by mvn jahia:deploy
    2012/11/28 15:40

    glucazeau <p> Hello Harald,</p> <p> you didn&#39;t miss any step, the Jahia maven plugin is supposed to copy those libraries during the deploy goal execution. If you didn&#39;t have any errors, that may be just one or two missing libraries. As the trunk is not stable, it&#39;s something possible. I will try and see if I can reproduce and fix it. Thansk for your feedbacks.</p> <p> Best regards,</p> <p> Guillaume</p>

  • Number of messages  93
    Registration date Nov 28, 2012
    0 (0 Good)
    0 (0 Bad)

    Re: Server libs not copied by mvn jahia:deploy

    by  glucazeau »  2012/11/28 16:08

    Also, what Tomcat version did you use? For deploying the trunk you should use Tomcat 7, the Readme doesn't seem up to date.

  • Re: Server libs not copied by mvn jahia:deploy
    2012/11/28 16:08

    glucazeau <p> Also, what Tomcat version did you use? For deploying the trunk you should use Tomcat 7, the Readme doesn&#39;t seem up to date.</p>

  • Number of messages  93
    Registration date Nov 28, 2012
    0 (0 Good)
    0 (0 Bad)

    Re: Re: Server libs not copied by mvn jahia:deploy

    by  hwellmann »  2012/11/28 18:11

    I was using Tomcat 6.0.32, given that Jahia 6.6.1.0 does not work with Tomcat 7, at least not with the installer.

  • Re: Re: Server libs not copied by mvn jahia:deploy
    2012/11/28 18:11

    hwellmann <p> I was using Tomcat 6.0.32, given that Jahia 6.6.1.0 does not work with Tomcat 7, at least not with the installer.</p>

  • Number of messages  22
    Registration date Nov 28, 2012
    0 (0 Good)
    0 (0 Bad)

    Re: Re: Re: Server libs not copied by mvn jahia:deploy

    by  hwellmann »  2012/11/28 18:33

    Tried Tomcat 7.0.33. Same exception when starting Tomcat. No libs are copied to $CATALINA_HOME/lib.

    Anything wrong with these settings?

      <profile>
        <id>jahia-tomcat7</id>
        <properties>
           <jahia.deploy.targetServerType>tomcat</jahia.deploy.targetServerType>
           <jahia.deploy.targetServerDirectory>/home/hwellmann/tmp/apache-tomcat-7.0.33</jahia.deploy.targetServerDirectory>
           <jahia.deploy.targetServerVersion>7</jahia.deploy.targetServerVersion>
           <jahia.deploy.processingServer>true</jahia.deploy.processingServer>
        </properties>
      </profile>
    <

  • Re: Re: Re: Server libs not copied by mvn jahia:deploy
    2012/11/28 18:33

    hwellmann <p> Tried Tomcat 7.0.33. Same exception when starting Tomcat. No libs are copied to $CATALINA_HOME/lib.</p> <p> Anything wrong with these settings?</p> <p> &nbsp; &lt;profile&gt;<br /> &nbsp;&nbsp;&nbsp; &lt;id&gt;jahia-tomcat7&lt;/id&gt;<br /> &nbsp;&nbsp;&nbsp; &lt;properties&gt;<br /> &nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; &lt;jahia.deploy.targetServerType&gt;tomcat&lt;/jahia.deploy.targetServerType&gt;<br /> &nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; &lt;jahia.deploy.targetServerDirectory&gt;/home/hwellmann/tmp/apache-tomcat-7.0.33&lt;/jahia.deploy.targetServerDirectory&gt;<br /> &nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; &lt;jahia.deploy.targetServerVersion&gt;7&lt;/jahia.deploy.targetServerVersion&gt;<br /> &nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; &lt;jahia.deploy.processingServer&gt;true&lt;/jahia.deploy.processingServer&gt;<br /> &nbsp;&nbsp;&nbsp; &lt;/properties&gt;<br /> &nbsp; &lt;/profile&gt;<br /> &lt;</p>

  • Number of messages  22
    Registration date Nov 28, 2012
    1 (1 Good)
    0 (0 Bad)

    Re: Re: Re: Re: Server libs not copied by mvn jahia:deploy

    by  shuber »  2012/11/28 19:49

    Hello Harald,

    Actually the server libs must be deployed previously in your Tomcat installation. I am copying here below the instructions that are generated by the installer when a custom Install is done by deactivating the default packaged Tomcat. Please follow these steps before going any further:

     

    How to install Jahia xCM 6.6 on Apache Tomcat 6.0.x server

    Installation

    The installation procedure for Apache Tomcat 6 is as follows:

    1. Launch the installer
    2. Choose Custom install (advanced) installation type
    3. Select only Jahia xCM Platform pack
    4. Follow the next steps of the installer

    Once the installer is finished in your install directory you should find a file named ROOT.war [1], a file named shared-libraries.zip and if you chose to externalize the configuration you will also have a jahia-config.jar file.

    Deployment

    Further it is assumed that the Apache Tomcat server is installed in the <tomcat> folder.

    1. Unzip the content of the shared-libraries.zip file into your <tomcat>/lib directory.
    2. In case ROOT was configured as the Web application context name, please, remove or rename the default Tomcat ROOT Web application at <tomcat>/webapps/ROOT, if it exists, to e.g. tomcat.
    3. Unzip the content of the ROOT.war[1] file to the <tomcat>/webapps/ROOT[1] directory.
    4. Adjust the serverHome veriable value in the <tomcat>/webapps/ROOT/WEB-INF/etc/config/jahia.properties file to point to your <tomcat> folder path.
    5. If you chose to externalize the configuration into a JAR file, either copy the jahia-config.jar file into the<tomcat>/lib directory, or modify the catalina.sh/bat files to add it to the classpath.
    6. Adjust the JVM, connector and servlet container options appropriately (see next sections).

    JVM tuning options

    The default JVM options in the Tomcat's startup script (<tomcat>/bin/catalina.bat or <tomcat>/bin/catalina.sh) should be adjusted to use server JVM ("-server" option), have at least 1 GB[2] heap size (-Xms1024m -Xmx1024m) and at least 256 MB[2] as a limit for the permanent generation heap size (-XX:MaxPermSize=256m), if applicable, also adding another tuning options.

    This can be done by adding the following line to your <tomcat>/bin/catalina.bat (Windows OS):

    set CATALINA_OPTS=%CATALINA_OPTS% -Dsun.io.useCanonCaches=false -Xms1024m -Xmx1024m -XX:MaxPermSize=256m -server -Dhibernate.jdbc.use_streams_for_binary=true -verbose:gc -XX:+HeapDumpOnOutOfMemoryError

    or to the <tomcat>/bin/catalina.sh file (non Windows OS):

    CATALINA_OPTS="$CATALINA_OPTS -Xms1024m -Xmx1024m -Djava.awt.headless=true -XX:MaxPermSize=256m -server -Dhibernate.jdbc.use_streams_for_binary=true -verbose:gc -XX:+HeapDumpOnOutOfMemoryError"

    Although these steps were written for Tomcat 7, they should also work with Tomcat 7, although we have noticed that it uses a bit more memory so it is recommended you increate the -Xmx setting to something like -Xmx1500m

    As for the settings, here are the settings I use for the Maven plugin:

     

            <profile>
                <id>jahia-6.6-mysql</id>
                <properties>
                    <jahia.configure.active>true</jahia.configure.active>
                    <jahia.configure.databaseType>mysql</jahia.configure.databaseType>
                    <jahia.configure.databaseUrl>jdbc:mysql://localhost:8889/jahia-6.6?useUnicode=true&amp;characterEncoding=UTF-8&amp;useServerPrepStmts=false</jahia.configure.databaseUrl>
                    <jahia.configure.databaseUsername>jahia</jahia.configure.databaseUsername>
                    <jahia.configure.databasePassword>jahia</jahia.configure.databasePassword>
                    <jahia.configure.localIp>127.0.0.1</jahia.configure.localIp>
                    <jahia.deploy.processingServer>true</jahia.deploy.processingServer>
                    <jahia.test.url>http://localhost:8080/cms</jahia.test.url>
                </properties>
            </profile>
            <profile>
                <id>jahia-6.6-tomcat</id>
                <properties>
                    <jahia.deploy.targetServerType>tomcat</jahia.deploy.targetServerType>
                    <jahia.deploy.targetServerVersion>6</jahia.deploy.targetServerVersion>
                    <jahia.deploy.targetServerDirectory>/Users/loom/java/deployments/jahia-6.6/apache-tomcat-7.0.23
                    </jahia.deploy.targetServerDirectory>
                    <jahia.deploy.war.dirName>ROOT</jahia.deploy.war.dirName>
                    <jahia.deploy.war.contextPath>/</jahia.deploy.war.contextPath>
                    <jahia.deploy.war.servletPath>/cms</jahia.deploy.war.servletPath>
                    <jahia.debug.address>socket:hostname=localhost,port=8000</jahia.debug.address>
                </properties>
            </profile>
     
    Note that for Tomcat 7, keep the targetServerVersion at 6 since the plugin was written before Tomcat 7 was released but as they are similar everything should work. I can actually use Tomcat 6 and 7 interchangeably. Also please note that in the above settings I have included the database settings, the jahia:configure goal will reset the database when executed so you might want to be careful with that.
     
    Best regards,
      Serge Huber.
     

     

    Serge Huber (shuber)

    Number of messages  271
    Registration date
    Contact
    Share
    Feedback

    Get in touch

    Whether you are a current user or if you are just evaluating Jahia, we are here to help.

    Contact us

    Share this page