title: java.util.concurrent.ExecutionException: Failed to initialize component
body: <p>I'm working for a maven web application and I'm struggling with this error and I can't find any solution:</p>
  
  <pre><code>SEVERE: A child container failed during start
  java.util.concurrent.ExecutionException: org.apache.catalina.LifecycleException: Failed to initialize component [org.apache.catalina.webresources.JarResourceSet@5b0abc94]
  at java.util.concurrent.FutureTask.report(FutureTask.java:122)
  at java.util.concurrent.FutureTask.get(FutureTask.java:192)
  at org.apache.catalina.core.ContainerBase.startInternal(ContainerBase.java:909)
  at org.apache.catalina.core.StandardHost.startInternal(StandardHost.java:831)
  at org.apache.catalina.util.LifecycleBase.start(LifecycleBase.java:183)
  at org.apache.catalina.core.ContainerBase$StartChild.call(ContainerBase.java:1377)
  at org.apache.catalina.core.ContainerBase$StartChild.call(ContainerBase.java:1367)
  at java.util.concurrent.FutureTask.run(FutureTask.java:266)
  at org.apache.tomcat.util.threads.InlineExecutorService.execute(InlineExecutorService.java:75)
  at java.util.concurrent.AbstractExecutorService.submit(AbstractExecutorService.java:134)
  at org.apache.catalina.core.ContainerBase.startInternal(ContainerBase.java:902)
  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:423)
  at org.apache.catalina.util.LifecycleBase.start(LifecycleBase.java:183)
  at org.apache.catalina.core.StandardServer.startInternal(StandardServer.java:928)
  at org.apache.catalina.util.LifecycleBase.start(LifecycleBase.java:183)
  at org.apache.catalina.startup.Catalina.start(Catalina.java:638)
  at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
  at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:62)
  at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43)
  at java.lang.reflect.Method.invoke(Method.java:498)
  at org.apache.catalina.startup.Bootstrap.start(Bootstrap.java:350)
  at org.apache.catalina.startup.Bootstrap.main(Bootstrap.java:492)
  Caused by: org.apache.catalina.LifecycleException: Failed to initialize component [org.apache.catalina.webresources.JarResourceSet@5b0abc94]
  at org.apache.catalina.util.LifecycleBase.handleSubClassException(LifecycleBase.java:441)
  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:724)
  at org.apache.catalina.util.LifecycleBase.start(LifecycleBase.java:183)
  at org.apache.catalina.core.StandardContext.resourcesStart(StandardContext.java:4783)
  at org.apache.catalina.core.StandardContext.startInternal(StandardContext.java:4918)
  at org.apache.catalina.util.LifecycleBase.start(LifecycleBase.java:183)
  at org.apache.catalina.core.ContainerBase$StartChild.call(ContainerBase.java:1377)
  at org.apache.catalina.core.ContainerBase$StartChild.call(ContainerBase.java:1367)
  at java.util.concurrent.FutureTask.run(FutureTask.java:266)
  at org.apache.tomcat.util.threads.InlineExecutorService.execute(InlineExecutorService.java:75)
  at java.util.concurrent.AbstractExecutorService.submit(AbstractExecutorService.java:134)
  at org.apache.catalina.core.ContainerBase.startInternal(ContainerBase.java:902)
  ... 21 more
  Caused by: java.lang.IllegalArgumentException: java.util.zip.ZipException: error in opening zip file
  at org.apache.catalina.webresources.AbstractSingleArchiveResourceSet.initInternal(AbstractSingleArchiveResourceSet.java:143)
  at org.apache.catalina.util.LifecycleBase.init(LifecycleBase.java:136)
  ... 33 more
  </code></pre>
  
  <p>It comes from running a <code>index.jsp</code> page that imports multiple other classes:</p>
  
  <pre><code>&lt;%@page import="java.util.ArrayList" %&gt;
  &lt;%@page import="java.util.List" %&gt;
  &lt;%@page import= "java.net.URL" %&gt;
  &lt;%@ page import="models.Chapter" %&gt;
  &lt;%@ page import="models.User" %&gt;
  &lt;%@ page import="models.Student" %&gt;
  &lt;%@ page import="models.Teacher" %&gt;
  &lt;%@ page import="models.Enrolment" %&gt;
  &lt;%@ page import="dao.UserDAO" %&gt;
  &lt;%@ page import="dao.StudentDAO" %&gt;
  &lt;%@ page import="dao.TeacherDAO" %&gt;
  &lt;%@ page import="dao.ChapterDAO" %&gt;
  &lt;%@ page import="dao.Chapter2DAO" %&gt;
  &lt;%@ page import="dao.EnrolmentDAO" %&gt;
  &lt;%@ page language="java" contentType="text/html; charset=US-ASCII" pageEncoding="US-ASCII"%&gt;
  </code></pre>
  
  <p>From what I found so far, it says that some JAR files could be corrupt so I just deleted them from my lib file. After that I got an error like <code>Java error: Only a type can be imported. XYZ resolves to a package</code> that I also couldn't solve and just sent me back to add all jars in the lib folder in WEB-INF. I tried deleting my repository then maven install again, didn't work. I checked the versions of my jars and everything, I tried lots of things but nothing seem to work so far. Here is my <code>pom.xml</code> for reference: </p>
  
  <pre><code> &lt;properties&gt;
  &lt;project.build.sourceEncoding&gt;UTF-8&lt;/project.build.sourceEncoding&gt;
   &lt;java.version&gt;1.8&lt;/java.version&gt;
    &lt;/properties&gt;
  
  
  
    &lt;dependencies&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;dependency&gt;
      &lt;groupId&gt;org.apache.maven.plugins&lt;/groupId&gt;
      &lt;artifactId&gt;maven-compiler-plugin&lt;/artifactId&gt;
      &lt;version&gt;3.1&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;5.3.1.Final&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.13&lt;/version&gt;
  &lt;/dependency&gt;
  
  &lt;dependency&gt;
          &lt;groupId&gt;javax.servlet&lt;/groupId&gt;
          &lt;artifactId&gt;javax.servlet-api&lt;/artifactId&gt;
          &lt;version&gt;3.1.0&lt;/version&gt;
          &lt;scope&gt;provided&lt;/scope&gt;
      &lt;/dependency&gt;
  
      &lt;dependency&gt;
          &lt;groupId&gt;javax.servlet&lt;/groupId&gt;
          &lt;artifactId&gt;servlet-api&lt;/artifactId&gt;
          &lt;version&gt;2.4&lt;/version&gt;
          &lt;scope&gt;provided&lt;/scope&gt;
      &lt;/dependency&gt;
      &lt;dependency&gt;
          &lt;groupId&gt;javax.servlet&lt;/groupId&gt;
          &lt;artifactId&gt;jsp-api&lt;/artifactId&gt;
          &lt;version&gt;2.0&lt;/version&gt;
          &lt;scope&gt;provided&lt;/scope&gt;
      &lt;/dependency&gt;
  
  
  &lt;dependency&gt;
    &lt;groupId&gt;javax.transaction&lt;/groupId&gt;
    &lt;artifactId&gt;jta&lt;/artifactId&gt;
    &lt;version&gt;1.1&lt;/version&gt;
    &lt;/dependency&gt;
  
  &lt;dependency&gt;
  &lt;groupId&gt;commons-logging&lt;/groupId&gt;
  &lt;artifactId&gt;commons-logging&lt;/artifactId&gt;
  &lt;version&gt;1.2&lt;/version&gt;
  </code></pre>
  
  <p></p>
  
  <p>Here is my project structure in Eclipse:</p>
  
  <p><a href="https://i.stack.imgur.com/nUGZM.png" rel="nofollow noreferrer"><img src="https://i.stack.imgur.com/nUGZM.png" alt="mystructure"></a></p>
  
  <p>Do you have any idea how I can deal with this issue? I really don't see where problem is. </p>