我最近将我的java项目转换为maven。我在WEB-INF/lib里添加了依赖关系。但是,在tomcat-v8.0上运行它。发生以下错误。SEVERE:启动期间的子容器失败java.util.concurrent.ExecutionException
SEVERE: A child container failed during start
java.util.concurrent.ExecutionException: org.apache.catalina.LifecycleException: Failed to start component [StandardEngine[Catalina].StandardHost[localhost].StandardContext[/myApp]]
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:915)
at org.apache.catalina.core.StandardHost.startInternal(StandardHost.java:871)
at org.apache.catalina.util.LifecycleBase.start(LifecycleBase.java:145)
at org.apache.catalina.core.ContainerBase$StartChild.call(ContainerBase.java:1407)
at org.apache.catalina.core.ContainerBase$StartChild.call(ContainerBase.java:1397)
at java.util.concurrent.FutureTask.run(FutureTask.java:266)
at java.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1142)
at java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:617)
at java.lang.Thread.run(Thread.java:745)
Caused by: org.apache.catalina.LifecycleException: Failed to start component [StandardEngine[Catalina].StandardHost[localhost].StandardContext[/myApp]]
at org.apache.catalina.util.LifecycleBase.start(LifecycleBase.java:162)
... 6 more
Caused by: org.apache.catalina.LifecycleException: Failed to start component [[email protected]]
at org.apache.catalina.util.LifecycleBase.start(LifecycleBase.java:162)
at org.apache.catalina.core.StandardContext.resourcesStart(StandardContext.java:4969)
at org.apache.catalina.core.StandardContext.startInternal(StandardContext.java:5099)
at org.apache.catalina.util.LifecycleBase.start(LifecycleBase.java:145)
... 6 more
Caused by: org.apache.catalina.LifecycleException: Failed to initialize component [[email protected]]
at org.apache.catalina.util.LifecycleBase.init(LifecycleBase.java:107)
at org.apache.catalina.util.LifecycleBase.start(LifecycleBase.java:135)
at org.apache.catalina.webresources.StandardRoot.startInternal(StandardRoot.java:703)
at org.apache.catalina.util.LifecycleBase.start(LifecycleBase.java:145)
... 9 more
Caused by: java.lang.IllegalArgumentException: java.util.zip.ZipException: invalid LOC header (bad signature)
at org.apache.catalina.webresources.JarResourceSet.initInternal(JarResourceSet.java:139)
at org.apache.catalina.util.LifecycleBase.init(LifecycleBase.java:102)
... 12 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(ZipFile.java:61)
at java.util.zip.ZipFile$ZipFileInputStream.read(ZipFile.java:717)
at java.util.zip.ZipFile$ZipFileInflaterInputStream.fill(ZipFile.java:420)
at java.util.zip.InflaterInputStream.read(InflaterInputStream.java:158)
at sun.misc.IOUtils.readFully(IOUtils.java:65)
at java.util.jar.JarFile.getBytes(JarFile.java:425)
at java.util.jar.JarFile.getManifestFromReference(JarFile.java:193)
at java.util.jar.JarFile.getManifest(JarFile.java:180)
at org.apache.catalina.webresources.JarResourceSet.initInternal(JarResourceSet.java:137)
... 13 more
pom.xml文件如下:
4.0.0
myApp
myApp
0.0.1-SNAPSHOT
war
src
src
**/*.java
maven-war-plugin
2.6
WebContent
false
maven-compiler-plugin
3.5.1
1.7
1.7
UTF-8
UTF-8
1.8
asm
asm
3.1
commons-fileupload
commons-fileupload
1.3.1
commons-io
commons-io
2.4
commons-logging
commons-logging
1.2
com.google.gcm
gcm-server
1.0.0
com.google.code.gson
gson
2.2.2
org.codehaus.jackson
jackson-core-asl
1.9.2
org.codehaus.jackson
jackson-jaxrs
1.9.2
org.codehaus.jackson
jackson-mapper-asl
1.9.2
org.codehaus.jackson
jackson-xc
1.9.2
com.github.stephenc.simple-java-mail
simple-java-mail
1.4
com.sun.jersey
jersey-client
1.18
com.sun.jersey
jersey-core
1.18
com.sun.jersey
jersey-json
1.18
com.sun.jersey
jersey-server
1.18
com.sun.jersey
jersey-servlet
1.18
org.codehaus.jettison
jettison
1.1
com.googlecode.json-simple
json-simple
1.1.1
javax.ws.rs
jsr311-api
1.1.1
mysql
mysql-connector-java
5.1.30
org.apache.directory.studio
org.apache.commons.logging
1.1.1
org.springframework
spring-beans
4.1.6.RELEASE
org.springframework
spring-context
4.1.6.RELEASE
org.springframework
spring-core
4.1.6.RELEASE
org.springframework
spring-expression
4.1.6.RELEASE
org.springframework
spring-orm
4.1.6.RELEASE
sun.misc
sun.misc.BASE64Decoder
1.0
我的WEB-INF中web.xml文件中:
xmlns="http://java.sun.com/xml/ns/javaee" xmlns:web="http://java.sun.com/xml/ns/javaee/web-app_2_5.xsd"
xsi:schemaLocation="http://java.sun.com/xml/ns/javaee http://java.sun.com/xml/ns/javaee/web-app_2_5.xsd"
id="WebApp_ID" version="2.5">
index.html
index.htm
index.jsp
myApp
com.sun.jersey.spi.container.servlet.ServletContainer
1
myApp
/myApp/*
2016-10-13
Vaidya