org.apache.catalina.LifecycleException: Failed to start component [StandardEngine[Catalina].StandardHost[localhost].StandardContext[/CollegeWebsite]] [duplicate]
Asked Answered
H

2

51
org.apache.catalina.core.ContainerBase addChildInternal
SEVERE: ContainerBase.addChild: start: 
org.apache.catalina.LifecycleException: Failed to start component [StandardEngine[Catalina].StandardHost[localhost].StandardContext[/CollegeWebsite]]
    at org.apache.catalina.util.LifecycleBase.start(LifecycleBase.java:154)
    at org.apache.catalina.core.ContainerBase.addChildInternal(ContainerBase.java:895)
    at org.apache.catalina.core.ContainerBase.addChild(ContainerBase.java:871)
    at org.apache.catalina.core.StandardHost.addChild(StandardHost.java:615)
    at org.apache.catalina.startup.HostConfig.deployWAR(HostConfig.java:962)
    at org.apache.catalina.startup.HostConfig$DeployWar.run(HostConfig.java:1603)
    at java.util.concurrent.Executors$RunnableAdapter.call(Executors.java:469)
    at java.util.concurrent.FutureTask$Sync.innerRun(FutureTask.java:332)
    at java.util.concurrent.FutureTask.run(FutureTask.java:166)
    at java.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1076)
    at java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:597)
    at java.lang.Thread.run(Thread.java:637)
Caused by: java.lang.UnsupportedClassVersionError: com/Servlets/AddCourse : Unsupported major.minor version 51.0 (unable to load class com.Servlets.AddCourse)
    at org.apache.catalina.loader.WebappClassLoader.findClassInternal(WebappClassLoader.java:2893)
    at org.apache.catalina.loader.WebappClassLoader.findClass(WebappClassLoader.java:1170)
    at org.apache.catalina.loader.WebappClassLoader.loadClass(WebappClassLoader.java:1678)
    at org.apache.catalina.loader.WebappClassLoader.loadClass(WebappClassLoader.java:1556)
    at org.apache.catalina.startup.WebAnnotationSet.loadClass(WebAnnotationSet.java:480)
    at org.apache.catalina.startup.WebAnnotationSet.loadApplicationServletAnnotations(WebAnnotationSet.java:130)
    at org.apache.catalina.startup.WebAnnotationSet.loadApplicationAnnotations(WebAnnotationSet.java:66)
    at org.apache.catalina.startup.ContextConfig.applicationAnnotationsConfig(ContextConfig.java:381)
    at org.apache.catalina.startup.ContextConfig.configureStart(ContextConfig.java:858)
    at org.apache.catalina.startup.ContextConfig.lifecycleEvent(ContextConfig.java:345)
    at org.apache.catalina.util.LifecycleSupport.fireLifecycleEvent(LifecycleSupport.java:119)
    at org.apache.catalina.util.LifecycleBase.fireLifecycleEvent(LifecycleBase.java:90)
    at org.apache.catalina.core.StandardContext.startInternal(StandardContext.java:5161)
    at org.apache.catalina.util.LifecycleBase.start(LifecycleBase.java:150)
    ... 11 more

How can I overcome this error? My project was deployed on Eclipse easily but it can't deploy when I deploy it directly through Tomcat server.

Hospitalize answered 7/2, 2013 at 12:7 Comment(1)
Check one of these TOMCAT_USER (tomcat config), CLASSPATH (tomcat config) or user permission for tomcat dirsCrispy
E
30

You have a version conflict, please verify whether compiled version and JVM of Tomcat version are same. you can do it by examining tomcat startup .bat , looking for JAVA_HOME

Ephemera answered 7/2, 2013 at 12:14 Comment(4)
how can i check jre version of tomcat and eclipse m new to it....ThanxHospitalize
how can i check jre and JDK version of tomcat and eclipse used m new to it....Thanx please help me!!Hospitalize
first check your tomcat's java_home and then in eclipse modify the compiler compatibility settings to match above java_home versionEphemera
I am not sure whether this is the case because I had one application which was running earlier with the same configuration but not it doesn't.Prouty
T
16

This error happens because of your Jre version of Eclipse and Tomcat are mismatched ..either change eclipse one to tomcat one or ViceVersa..

Both should be same ..Java version mismatched ..Check it

Transpierce answered 7/2, 2013 at 12:15 Comment(6)
how can i check jre version of tomcat and eclipse m new to it....ThanxHospitalize
to check apache java version #5958351Transpierce
to see in eclipse Window > Prefrences > Java > Installed JREsTranspierce
I just configured the build path: project -> right click -> build paht -> library -> check whether the jre version is correct; if not, remove it and add the right one.Silverstein
@Suresh Atta: I have done almost everything. But in vain. #28753973Alkyd
@PhilipRego Please do not read only answers, help youself by read comments. Comments are part of the answer.Transpierce

© 2022 - 2024 — McMap. All rights reserved.