急急急项目启动问题

你好波总我用jfinalMaven版本搭建项目之前运行好好的按照https://blog.csdn.net/ai_lian_shuo/article/details/77096071这个网址配置了一下直接部署到tomcat然后项目就不能启动了一直报错:

严重: A child container failed during start

java.util.concurrent.ExecutionException: org.apache.catalina.LifecycleException: Failed to start component [StandardEngine[Catalina].StandardHost[localhost].StandardContext[/ppzu2.0]]

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

at org.apache.catalina.util.LifecycleBase.start(LifecycleBase.java:150)

at org.apache.catalina.core.ContainerBase$StartChild.call(ContainerBase.java:1396)

at org.apache.catalina.core.ContainerBase$StartChild.call(ContainerBase.java:1386)

at java.util.concurrent.FutureTask.run(Unknown Source)

at java.util.concurrent.ThreadPoolExecutor.runWorker(Unknown Source)

at java.util.concurrent.ThreadPoolExecutor$Worker.run(Unknown Source)

at java.lang.Thread.run(Unknown Source)

Caused by: org.apache.catalina.LifecycleException: Failed to start component [StandardEngine[Catalina].StandardHost[localhost].StandardContext[/ppzu2.0]]

at org.apache.catalina.util.LifecycleBase.start(LifecycleBase.java:154)

... 6 more

Caused by: org.apache.catalina.LifecycleException: Failed to start component [org.apache.catalina.webresources.StandardRoot@27747f2c]

at org.apache.catalina.util.LifecycleBase.start(LifecycleBase.java:154)

at org.apache.catalina.core.StandardContext.resourcesStart(StandardContext.java:4863)

at org.apache.catalina.core.StandardContext.startInternal(StandardContext.java:4992)

at org.apache.catalina.util.LifecycleBase.start(LifecycleBase.java:150)

... 6 more

Caused by: org.apache.catalina.LifecycleException: Failed to initialize component [org.apache.catalina.webresources.JarResourceSet@65d4db3d]

at org.apache.catalina.util.LifecycleBase.init(LifecycleBase.java:106)

at org.apache.catalina.util.LifecycleBase.start(LifecycleBase.java:139)

at org.apache.catalina.webresources.StandardRoot.startInternal(StandardRoot.java:662)

at org.apache.catalina.util.LifecycleBase.start(LifecycleBase.java:150)

... 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:94)

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(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.JarResourceSet.initInternal(JarResourceSet.java:92)

... 13 more


八月 06, 2018 11:06:26 上午 org.apache.catalina.core.ContainerBase startInternal

严重: A child container failed during start

java.util.concurrent.ExecutionException: org.apache.catalina.LifecycleException: Failed to start component [StandardEngine[Catalina].StandardHost[localhost]]

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.StandardEngine.startInternal(StandardEngine.java:262)

at org.apache.catalina.util.LifecycleBase.start(LifecycleBase.java:150)

at org.apache.catalina.core.StandardService.startInternal(StandardService.java:439)

at org.apache.catalina.util.LifecycleBase.start(LifecycleBase.java:150)

at org.apache.catalina.core.StandardServer.startInternal(StandardServer.java:752)

at org.apache.catalina.util.LifecycleBase.start(LifecycleBase.java:150)

at org.apache.catalina.startup.Catalina.start(Catalina.java:625)

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

at org.apache.catalina.startup.Bootstrap.main(Bootstrap.java:485)

Caused by: org.apache.catalina.LifecycleException: Failed to start component [StandardEngine[Catalina].StandardHost[localhost]]

at org.apache.catalina.util.LifecycleBase.start(LifecycleBase.java:154)

at org.apache.catalina.core.ContainerBase$StartChild.call(ContainerBase.java:1396)

at org.apache.catalina.core.ContainerBase$StartChild.call(ContainerBase.java:1386)

at java.util.concurrent.FutureTask.run(Unknown Source)

at java.util.concurrent.ThreadPoolExecutor.runWorker(Unknown Source)

at java.util.concurrent.ThreadPoolExecutor$Worker.run(Unknown Source)

at java.lang.Thread.run(Unknown Source)

Caused by: org.apache.catalina.LifecycleException: A child container failed during start

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

at org.apache.catalina.core.StandardHost.startInternal(StandardHost.java:868)

at org.apache.catalina.util.LifecycleBase.start(LifecycleBase.java:150)

... 6 more


八月 06, 2018 11:06:26 上午 org.apache.catalina.startup.Catalina start

严重: The required Server component failed to start so Tomcat is unable to start.

org.apache.catalina.LifecycleException: Failed to start component [StandardServer[8005]]

at org.apache.catalina.util.LifecycleBase.start(LifecycleBase.java:154)

at org.apache.catalina.startup.Catalina.start(Catalina.java:625)

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

at org.apache.catalina.startup.Bootstrap.main(Bootstrap.java:485)

Caused by: org.apache.catalina.LifecycleException: Failed to start component [StandardService[Catalina]]

at org.apache.catalina.util.LifecycleBase.start(LifecycleBase.java:154)

at org.apache.catalina.core.StandardServer.startInternal(StandardServer.java:752)

at org.apache.catalina.util.LifecycleBase.start(LifecycleBase.java:150)

... 7 more

Caused by: org.apache.catalina.LifecycleException: Failed to start component [StandardEngine[Catalina]]

at org.apache.catalina.util.LifecycleBase.start(LifecycleBase.java:154)

at org.apache.catalina.core.StandardService.startInternal(StandardService.java:439)

at org.apache.catalina.util.LifecycleBase.start(LifecycleBase.java:150)

... 9 more

Caused by: org.apache.catalina.LifecycleException: A child container failed during start

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

at org.apache.catalina.core.StandardEngine.startInternal(StandardEngine.java:262)

at org.apache.catalina.util.LifecycleBase.start(LifecycleBase.java:150)

... 11 more


八月 06, 2018 11:06:26 上午 org.apache.coyote.AbstractProtocol pause

信息: Pausing ProtocolHandler ["http-nio-8080"]

八月 06, 2018 11:06:26 上午 org.apache.coyote.AbstractProtocol pause

信息: Pausing ProtocolHandler ["ajp-nio-8009"]

八月 06, 2018 11:06:26 上午 org.apache.catalina.core.StandardService stopInternal

信息: Stopping service Catalina

八月 06, 2018 11:06:26 上午 org.apache.coyote.AbstractProtocol destroy

信息: Destroying ProtocolHandler ["http-nio-8080"]

八月 06, 2018 11:06:26 上午 org.apache.coyote.AbstractProtocol destroy

严重: Failed to destroy end point associated with ProtocolHandler ["http-nio-8080"]

java.lang.NullPointerException

at org.apache.tomcat.util.net.NioEndpoint.releaseCaches(NioEndpoint.java:307)

at org.apache.tomcat.util.net.NioEndpoint.unbind(NioEndpoint.java:482)

at org.apache.tomcat.util.net.AbstractEndpoint.destroy(AbstractEndpoint.java:792)

at org.apache.coyote.AbstractProtocol.destroy(AbstractProtocol.java:531)

at org.apache.catalina.connector.Connector.destroyInternal(Connector.java:1023)

at org.apache.catalina.util.LifecycleBase.destroy(LifecycleBase.java:305)

at org.apache.catalina.core.StandardService.destroyInternal(StandardService.java:588)

at org.apache.catalina.util.LifecycleBase.destroy(LifecycleBase.java:305)

at org.apache.catalina.core.StandardServer.destroyInternal(StandardServer.java:842)

at org.apache.catalina.util.LifecycleBase.destroy(LifecycleBase.java:305)

at org.apache.catalina.startup.Catalina.start(Catalina.java:629)

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

at org.apache.catalina.startup.Bootstrap.main(Bootstrap.java:485)


八月 06, 2018 11:06:26 上午 org.apache.coyote.AbstractProtocol destroy

信息: Destroying ProtocolHandler ["ajp-nio-8009"]

八月 06, 2018 11:06:26 上午 org.apache.coyote.AbstractProtocol destroy

严重: Failed to destroy end point associated with ProtocolHandler ["ajp-nio-8009"]

java.lang.NullPointerException

at org.apache.tomcat.util.net.NioEndpoint.releaseCaches(NioEndpoint.java:307)

at org.apache.tomcat.util.net.NioEndpoint.unbind(NioEndpoint.java:482)

at org.apache.tomcat.util.net.AbstractEndpoint.destroy(AbstractEndpoint.java:792)

at org.apache.coyote.AbstractProtocol.destroy(AbstractProtocol.java:531)

at org.apache.catalina.connector.Connector.destroyInternal(Connector.java:1023)

at org.apache.catalina.util.LifecycleBase.destroy(LifecycleBase.java:305)

at org.apache.catalina.core.StandardService.destroyInternal(StandardService.java:588)

at org.apache.catalina.util.LifecycleBase.destroy(LifecycleBase.java:305)

at org.apache.catalina.core.StandardServer.destroyInternal(StandardServer.java:842)

at org.apache.catalina.util.LifecycleBase.destroy(LifecycleBase.java:305)

at org.apache.catalina.startup.Catalina.start(Catalina.java:629)

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

at org.apache.catalina.startup.Bootstrap.main(Bootstrap.java:485)

下面是项目的pom文件配置:

<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">

<modelVersion>4.0.0</modelVersion>

<groupId>ppzu2.0</groupId>

<artifactId>ppzu2.0</artifactId>

<version>2.0</version>

<name>ppzu2.0 Maven Webapp</name>

<url>http://maven.apache.org</url>

<properties>

<project.build.sourceEncoding>UTF-8</project.build.sourceEncoding>

<maven.compiler.encoding>UTF-8</maven.compiler.encoding>

</properties>


<!-- 使用阿里 maven 库 -->

<repositories>

<repository>

<id>ali-maven</id>

<url>http://maven.aliyun.com/nexus/content/groups/public</url>

<releases>

<enabled>true</enabled>

</releases>

<snapshots>

<enabled>true</enabled>

<updatePolicy>always</updatePolicy>

<checksumPolicy>fail</checksumPolicy>

</snapshots>

</repository>

</repositories>


<!-- 添加快照版本库,updatePolicy: always、daily、interval、never -->

<!-- repositories> <repository> <id>sonatype-nexus-snapshots</id> <name>Sonatype 

Nexus Snapshots</name> <url>https://oss.sonatype.org/content/repositories/snapshots/</url> 

<releases> <enabled>false</enabled> </releases> <snapshots> <enabled>true</enabled> 

<updatePolicy>daily</updatePolicy> </snapshots> </repository> </repositories -->


<dependencies>

<dependency>

<groupId>junit</groupId>

<artifactId>junit</artifactId>

<version>3.8.1</version>

<scope>test</scope>

</dependency>

<!--Jfinal基础包 -->

<dependency>

<groupId>com.jfinal</groupId>

<artifactId>jfinal</artifactId>

<version>3.4</version>

</dependency>

        <dependency>

            <groupId>javax.servlet</groupId>

            <artifactId>javax.servlet-api</artifactId>

            <version>3.1.0</version>

        </dependency>

<dependency>

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

            <artifactId>log4j-core</artifactId>

            <version>2.5</version>

        </dependency>

        <dependency>

            <groupId>c3p0</groupId>

            <artifactId>c3p0</artifactId>

            <version>0.9.0.2</version>

        </dependency>

<!-- mysql数据库依赖包 -->

<dependency>

<groupId>mysql</groupId>

<artifactId>mysql-connector-java</artifactId>

<version>5.1.44</version>

</dependency>

        <dependency>

            <groupId>org.apache.httpcomponents</groupId>

            <artifactId>httpclient</artifactId>

            <version>4.5.2</version>

        </dependency>

<dependency>

<groupId>com.alibaba</groupId>

<artifactId>druid</artifactId>

<version>1.0.29</version>

</dependency>

<!-- Redis依赖包 -->

<dependency>

<groupId>redis.clients</groupId>

<artifactId>jedis</artifactId>

<version>2.5.0</version>

</dependency>

<!-- Json相关 -->

<!-- https://mvnrepository.com/artifact/net.minidev/json-smart -->

<!-- https://mvnrepository.com/artifact/net.minidev/json-smart -->

<dependency>

<groupId>net.minidev</groupId>

<artifactId>json-smart</artifactId>

<version>2.3</version>

</dependency>

<dependency>

    <groupId>com.alibaba</groupId>

    <artifactId>fastjson</artifactId>

    <version>1.2.47</version>

</dependency>

<!-- https://mvnrepository.com/artifact/org.jsoup/jsoup -->

<dependency>

<groupId>org.jsoup</groupId>

<artifactId>jsoup</artifactId>

<version>1.8.1</version>

</dependency>

<!-- https://mvnrepository.com/artifact/com.nimbusds/nimbus-jose-jwt -->

<dependency>

<groupId>com.nimbusds</groupId>

<artifactId>nimbus-jose-jwt</artifactId>

<version>2.16</version>

</dependency>


<!-- Dom4j -->

<!-- https://mvnrepository.com/artifact/org.dom4j/dom4j -->

<dependency>

<groupId>org.dom4j</groupId>

<artifactId>dom4j</artifactId>

<version>2.0.0</version>

</dependency>


<!-- excel相关 -->

<!-- https://mvnrepository.com/artifact/org.apache.poi/poi -->

<dependency>

<groupId>org.apache.poi</groupId>

<artifactId>poi</artifactId>

<version>3.9</version>

</dependency>

<dependency>

<groupId>org.apache.maven.plugins</groupId>

<artifactId>maven-compiler-plugin</artifactId>

<version>2.3.2</version>

</dependency>


</dependencies>


<build>

<finalName>ppzu2.0</finalName>

<plugins>

<plugin>

<groupId>org.mortbay.jetty</groupId>

<artifactId>jetty-maven-plugin</artifactId>

<version>8.1.8.v20121106</version>

<configuration>

<stopKey>stop</stopKey>

<stopPort>5599</stopPort>

<webAppConfig>

<contextPath>/</contextPath>

</webAppConfig>

<scanIntervalSeconds>5</scanIntervalSeconds>

<connectors>

<connector

implementation="org.eclipse.jetty.server.nio.SelectChannelConnector">

<port>80</port>

<maxIdleTime>60000</maxIdleTime>

</connector>

</connectors>

</configuration>

</plugin>

<plugin>

<groupId>org.apache.maven.plugins</groupId>

<artifactId>maven-compiler-plugin</artifactId>

<version>2.3.2</version>

<configuration>

<source>1.8</source>

<target>1.8</target>

<encoding>UTF-8</encoding>

</configuration>

</plugin>

<plugin>

<groupId>org.apache.tomcat.maven</groupId>

<artifactId>tomcat7-maven-plugin</artifactId>

<version>2.2</version>

<configuration>

<url>http://127.0.0.1:8080/manager/text</url>

<server>tomcat8</server>

<path>/ppzu2.0</path>

</configuration>

</plugin>

</plugins>

</build>

</project>


评论区

JFinal

2018-08-06 11:59

注意看这行:
Caused by: java.util.zip.ZipException: invalid LOC header (bad signature)

zip 或 jar 文件中的签名是错误的,可能是文件被损坏,换之

Java填坑人

2018-08-06 13:11

@JFinal 好的谢谢波总,问题解决了换了个maven就好了

热门反馈

扫码入社