title: Error When Deploying Webapp on Tomcat
body: <p>I am having some trouble deploying a webapp on tomcat. I keep getting the following error. </p>
  
  <pre><code>SEVERE: Error deploying web application archive /var/lib/tomcat7/webapps/SadScary.war
  java.lang.IllegalStateException: ContainerBase.addChild: start: org.apache.catalina.LifecycleException: Failed         to start component [StandardEngine[Catalina].StandardHost[localhost].StandardContext[/SadScary]]
      at org.apache.catalina.core.ContainerBase.addChildInternal(ContainerBase.java:904)
      at org.apache.catalina.core.ContainerBase.addChild(ContainerBase.java:877)
      at org.apache.catalina.core.StandardHost.addChild(StandardHost.java:633)
      at org.apache.catalina.startup.HostConfig.deployWAR(HostConfig.java:976)
      at org.apache.catalina.startup.HostConfig.deployApps(HostConfig.java:541)
      at org.apache.catalina.startup.HostConfig.check(HostConfig.java:1461)
      at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
      at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:57)
      at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43)
      at java.lang.reflect.Method.invoke(Method.java:606)
      at org.apache.tomcat.util.modeler.BaseModelMBean.invoke(BaseModelMBean.java:301)
      at com.sun.jmx.interceptor.DefaultMBeanServerInterceptor.invoke(DefaultMBeanServerInterceptor.java:819)
      at com.sun.jmx.mbeanserver.JmxMBeanServer.invoke(JmxMBeanServer.java:801)
      at org.apache.catalina.manager.ManagerServlet.check(ManagerServlet.java:1445)
      at org.apache.catalina.manager.HTMLManagerServlet.upload(HTMLManagerServlet.java:301)
      at org.apache.catalina.manager.HTMLManagerServlet.doPost(HTMLManagerServlet.java:208)
      at javax.servlet.http.HttpServlet.service(HttpServlet.java:647)
      at javax.servlet.http.HttpServlet.service(HttpServlet.java:728)
  </code></pre>
  
  <p>Any ideas what might be causing this exception? I have checked and re-checked my web-xml and servlet mappings and I cannot find any errors. </p>
  
  <p>Any help would be greatly appreciated. </p>
  
  <p>Edit.. Here is my web.xml. </p>
  
  <pre><code>&lt;?xml version="1.0" encoding="utf-8"?&gt;
  &lt;web-app version="3.0" id="WebApp_ID"
  xsi:schemaLocation="http://java.sun.com/xml/ns/javaee http://java.sun.com/xml/ns/javaee/web-app_3_0.xsd"
  xmlns:web="http://java.sun.com/xml/ns/javaee/web-app_2_5.xsd"
  xmlns="http://java.sun.com/xml/ns/javaee"
  xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"&gt;
  &lt;display-name&gt;SadScary&lt;/display-name&gt;
  &lt;listener&gt;
    &lt;listener-class&gt;
    com.example.reelchatterap.StartupListener&lt;/listener-class&gt;
  &lt;/listener&gt;
  &lt;welcome-file-list&gt;
    &lt;welcome-file&gt;index.html&lt;/welcome-file&gt;
    &lt;welcome-file&gt;index.htm&lt;/welcome-file&gt;
    &lt;welcome-file&gt;index.jsp&lt;/welcome-file&gt;
    &lt;welcome-file&gt;default.html&lt;/welcome-file&gt;
    &lt;welcome-file&gt;default.htm&lt;/welcome-file&gt;
    &lt;welcome-file&gt;default.jsp&lt;/welcome-file&gt;
  &lt;/welcome-file-list&gt;
  &lt;resource-ref&gt;
    &lt;description&gt;Reviews Database&lt;/description&gt;
    &lt;res-ref-name&gt;jdbc/myTestDB&lt;/res-ref-name&gt;
    &lt;res-type&gt;javax.sql.DataSource&lt;/res-type&gt;
    &lt;res-auth&gt;Container&lt;/res-auth&gt;
  &lt;/resource-ref&gt;
  &lt;servlet&gt;
    &lt;servlet-name&gt;UpdateList&lt;/servlet-name&gt;
    &lt;servlet-class&gt;
    com.example.reelchatterap.UpdateList&lt;/servlet-class&gt;
  &lt;/servlet&gt;-
  &lt;servlet-mapping&gt;
    &lt;servlet-name&gt;UpdateList&lt;/servlet-name&gt;
    &lt;url-pattern&gt;/UpdateList&lt;/url-pattern&gt;
  &lt;/servlet-mapping&gt;&lt;/web-app&gt;
  </code></pre>