Tomcat: LifecycleException when deploying
Solution 1
This means something is wrong with your application configuration or startup.
There is always information about that in the logs - check logs/catalina.out
and figure out what is wrong.
Solution 2
I had this problem, where it just would not deploy on Tomcat , then i removed all @webServlet Annotations from all my servlet code and it deployed successfully.
Solution 3
Remove the servlet-api.jar from build path and just add it on web-inf lib folder and then export the WAR file..it'll work...cheers..!!!
Solution 4
Check your WEB-INF/web.xml file for the servlet Mapping.
Solution 5
In eclipse ... go to Servers view ... right click on the tomcat server -> Add or remove programs -> Remove all other projects. Now try to run the project. It should work.
Jean Logeart
All source snippets I post on Stack Overflow are under the CC0 licence ("No Rights Reserved" - public domain).
Updated on February 26, 2021Comments
-
Jean Logeart over 3 years
I just downloaded the Tomcat 7.0.23 package on my Ubuntu 11.10.
I followed the instructions on a Google API website to deploy their example webapp. It basically consists of
jar
files placed in theWEB-INF/lib
directory and aweb.xml
file placed in theWEB-INF
directory.Yet the app is not automatically deployed and when trying to force the server to deploy it through the manager gui, I get the following message:
FAIL - Application at context path /myWebApp could not be started FAIL - Encountered exception org.apache.catalina.LifecycleException: Failed to start component [StandardEngine[Catalina].StandardHost[localhost].StandardContext[/myWebApp]]
However, the JSP examples provided with Tomcat do work!
I have the same problem on Tomcat6.
So what did I do wrong ? Is this a permission problem ? (I even try to change the mod of all files to 777).
-
Jean Logeart over 12 yearsThanks for your answer! Reading the logs revealed that there was a
servlet-mapping
on aservlet
that did not exist. I did not check the web.xml file given by Google and assumed it was correct, but for some reason it was not! Thanks again, it works once the mapping is commented. -
Bart van Heukelom over 11 yearsI'm getting this exception, but nothing appears in catalina.out
-
kon psych about 11 yearsThis is a special case but generally the problem is that a particular jar is missing from web-inf lib folder
-
icedwater almost 11 yearsI have the same problem as @BartvanHeukelom. I don't know what to do.
-
Krutik almost 8 yearsWhile opening logs/cataline.out, it is showing the following error: Error: Could not find or load main class org.apache.catalina.startup.Bootstrap
-
personal_cloud over 6 yearsWorks for me too. Provided you also remove the init code described here: stackoverflow.com/questions/26089902 Except then there are no WebServlets. Plus1 anyway for being the most relevant answer.
-
personal_cloud over 6 yearsThat is all fine and good for standalone Tomcat. What do we do when we encounter a similar-looking problem in embedded Tomcat?
-
Jero Dungog over 5 yearsThanks for reminding that catalina.out exists hahaha solved my issue now. Thank you again!
-
Paul Sender almost 3 yearsWhile this works, I rely on WebServlet annotations for routing. What's the work around?