[opencms-dev] opencms 9.5.0 cmsshell.sh

Kai Widmann Widmann at mediaworx.com
Sat Jan 17 17:39:01 CET 2015


Hi Chris,

this is due to a bug in the Linux version of the CmsShell, there is a relative path set in the Classpath where an absolute path is needed.
We had the same problem and fixed it. There is a pull request on GitHub that is already merged but it will only become available in the next version of OpenCms. Meanwhile there are two options: start cmsshell only from the same directory where cmsshell.sh is located (WEB-INF I think), or change cmsshell.sh according to our Pull Request:
https://github.com/mediaworx/opencms-core/commit/53ae1e0bc07aadc46413da755517c1061adb7759

Cheers

Kai

Von: opencms-dev-bounces at opencms.org [mailto:opencms-dev-bounces at opencms.org] Im Auftrag von Christoph Kukulies
Gesendet: Freitag, 16. Januar 2015 17:48
An: The OpenCms mailing list
Betreff: Re: [opencms-dev] opencms 9.5.0 cmsshell.sh

Just to add another observation during opencms startup:

16 Jan 2015 17:34:43,490  INFO [pencms.module.CmsModuleManager: 795] . Module configuration : initializing module class org.opencms.search.solr.spellchecking.CmsSpellcheckingModuleAction
16 Jan 2015 17:34:43,491  INFO [pencms.module.CmsModuleManager: 786] . Module configuration : could not create instance for module "org.opencms.frontend.templatetwo"
java.lang.ClassNotFoundException: org.opencms.frontend.templatetwo.CmsTemplateModuleAction
        at java.net.URLClassLoader$1.run(URLClassLoader.java:366)
        at java.net.URLClassLoader$1.run(URLClassLoader.java:355)
        at java.security.AccessController.doPrivileged(Native Method)
        at java.net.URLClassLoader.findClass(URLClassLoader.java:354)
        at java.lang.ClassLoader.loadClass(ClassLoader.java:425)
        at sun.misc.Launcher$AppClassLoader.loadClass(Launcher.java:308)
        at java.lang.ClassLoader.loadClass(ClassLoader.java:358)
        at java.lang.Class.forName0(Native Method)
        at java.lang.Class.forName(Class.java:191)
        at org.opencms.module.CmsModuleManager.initialize(CmsModuleManager.java:784)
        at org.opencms.main.OpenCmsCore.initConfiguration(OpenCmsCore.java:1350)
        at org.opencms.main.OpenCmsCore.upgradeRunlevel(OpenCmsCore.java:1970)
        at org.opencms.main.CmsShell.<init>(CmsShell.java:526)
        at org.opencms.main.CmsShell.main(CmsShell.java:604)
16 Jan 2015 17:34:43,493  INFO [pencms.module.CmsModuleManager: 795] . Module configuration : initializing module class org.opencms.workplace.CmsWorkplaceAction
16 Jan 2015 17:34:43,493  INFO [pencms.module.CmsModuleManager: 820] . Module configuration : 3 module classes initialized

(For backward compatibility I've loaded org.opencms.frontend.templatetwo)



Am 16.01.2015 um 17:03 schrieb Christoph Kukulies:
Some remarks on running cmsshell.sh under ubuntu (Tomcat 7)

cmsshell.sh is run by
#!/bin/sh

(which doesn't know of pushd/popd) , so I changed that to our beloved /bin/bash

The whole cmsshell.sh now looks with me here under Ubuntu  Ubuntu 14.04.1 LTS:

#!/bin/bash
# Start script for the OpenCms Shell
#
# Please make sure that "servlet-api.jar" and "jsp-api.jar" are found.
#

# get path to opencms base directory
pushd `dirname $0` > /dev/null
OPENCMS_BASE=`dirs +0 -l`
popd > /dev/null

# get path to tomcat home
if [ -z "$TOMCAT_HOME" ]; then
        [ -n "$CATALINA_HOME" ] && TOMCAT_HOME="$CATALINA_HOME"
        [ -z "$TOMCAT_HOME" ] && TOMCAT_HOME="$OPENCMS_BASE"/../../..
fi

TOMCAT_CLASSPATH=""
# Support for tomcat 5
for JAR in ${TOMCAT_HOME}/common/lib/*.jar; do
   TOMCAT_CLASSPATH="${TOMCAT_CLASSPATH}:${JAR}"
done
for JAR in ${TOMCAT_HOME}/shared/lib/*.jar; do
   TOMCAT_CLASSPATH="${TOMCAT_CLASSPATH}:${JAR}"
done
# Support for tomcat 6
for JAR in ${TOMCAT_HOME}/lib/*.jar; do
   TOMCAT_CLASSPATH="${TOMCAT_CLASSPATH}:${JAR}"
done

OPENCMS_CLASSPATH=""
for JAR in ${OPENCMS_BASE}/lib/*.jar; do
   OPENCMS_CLASSPATH="${OPENCMS_CLASSPATH}:${JAR}"
done

SERVLET_API=/usr/share/java/servlet-api-3.0.jar
JSP_API=/usr/share/java/jsp-api-2.2.jar

java -classpath "${SERVLET_API}:${JSP_API}:${OPENCMS_CLASSPATH}:${TOMCAT_CLASSPATH}:classes" org.opencms.main.CmsShell -base="${OPENCMS_BASE}" "$@"


But executing cmsshell.sh results in just hanging without issueing any prompt:

root at kuku:/var/lib/tomcat7/webapps/ROOT/WEB-INF# ./cmsshell.sh
OpenCms WEB-INF path:  "/var/lib/tomcat7/webapps/ROOT/WEB-INF".
OpenCms property file: "/var/lib/tomcat7/webapps/ROOT/WEB-INF/config/opencms.properties".

Not starting JLAN server because no config file was found at /var/lib/tomcat7/webapps/ROOT/WEB-INF/config/jlanConfig.xml

Welcome to the OpenCms shell!


This is OpenCms 9.5.0.

Copyright (c) 2014 Alkacon Software GmbH
OpenCms comes with ABSOLUTELY NO WARRANTY
This is free software, and you are welcome to
redistribute it under certain conditions.
Please see the GNU Lesser General Public Licence for
further details.

Hangs here....

--
Chris Christoph P. U. Kukulies kukulies (at) rwth-aachen.de


--
Chris Christoph P. U. Kukulies kukulies (at) rwth-aachen.de
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <https://webmail.opencms.org/pipermail/opencms-dev/attachments/20150117/fd504d7e/attachment.htm>


More information about the opencms-dev mailing list