无法启动组件-ZipException:无效的LOC标头(错误的签名)

我已经经历过类似的帖子。我已经尝试了大多数解决方案,但无法摆脱我遇到的错误。希望对此有所帮助。

在将Maven依赖项添加到部署程序集之后,出现了此错误。我将STS与Pivotal tc Server Development Edition

v3.1一起使用。我已经检查了tc服务器和java home的版本。两者都使用Java 8。

我不明白问题是什么。

SEVERE: ContainerBase.addChild: start: 

org.apache.catalina.LifecycleException: Failed to start component [StandardEngine[Catalina].StandardHost[localhost].StandardContext[/myProject]]

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

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

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

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

at org.apache.catalina.startup.HostConfig.deployDescriptor(HostConfig.java:596)

at org.apache.catalina.startup.HostConfig$DeployDescriptor.run(HostConfig.java:1805)

at java.util.concurrent.Executors$RunnableAdapter.call(Unknown Source)

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 [org.apache.catalina.webresources.StandardRoot@95e0743]

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

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

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

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

... 10 more

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

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

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

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

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

... 13 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:107)

... 16 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:137)

... 17 more

Dec 03, 2016 10:34:56 AM org.apache.catalina.startup.HostConfig deployDescriptor

SEVERE: Error deploying configuration descriptor E:\Programs\sts-bundle\pivotal-tc-server-developer-3.2.0.RELEASE\base-instance\conf\Catalina\localhost\myProject.xml

java.lang.IllegalStateException: ContainerBase.addChild: start: org.apache.catalina.LifecycleException: Failed to start component [StandardEngine[Catalina].StandardHost[localhost].StandardContext[/myProject]]

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

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

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

at org.apache.catalina.startup.HostConfig.deployDescriptor(HostConfig.java:596)

at org.apache.catalina.startup.HostConfig$DeployDescriptor.run(HostConfig.java:1805)

at java.util.concurrent.Executors$RunnableAdapter.call(Unknown Source)

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)

以下是我的pom.xml。当我尝试将spring-webmvc依赖性添加到pom.xml时出现错误。

<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/xsd/maven-4.0.0.xsd">

<modelVersion>4.0.0</modelVersion>

<groupId>com.infiniteskills.mvc</groupId>

<artifactId>myProject</artifactId>

<version>0.0.1-SNAPSHOT</version>

<dependencies>

<dependency>

<groupId>org.springframework</groupId>

<artifactId>spring-webmvc</artifactId>

<version>4.3.4.RELEASE</version>

</dependency>

<dependency>

<groupId>org.slf4j</groupId>

<artifactId>slf4j-log4j13</artifactId>

<version>1.0.1</version>

</dependency>

<dependency>

<groupId>log4j</groupId>

<artifactId>log4j</artifactId>

<version>1.2.17</version>

</dependency>

</dependencies>

</project>

回答:

我通过删除本地Maven存储库中存在的所有文件并再次下载来解决了类似的问题。

linux或mac用户可以按照以下步骤删除所有文件。

  1. 导航到.m2文件
  2. 执行删除命令(rm -rf仓库/)。

以上是 无法启动组件-ZipException:无效的LOC标头(错误的签名) 的全部内容, 来源链接: utcz.com/qa/418301.html

回到顶部