编程语言
首页 > 编程语言> > java.lang.IllegalStateException: Error starting child错误

java.lang.IllegalStateException: Error starting child错误

作者:互联网

 

 

 

 

 严重: Error deploying web application directory [E:\Java Software\apache-tomcat-9.0.16\webapps\struts01]

java.lang.IllegalStateException: Error starting child

at org.apache.catalina.core.ContainerBase.addChildInternal(ContainerBase.java:716)

at org.apache.catalina.core.ContainerBase.addChild(ContainerBase.java:690)

at org.apache.catalina.core.StandardHost.addChild(StandardHost.java:695)

at org.apache.catalina.startup.HostConfig.deployDirectory(HostConfig.java:1133)

at org.apache.catalina.startup.HostConfig$DeployDirectory.run(HostConfig.java:1868)

at java.util.concurrent.Executors$RunnableAdapter.call(Executors.java:511)

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:112)

at org.apache.catalina.startup.HostConfig.deployDirectories(HostConfig.java:1045)

at org.apache.catalina.startup.HostConfig.deployApps(HostConfig.java:429)

at org.apache.catalina.startup.HostConfig.start(HostConfig.java:1577)

at org.apache.catalina.startup.HostConfig.lifecycleEvent(HostConfig.java:309)

at org.apache.catalina.util.LifecycleBase.fireLifecycleEvent(LifecycleBase.java:123)

at org.apache.catalina.util.LifecycleBase.setStateInternal(LifecycleBase.java:424)

at org.apache.catalina.util.LifecycleBase.setState(LifecycleBase.java:367)

at org.apache.catalina.core.ContainerBase.startInternal(ContainerBase.java:929)

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: 初始化组件[org.apache.catalina.webresources.JarResourceSet@726e60a1]失败。

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.addChildInternal(ContainerBase.java:713)

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

... 44 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:60)

at java.util.zip.ZipFile$ZipFileInputStream.read(ZipFile.java:717)

at java.util.zip.ZipFile$ZipFileInflaterInputStream.fill(ZipFile.java:419)

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.AbstractSingleArchiveResourceSet.initInternal(AbstractSingleArchiveResourceSet.java:141)

... 45 more

编译工具:MyEclips

maven

jdk版本:1.8

tomcat版本:9.0

框架:struts2

maven相关代码:

    <!-- https://mvnrepository.com/artifact/org.apache.struts/struts2-core -->

<dependency>

    <groupId>org.apache.struts</groupId>

    <artifactId>struts2-core</artifactId>

    <version>2.3.24</version>

</dependency>

        

<!-- https://mvnrepository.com/artifact/org.apache.logging.log4j/log4j-core -->

<dependency>

    <groupId>org.apache.logging.log4j</groupId>

    <artifactId>log4j-core</artifactId>

    <version>2.2</version>

</dependency>

流程回顾:创建maven项目,在prom.xml中添加struts-core和log4j-core。将该项目放在tomcat9.0中启动,报以上错误,百度未找到相关解决方案,有类似的情况可以参考我的做法。

 

 

删除后,maven重新导入即可

 

标签:lang,catalina,java,LifecycleBase,util,Error,apache,org
来源: https://www.cnblogs.com/shifu8005/p/13391845.html