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.

ROMANIA_engineer
  • 54,432
  • 29
  • 203
  • 199
Abhi
  • 533
  • 1
  • 4
  • 8
  • Check one of these TOMCAT_USER (tomcat config), CLASSPATH (tomcat config) or user permission for tomcat dirs – Elshan Dec 02 '20 at 06:13

2 Answers2

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

TheWhiteRabbit
  • 15,480
  • 4
  • 33
  • 57
  • 2
    how can i check jre version of tomcat and eclipse m new to it....Thanx – Abhi Feb 07 '13 at 13:18
  • 1
    how can i check jre and JDK version of tomcat and eclipse used m new to it....Thanx please help me!! – Abhi Feb 07 '13 at 13:19
  • 1
    first check your tomcat's java_home and then in eclipse modify the compiler compatibility settings to match above java_home version – TheWhiteRabbit Feb 07 '13 at 13:22
  • 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. – Piyush Patel Nov 19 '17 at 17:03
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

Suresh Atta
  • 120,458
  • 37
  • 198
  • 307
  • 2
    how can i check jre version of tomcat and eclipse m new to it....Thanx – Abhi Feb 07 '13 at 12:59
  • 3
    to check apache java version http://stackoverflow.com/questions/5957851/how-do-i-find-what-java-version-tomcat6-is-using – Suresh Atta Feb 07 '13 at 13:39
  • 4
    to see in eclipse Window > Prefrences > Java > Installed JREs – Suresh Atta Feb 07 '13 at 13:40
  • 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. – Manu Aug 29 '13 at 09:21
  • 1
    @Suresh Atta: I have done almost everything. But in vain. http://stackoverflow.com/questions/28753473/org-apache-catalina-lifecycleexception-failed-to-start-component-standardserve – Farhan stands with Palestine Feb 27 '15 at 10:57
  • @PhilipRego Please do not read only answers, help youself by read comments. Comments are part of the answer. – Suresh Atta Jul 17 '17 at 17:24