Tomcat: LifecycleException when deploying

210,507

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.

Share:
210,507
Jean Logeart
Author by

Jean Logeart

All source snippets I post on Stack Overflow are under the CC0 licence ("No Rights Reserved" - public domain).

Updated on February 26, 2021

Comments

  • Jean Logeart
    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 the WEB-INF/lib directory and a web.xml file placed in the WEB-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
    Jean Logeart over 12 years
    Thanks for your answer! Reading the logs revealed that there was a servlet-mapping on a servlet 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
    Bart van Heukelom over 11 years
    I'm getting this exception, but nothing appears in catalina.out
  • kon psych
    kon psych about 11 years
    This is a special case but generally the problem is that a particular jar is missing from web-inf lib folder
  • icedwater
    icedwater almost 11 years
    I have the same problem as @BartvanHeukelom. I don't know what to do.
  • Krutik
    Krutik almost 8 years
    While 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
    personal_cloud over 6 years
    Works 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
    personal_cloud over 6 years
    That is all fine and good for standalone Tomcat. What do we do when we encounter a similar-looking problem in embedded Tomcat?
  • Jero Dungog
    Jero Dungog over 5 years
    Thanks for reminding that catalina.out exists hahaha solved my issue now. Thank you again!
  • Paul Sender
    Paul Sender almost 3 years
    While this works, I rely on WebServlet annotations for routing. What's the work around?