24-Jul-2015 18:40:48.946 SEVERE [localhost-startStop-1] org.apache.catalina.core.ContainerBase.addChildInternal ContainerBase.addChild: start:
org.apache.catalina.LifecycleException: Failed to start component [StandardEngine[Catalina].StandardHost[localhost].StandardContext[/cms]]
at org.apache.catalina.util.LifecycleBase.start(LifecycleBase.java:154)
at org.apache.catalina.core.ContainerBase.addChildInternal(ContainerBase.java:725)
at org.apache.catalina.core.ContainerBase.addChild(ContainerBase.java:701)
at org.apache.catalina.core.StandardHost.addChild(StandardHost.java:717)
at org.apache.catalina.startup.HostConfig.deployWAR(HostConfig.java:945)
at org.apache.catalina.startup.HostConfig$DeployWar.run(HostConfig.java:1768)
at java.util.concurrent.Executors$RunnableAdapter.call(Executors.java:511)
at java.util.concurrent.FutureTask.run(FutureTask.java:266)
at java.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1142)
at java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:617)
at java.lang.Thread.run(Thread.java:745)
Caused by: java.lang.NoClassDefFoundError: javax/jcr/LoginException
at java.lang.Class.getDeclaredFields0(Native Method)
at java.lang.Class.privateGetDeclaredFields(Class.java:2583)
at java.lang.Class.getDeclaredFields(Class.java:1916)
at org.apache.catalina.util.Introspection.getDeclaredFields(Introspection.java:106)
at org.apache.catalina.startup.WebAnnotationSet.loadFieldsAnnotation(WebAnnotationSet.java:256)
at org.apache.catalina.startup.WebAnnotationSet.loadApplicationServletAnnotations(WebAnnotationSet.java:132)
at org.apache.catalina.startup.WebAnnotationSet.loadApplicationAnnotations(WebAnnotationSet.java:65)
at org.apache.catalina.startup.ContextConfig.applicationAnnotationsConfig(ContextConfig.java:334)
at org.apache.catalina.startup.ContextConfig.configureStart(ContextConfig.java:774)
at org.apache.catalina.startup.ContextConfig.lifecycleEvent(ContextConfig.java:305)
at org.apache.catalina.util.LifecycleSupport.fireLifecycleEvent(LifecycleSupport.java:117)
at org.apache.catalina.util.LifecycleBase.fireLifecycleEvent(LifecycleBase.java:90)
at org.apache.catalina.core.StandardContext.startInternal(StandardContext.java:5066)
at org.apache.catalina.util.LifecycleBase.start(LifecycleBase.java:150)
... 10 more
Caused by: java.lang.ClassNotFoundException: javax.jcr.LoginException
at org.apache.catalina.loader.WebappClassLoaderBase.loadClass(WebappClassLoaderBase.java:1305)
at org.apache.catalina.loader.WebappClassLoaderBase.loadClass(WebappClassLoaderBase.java:1157)
... 24 more
24-Jul-2015 18:40:48.947 SEVERE [localhost-startStop-1] org.apache.catalina.startup.HostConfig.deployWAR Error deploying web application archive /var/lib/tomcat8/webapps/cms.war
java.lang.IllegalStateException: ContainerBase.addChild: start: org.apache.catalina.LifecycleException: Failed to start component [StandardEngine[Catalina].StandardHost[localhost].StandardContext[/cms]]
at org.apache.catalina.core.ContainerBase.addChildInternal(ContainerBase.java:728)
at org.apache.catalina.core.ContainerBase.addChild(ContainerBase.java:701)
at org.apache.catalina.core.StandardHost.addChild(StandardHost.java:717)
at org.apache.catalina.startup.HostConfig.deployWAR(HostConfig.java:945)
at org.apache.catalina.startup.HostConfig$DeployWar.run(HostConfig.java:1768)
at java.util.concurrent.Executors$RunnableAdapter.call(Executors.java:511)
at java.util.concurrent.FutureTask.run(FutureTask.java:266)
at java.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1142)
at java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:617)
at java.lang.Thread.run(Thread.java:745)
-Jimmy
Despite meticulously following Hippo's Linux Installation Manual, I too am striking this same error:
INFO: Deploying web application archive /home/cms/tomcat/webapps/cms.war
Jul 16, 2016 2:51:29 PM org.apache.catalina.core.ContainerBase addChildInternal
SEVERE: ContainerBase.addChild: start:
SEVERE: ContainerBase.addChild: start:
org.apache.catalina.LifecycleException: Failed to start component [StandardEngine[Catalina].StandardHost[localhost].StandardContext[/cms]]
at org.apache.catalina.util.LifecycleBase.start(LifecycleBase.java:158)
...
Caused by: java.lang.NoClassDefFoundError: javax/jcr/LoginException
at java.lang.Class.getDeclaredFields0(Native Method)
...
Caused by: java.lang.ClassNotFoundException: javax.jcr.LoginException
at org.apache.catalina.loader.WebappClassLoaderBase.loadClass(WebappClassLoaderBase.java:1282)
Below are the contents of /home/cms/tomcat/shared/lib:
cms@optomus:~/tomcat/logs$ ls -l ../shared/lib/
total 772
-rw-r--r-- 1 cms staff 39590 Jul 13 13:00 hippo-cms7-commons-3.0.0.jar
-rw-r--r-- 1 cms staff 121464 Jul 13 13:00 hippo-repository-api-4.0.1.jar
-rw-r--r-- 1 cms staff 24384 Jul 13 13:00 hippo-repository-builtin-4.0.1.jar
-rw-r--r-- 1 cms staff 33927 Jul 13 13:00 hippo-services-3.0.0.jar
-rw-r--r-- 1 cms staff 16515 Jul 13 13:00 jcl-over-slf4j-1.7.6.jar
-rw-r--r-- 1 cms staff 489884 Jul 13 13:00 log4j-1.2.17.jar
-rw-r--r-- 1 cms staff 28688 Jul 13 13:00 slf4j-api-1.7.6.jar
-rw-r--r-- 1 cms staff 8869 Jul 13 13:00 slf4j-log4j12-1.7.6.jar
And below is the relevant line in catalina.properties:
shared.loader="${catalina.base}/shared/lib","${catalina.base}/shared/lib/*.jar"
File permissions seem fine also, so I'm puzzled why Tomcat/Hippo is not finding the necessary classes.
Any suggestions on what I should check next would be gratefully received.
Thanks & regards,
Chris.
cms@optomus:~/tomcat/logs$ ls -l /usr/local/share/tomcat-endorsed/
total 1560
-rw-r--r-- 1 cms staff 15649 Apr 19 2007 geronimo-jta_1.1_spec-1.1.jar
-rw-r--r-- 1 cms staff 69246 Oct 1 2009 jcr-2.0.jar
-rw-r--r-- 1 cms staff 521157 Mar 9 2013 mail-1.4.7.jar
-rw-r--r-- 1 cms staff 972007 Jun 20 2015 mysql-connector-java-5.1.36.jar
shared.loader="${catalina.base}/shared/lib","${catalina.base}/shared/lib/*.jar","/usr/local/share/tomcat-endorsed","/usr/local/share/tomcat-endorsed/*.jar"
Unless I missed this detail in your installation documentation, you might like to add it in?
Regards,
Chris.
--
Hippo Community Group: The place for all discussions and announcements about Hippo CMS (and HST, repository etc. etc.)
To post to this group, send email to hippo-c...@googlegroups.com
RSS: https://groups.google.com/group/hippo-community/feed/rss_v2_0_msgs.xml?num=50
---
You received this message because you are subscribed to the Google Groups "Hippo Community" group.
To unsubscribe from this group and stop receiving emails from it, send an email to hippo-communi...@googlegroups.com.
Visit this group at https://groups.google.com/group/hippo-community.
JAVA_ENDORSED_DIRS=
/usr/local/share/tomcat-endorsed
in setenv.sh?Hi Chris,Did you haveJAVA_ENDORSED_DIRS=
/usr/local/share/tomcat-endorsed
in setenv.sh?If so, could you also check the JVM has "java.endorsed.dirs" system property correctly? The env variable goes to "java.endorsed.dirs" system property in the end. [1]Also, it would be very fine to copy all the shared jars from the endorsed directory to $CATALINA_BASE/shared/lib/ directory (just like you have the same structure in the tar ball) instead and add ${catalina.base}/shared/lib/*.jar into shared.loader property in catalina.properties, instead of having to mix the concept of endorsed jars and shared jars, IMHO.
Hi Woonsan,
Thanks for your help. Actually, I'm not opposed to the concept of implementing an external Tomcat endorsed directory. Probably it simplifies Tomcat upgrades, without the problem of losing JARs in the process.
Just provided Tomcat actually loads the JARs found there - it seems my Tomcat installation does not, despite this variable being declared in setenv.sh (see below). Seemingly my Tomcat (8.5.3), by default, doesn't act on this variable. I will now look for the reason why, and report back with the answer. :-)
optomus:~# less /home/cms/tomcat/bin/setenv.sh
JAVA_HOME=/usr/java/jdk
JAVA_ENDORSED_DIRS=/usr/local/share/tomcat-endorsed
CATALINA_HOME="/usr/local/tomcat"
CATALINA_BASE="/home/cms/tomcat"
CATALINA_PID="${CATALINA_BASE}/work/catalina.pid"
CLUSTER_ID="$(whoami)-$(hostname -f)"
MAX_HEAP=2048
MIN_HEAP=256
REP_OPTS="-Drepo.bootstrap=false -Drepo.config=file:${CATALINA_BASE}/conf/repository.xml"
JVM_OPTS="-server -Xmx${MAX_HEAP}m -Xms${MIN_HEAP}m -XX:+UseG1GC -Djava.util.Arrays.useLegacyMergeSort=true"
DMP_OPTS="-XX:+HeapDumpOnOutOfMemoryError -XX:HeapDumpPath=/home/cms/heapdumps"
RMI_OPTS="-Djava.rmi.server.hostname=127.0.0.1"
JRC_OPTS="-Dorg.apache.jackrabbit.core.cluster.node_id=${CLUSTER_ID}"
L4J_OPTS="-Dlog4j.configuration=file:${CATALINA_BASE}/conf/log4j.xml"
CATALINA_OPTS="${JVM_OPTS} ${REP_OPTS} ${DMP_OPTS} ${RMI_OPTS} ${L4J_OPTS} ${JRC_OPTS}"
export JAVA_HOME CATALINA_HOME CATALINA_BASE
--
Hippo Community Group: The place for all discussions and announcements about Hippo CMS (and HST, repository etc. etc.)
To post to this group, send email to hippo-c...@googlegroups.com
RSS: https://groups.google.com/group/hippo-community/feed/rss_v2_0_msgs.xml?num=50
---
You received this message because you are subscribed to the Google Groups "Hippo Community" group.
To unsubscribe from this group and stop receiving emails from it, send an email to hippo-communi...@googlegroups.com.
Visit this group at https://groups.google.com/group/hippo-community.
For more options, visit https://groups.google.com/d/optout.
Thanks & regards,
Chris.