2016-12-03 66 views
8

我已經經歷過類似的帖子。我已經嘗試了大部分解決方案,但無法擺脫我遇到的錯誤。期待一些幫助。無法啓動組件 - ZipException:無效的LOC頭(壞簽名)

在向配置程序集添加maven depenancies之後出現此錯誤。我在Pivotal tc服務器開發版v3.1中使用STS。我已經檢查過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 [[email protected]] 
    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 [[email protected]] 
    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> 
+0

請幫我解決這個問題。我堅持這一點。 – eccentricCoder

+1

您可能在某處存在損壞的JAR文件http://stackoverflow.com/a/38856033/2308683 –

+0

我已經使用maven添加了依賴關係。只有當我嘗試使用spring-webmvc 4.3.4 RELEASE – eccentricCoder

回答

27

我已經通過刪除本地maven存儲庫中的所有文件並再次下載它們來解決類似問題。

linux或mac用戶可以按照以下步驟刪除所有文件。

  1. 導航到.M2文件
  2. 執行刪除命令(室射頻庫/)。
0

瞭解它們到C:\用戶\ user.m2 \庫\項目\ PROJECT1

選擇相應的項目,並從您的.m2目錄中刪除。然後在終端上執行mvn clean install,它會爲你重新創建這些jar文件。重新安裝ear或war文件到服務器中,它現在應該部署得很好。

相關問題