Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

Tomcat: LifecycleException when deploying

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).

like image 603
Jean Logeart Avatar asked Dec 14 '11 22:12

Jean Logeart


People also ask

What happens when we deploy a WAR file in Tomcat?

Java web applications are usually packaged as WAR files for deployment. These files can be created on the command line or with an IDE, like Eclipse. After deploying the WAR file, Tomcat unpacks it and stores all the project files from the webapps directory in a new directory named after the project.

What is lifecycle exception?

Class LifecycleExceptionGeneral purpose exception that is thrown to indicate a lifecycle related problem. Such exceptions should generally be considered fatal to the operation of the application containing this component.

What should be deploy path for Tomcat?

A web application can be deployed in Tomcat by one of the following approaches: Copy unpacked directory hierarchy into a subdirectory in directory $CATALINA_BASE/webapps/ . Tomcat will assign a context path to your application based on the subdirectory name you choose. We will use this technique in the build.

Can EAR file be deployed on Tomcat?

A WAR file can be deployed to a Web server such as Tomcat. An EAR file is a specialized JAR file containing Java EE application components such as Web applications (WAR files), EJBs, resource adapters, etc. An EAR file can be deployed to a Java EE application server such as JBoss, WebLogic, or WebSphere.


1 Answers

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.

like image 54
Bozho Avatar answered Oct 11 '22 11:10

Bozho