title: Trying to load maven project in tomcat 9, showing A child container failed during start
body: <p>I am trying to load maven project in tomcat 9, showing A child container failed during start</p>
  
  <p><a href="https://i.stack.imgur.com/LQpN8.png" rel="nofollow noreferrer"><img src="https://i.stack.imgur.com/LQpN8.png" alt="showing this error in console"></a></p>
  
  <pre><code>A child container failed during start
  java.util.concurrent.ExecutionException: org.apache.catalina.LifecycleException: Failed to initialize component [org.apache.catalina.webresources.JarResourceSet@553a3d88]
      at java.util.concurrent.FutureTask.report(Unknown Source)
      at java.util.concurrent.FutureTask.get(Unknown Source)
      at org.apache.catalina.core.ContainerBase.startInternal(ContainerBase.java:916)
      at org.apache.catalina.core.StandardHost.startInternal(StandardHost.java:841)
      at org.apache.catalina.util.LifecycleBase.start(LifecycleBase.java:183)
      at org.apache.catalina.core.ContainerBase$StartChild.call(ContainerBase.java:1384)
      at org.apache.catalina.core.ContainerBase$StartChild.call(ContainerBase.java:1374)
      at java.util.concurrent.FutureTask.run(Unknown Source)
      at org.apache.tomcat.util.threads.InlineExecutorService.execute(InlineExecutorService.java:75)
      at java.util.concurrent.AbstractExecutorService.submit(Unknown Source)
      at org.apache.catalina.core.ContainerBase.startInternal(ContainerBase.java:909)
      at org.apache.catalina.core.StandardEngine.startInternal(StandardEngine.java:262)
      at org.apache.catalina.util.LifecycleBase.start(LifecycleBase.java:183)
      at org.apache.catalina.core.StandardService.startInternal(StandardService.java:421)
      at org.apache.catalina.util.LifecycleBase.start(LifecycleBase.java:183)
      at org.apache.catalina.core.StandardServer.startInternal(StandardServer.java:930)
      at org.apache.catalina.util.LifecycleBase.start(LifecycleBase.java:183)
      at org.apache.catalina.startup.Catalina.start(Catalina.java:633)
      at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
      at sun.reflect.NativeMethodAccessorImpl.invoke(Unknown Source)
      at sun.reflect.DelegatingMethodAccessorImpl.invoke(Unknown Source)
      at java.lang.reflect.Method.invoke(Unknown Source)
      at org.apache.catalina.startup.Bootstrap.start(Bootstrap.java:343)
      at org.apache.catalina.startup.Bootstrap.main(Bootstrap.java:474)
  Caused by: org.apache.catalina.LifecycleException: Failed to initialize component [org.apache.catalina.webresources.JarResourceSet@553a3d88]
      at org.apache.catalina.util.LifecycleBase.handleSubClassException(LifecycleBase.java:440)
      at org.apache.catalina.util.LifecycleBase.init(LifecycleBase.java:139)
      at org.apache.catalina.util.LifecycleBase.start(LifecycleBase.java:173)
      at org.apache.catalina.webresources.StandardRoot.startInternal(StandardRoot.java:727)
      at org.apache.catalina.util.LifecycleBase.start(LifecycleBase.java:183)
      at org.apache.catalina.core.StandardContext.resourcesStart(StandardContext.java:4805)
      at org.apache.catalina.core.StandardContext.startInternal(StandardContext.java:4940)
      at org.apache.catalina.util.LifecycleBase.start(LifecycleBase.java:183)
      at org.apache.catalina.core.ContainerBase$StartChild.call(ContainerBase.java:1384)
      at org.apache.catalina.core.ContainerBase$StartChild.call(ContainerBase.java:1374)
      at java.util.concurrent.FutureTask.run(Unknown Source)
      at org.apache.tomcat.util.threads.InlineExecutorService.execute(InlineExecutorService.java:75)
      at java.util.concurrent.AbstractExecutorService.submit(Unknown Source)
      at org.apache.catalina.core.ContainerBase.startInternal(ContainerBase.java:909)
      ... 21 more
  Caused by: java.lang.IllegalArgumentException: java.util.zip.ZipException: invalid LOC header (bad signature)
      at org.apache.catalina.webresources.AbstractSingleArchiveResourceSet.initInternal(AbstractSingleArchiveResourceSet.java:143)
      at org.apache.catalina.util.LifecycleBase.init(LifecycleBase.java:136)
      ... 33 more
  Caused by: java.util.zip.ZipException: invalid LOC header (bad signature)
      at java.util.zip.ZipFile.read(Native Method)
      at java.util.zip.ZipFile.access$1400(Unknown Source)
      at java.util.zip.ZipFile$ZipFileInputStream.read(Unknown Source)
      at java.util.zip.ZipFile$ZipFileInflaterInputStream.fill(Unknown Source)
      at java.util.zip.InflaterInputStream.read(Unknown Source)
      at sun.misc.IOUtils.readFully(Unknown Source)
      at java.util.jar.JarFile.getBytes(Unknown Source)
      at java.util.jar.JarFile.getManifestFromReference(Unknown Source)
      at java.util.jar.JarFile.getManifest(Unknown Source)
      at org.apache.catalina.webresources.AbstractSingleArchiveResourceSet.initInternal(AbstractSingleArchiveResourceSet.java:141)
      ... 34 more
  </code></pre>
  
  <p>this is my pom.xml i included database jdbc and mysql dependencies and hibernate spring details  </p>
  
  <pre><code>&lt;project xmlns="http://maven.apache.org/POM/4.0.0" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
    xsi:schemaLocation="http://maven.apache.org/POM/4.0.0 http://maven.apache.org/maven-v4_0_0.xsd"&gt;
    &lt;modelVersion&gt;4.0.0&lt;/modelVersion&gt;
    &lt;groupId&gt;com.rak&lt;/groupId&gt;
    &lt;artifactId&gt;mavenspring&lt;/artifactId&gt;
    &lt;packaging&gt;war&lt;/packaging&gt;
    &lt;version&gt;0.0.1-SNAPSHOT&lt;/version&gt;
    &lt;name&gt;mavenspring Maven Webapp&lt;/name&gt;
    &lt;url&gt;http://maven.apache.org&lt;/url&gt;
    &lt;properties&gt;
          &lt;!-- Generic properties --&gt;
          &lt;java.version&gt;1.8&lt;/java.version&gt;
          &lt;project.build.sourceEncoding&gt;UTF-8&lt;/project.build.sourceEncoding&gt;
          &lt;project.reporting.outputEncoding&gt;UTF-8&lt;/project.reporting.outputEncoding&gt;
  
          &lt;!-- Spring --&gt;
          &lt;spring-framework.version&gt;5.1.9.RELEASE&lt;/spring-framework.version&gt;
          &lt;springsecurity.version&gt;5.2.2.RELEASE&lt;/springsecurity.version&gt;
          &lt;!-- Hibernate / JPA --&gt;
          &lt;!-- &lt;hibernate.version&gt;4.3.5.Final&lt;/hibernate.version&gt; --&gt;
          &lt;hibernate.version&gt;5.4.10.Final&lt;/hibernate.version&gt;
          &lt;servlet.version&gt;3.1.0&lt;/servlet.version&gt;
      &lt;/properties&gt;
    &lt;dependencies&gt;
  &lt;!--   Spring --&gt;
    &lt;dependency&gt;
              &lt;groupId&gt;org.springframework&lt;/groupId&gt;
              &lt;artifactId&gt;spring-context&lt;/artifactId&gt;
              &lt;version&gt;${spring-framework.version}&lt;/version&gt;
          &lt;/dependency&gt;
          &lt;dependency&gt;
              &lt;groupId&gt;org.springframework&lt;/groupId&gt;
              &lt;artifactId&gt;spring-tx&lt;/artifactId&gt;
              &lt;version&gt;${spring-framework.version}&lt;/version&gt;
          &lt;/dependency&gt;
      &lt;dependency&gt;
      &lt;groupId&gt;org.springframework&lt;/groupId&gt;
      &lt;artifactId&gt;spring-webmvc&lt;/artifactId&gt;
      &lt;version&gt;${spring-framework.version}&lt;/version&gt;
      &lt;/dependency&gt;
          &lt;!-- Spring ORM support --&gt;
          &lt;dependency&gt;
              &lt;groupId&gt;org.springframework&lt;/groupId&gt;
              &lt;artifactId&gt;spring-orm&lt;/artifactId&gt;
              &lt;version&gt;${spring-framework.version}&lt;/version&gt;
          &lt;/dependency&gt;
          &lt;!-- Hibernate --&gt;
          &lt;dependency&gt;
              &lt;groupId&gt;org.hibernate&lt;/groupId&gt;
              &lt;artifactId&gt;hibernate-entitymanager&lt;/artifactId&gt;
              &lt;version&gt;${hibernate.version}&lt;/version&gt;
          &lt;/dependency&gt;
          &lt;dependency&gt;
              &lt;groupId&gt;org.hibernate&lt;/groupId&gt;
              &lt;artifactId&gt;hibernate-core&lt;/artifactId&gt;
              &lt;version&gt;${hibernate.version}&lt;/version&gt;
          &lt;/dependency&gt;
          &lt;dependency&gt;
      &lt;groupId&gt;org.hibernate&lt;/groupId&gt;
      &lt;artifactId&gt;hibernate-c3p0&lt;/artifactId&gt;
      &lt;version&gt;${hibernate.version}&lt;/version&gt;
  &lt;/dependency&gt;
  &lt;dependency&gt;
      &lt;groupId&gt;mysql&lt;/groupId&gt;
      &lt;artifactId&gt;mysql-connector-java&lt;/artifactId&gt;
      &lt;version&gt;8.0.19&lt;/version&gt;
  &lt;/dependency&gt;
   &lt;!-- Spring Security --&gt;
          &lt;!-- spring-security-web and spring-security-config --&gt;
  
          &lt;dependency&gt;
              &lt;groupId&gt;org.springframework.security&lt;/groupId&gt;
              &lt;artifactId&gt;spring-security-web&lt;/artifactId&gt;
              &lt;version&gt;${springsecurity.version}&lt;/version&gt;
          &lt;/dependency&gt;
  
          &lt;dependency&gt;
              &lt;groupId&gt;org.springframework.security&lt;/groupId&gt;
              &lt;artifactId&gt;spring-security-config&lt;/artifactId&gt;
              &lt;version&gt;${springsecurity.version}&lt;/version&gt;
          &lt;/dependency&gt;
          &lt;!-- https://mvnrepository.com/artifact/org.springframework.security/spring-security-taglibs --&gt;
          &lt;dependency&gt;
              &lt;groupId&gt;org.springframework.security&lt;/groupId&gt;
              &lt;artifactId&gt;spring-security-taglibs&lt;/artifactId&gt;
              &lt;version&gt;${springsecurity.version}&lt;/version&gt;
          &lt;/dependency&gt;
  
                  &lt;dependency&gt;
              &lt;groupId&gt;org.springframework.security&lt;/groupId&gt;
              &lt;artifactId&gt;spring-security-core&lt;/artifactId&gt;
               &lt;version&gt;${springsecurity.version}&lt;/version&gt;
          &lt;/dependency&gt;
  
          &lt;!-- https://mvnrepository.com/artifact/org.apache.tomcat/tomcat-jdbc --&gt;
  &lt;dependency&gt;
      &lt;groupId&gt;org.apache.tomcat&lt;/groupId&gt;
      &lt;artifactId&gt;tomcat-jdbc&lt;/artifactId&gt;
      &lt;version&gt;9.0.30&lt;/version&gt;
  &lt;/dependency&gt;
  &lt;!--        servlet --&gt;
  &lt;dependency&gt;
      &lt;groupId&gt;javax.servlet&lt;/groupId&gt;
      &lt;artifactId&gt;javax.servlet-api&lt;/artifactId&gt;
      &lt;version&gt;${servlet.version}&lt;/version&gt;
  &lt;/dependency&gt;
      &lt;dependency&gt;
        &lt;groupId&gt;junit&lt;/groupId&gt;
        &lt;artifactId&gt;junit&lt;/artifactId&gt;
        &lt;version&gt;3.8.1&lt;/version&gt;
        &lt;scope&gt;test&lt;/scope&gt;
      &lt;/dependency&gt;
  &lt;!--     JSTL TAG --&gt;
      &lt;dependency&gt;
      &lt;groupId&gt;jstl&lt;/groupId&gt;
      &lt;artifactId&gt;jstl&lt;/artifactId&gt;
      &lt;version&gt;1.2&lt;/version&gt;
  &lt;/dependency&gt;
    &lt;/dependencies&gt;
      &lt;build&gt;
          &lt;finalName&gt;mavenspring&lt;/finalName&gt;
          &lt;plugins&gt;
              &lt;plugin&gt;
                  &lt;groupId&gt;org.apache.maven.plugins&lt;/groupId&gt;
                  &lt;artifactId&gt;maven-compiler-plugin&lt;/artifactId&gt;
                  &lt;version&gt;3.5.1&lt;/version&gt;
                  &lt;configuration&gt;
                      &lt;source&gt;${java.version}&lt;/source&gt;
                      &lt;target&gt;${java.version}&lt;/target&gt;
                  &lt;/configuration&gt;
              &lt;/plugin&gt;
      &lt;/plugins&gt;
    &lt;/build&gt;
  &lt;/project&gt;
  </code></pre>
  
  <p>and also am using spring for configuring </p>
  
  <p>this is my maven spring config xml this am included db details, and db connection is working properly </p>
  
  <pre><code>&lt;?xml version="1.0" encoding="UTF-8"?&gt;
  &lt;beans xmlns="http://www.springframework.org/schema/beans"
      xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" 
      xmlns:context="http://www.springframework.org/schema/context"
      xmlns:tx="http://www.springframework.org/schema/tx"
      xmlns:mvc="http://www.springframework.org/schema/mvc"
      xsi:schemaLocation="
          http://www.springframework.org/schema/beans
          http://www.springframework.org/schema/beans/spring-beans.xsd
          http://www.springframework.org/schema/context
          http://www.springframework.org/schema/context/spring-context.xsd
          http://www.springframework.org/schema/mvc
          http://www.springframework.org/schema/mvc/spring-mvc.xsd
          http://www.springframework.org/schema/tx 
          http://www.springframework.org/schema/tx/spring-tx.xsd"&gt;
  
          &lt;context:component-scan base-package="com"/&gt;
  
  
          &lt;mvc:annotation-driven/&gt;
  
  
  
  
          &lt;bean id="myDataSource" class="com.mchange.v2.c3p0.ComboPooledDataSource" destroy-method="close"&gt;
              &lt;property name="driverClass" value="com.mysql.jdbc.Driver" /&gt;
              &lt;property name="jdbcUrl" value="jdbc:mysql://localhost:3306/kp-apps?useSSL=false&amp;amp;serverTimezone=UTC" /&gt;
              &lt;property name="user" value="hbstudent" /&gt;
              &lt;property name="password" value="hbstudent" /&gt; 
  
              &lt;!-- these are connection pool properties for C3P0 --&gt;
              &lt;property name="initialPoolSize" value="5"/&gt;
              &lt;property name="minPoolSize" value="5" /&gt;
              &lt;property name="maxPoolSize" value="20" /&gt;
              &lt;property name="maxIdleTime" value="30000" /&gt;
          &lt;/bean&gt; 
  
  
           &lt;bean id="sessionFactory" class="org.springframework.orm.hibernate5.LocalSessionFactoryBean"&gt;
              &lt;property name="dataSource"     ref="myDataSource"/&gt;
              &lt;property name="packagesToScan" value="com.rak.entities"/&gt;
              &lt;property name="hibernateProperties"&gt;
                  &lt;props&gt;
                       &lt;prop key="hibernate.dialect"&gt;org.hibernate.dialect.MySQLDialect&lt;/prop&gt;
                      &lt;prop key="hibernate.show_sql"&gt;true&lt;/prop&gt;
                  &lt;/props&gt;
              &lt;/property&gt;
           &lt;/bean&gt;
  
  
           &lt;bean id="myTransactionManager"
              class="org.springframework.orm.hibernate5.HibernateTransactionManager"&gt;
              &lt;property name="sessionFactory" ref="sessionFactory"&gt;&lt;/property&gt;
            &lt;/bean&gt;
  
  
          &lt;tx:annotation-driven transaction-manager="myTransactionManager" /&gt;
  </code></pre>
  
  <p>when am adding all related details connecting tomcat it is stopping and getting error</p>