0
一切工作正常,直到我從Workspaces中刪除此項目加載和編輯另一個項目,當我重新加載前項目,它無法在Tomcat上啓動。我沒有改變web.xml和其他文件的話,我嘗試了幾種現有的解決方案上的Web像下面但都失敗了:無法在Tomcat 8.0中部署我的項目:無法啓動組件[StandardEngine [Catalina] .StandardHost [localhost] .StandardContext
確保MyEclipse的Java版本和Tomcat是相同的。
嘗試刪除Tomcat,並重新部署項目。
檢查web.xml(我什麼也沒做,但它在以前正常工作)。
刪除整個工作區目錄並重新啓動項目。
這裏是日誌的控制檯部分:
信息: Deploying web application directory /Users/haohui/Downloads/apache-tomcat-8.0.41/webapps/ROOT
二月 18, 2017 1:02:38 下午 org.apache.catalina.startup.HostConfig deployDirectory
信息: Deployment of web application directory /Users/haohui/Downloads/apache-tomcat-8.0.41/webapps/ROOT has finished in 14 ms
二月 18, 2017 1:02:38 下午 org.apache.catalina.startup.HostConfig deployDirectory
信息: Deploying web application directory /Users/haohui/Downloads/apache-tomcat-8.0.41/webapps/v3
二月 18, 2017 1:02:38 下午 org.apache.catalina.core.ContainerBase addChildInternal
嚴重: ContainerBase.addChild: start:
org.apache.catalina.LifecycleException: Failed to start component [StandardEngine[Catalina].StandardHost[localhost].StandardContext[/v3]]
at org.apache.catalina.util.LifecycleBase.start(LifecycleBase.java:162)
at org.apache.catalina.core.ContainerBase.addChildInternal(ContainerBase.java:753)
at org.apache.catalina.core.ContainerBase.addChild(ContainerBase.java:729)
at org.apache.catalina.core.StandardHost.addChild(StandardHost.java:717)
at org.apache.catalina.startup.HostConfig.deployDirectory(HostConfig.java:1092)
at org.apache.catalina.startup.HostConfig$DeployDirectory.run(HostConfig.java:1834)
at java.util.concurrent.Executors$RunnableAdapter.call(Executors.java:511)
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 [[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)
... 10 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:706)
at org.apache.catalina.util.LifecycleBase.start(LifecycleBase.java:145)
... 13 more
Caused by: java.lang.IllegalArgumentException: java.util.zip.ZipException: invalid LOC header (bad signature)
at org.apache.catalina.webresources.AbstractSingleArchiveResourceSet.initInternal(AbstractSingleArchiveResourceSet.java:113)
at org.apache.catalina.util.LifecycleBase.init(LifecycleBase.java:102)
... 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(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:111)
... 17 more
二月 18, 2017 1:02:38 下午 org.apache.catalina.startup.HostConfig deployDirectory
嚴重: Error deploying web application directory /Users/haohui/Downloads/apache-tomcat-8.0.41/webapps/v3
java.lang.IllegalStateException: ContainerBase.addChild: start: org.apache.catalina.LifecycleException: Failed to start component [StandardEngine[Catalina].StandardHost[localhost].StandardContext[/v3]]
at org.apache.catalina.core.ContainerBase.addChildInternal(ContainerBase.java:757)
at org.apache.catalina.core.ContainerBase.addChild(ContainerBase.java:729)
at org.apache.catalina.core.StandardHost.addChild(StandardHost.java:717)
at org.apache.catalina.startup.HostConfig.deployDirectory(HostConfig.java:1092)
at org.apache.catalina.startup.HostConfig$DeployDirectory.run(HostConfig.java:1834)
at java.util.concurrent.Executors$RunnableAdapter.call(Executors.java:511)
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)
二月 18, 2017 1:02:38 下午 org.apache.catalina.startup.HostConfig deployDirectory
信息: Deployment of web application directory /Users/haohui/Downloads/apache-tomcat-8.0.41/webapps/v3 has finished in 28 ms
二月 18, 2017 1:02:38 下午 org.apache.coyote.AbstractProtocol start
信息: Starting ProtocolHandler ["http-nio-8080"]
二月 18, 2017 1:02:38 下午 org.apache.coyote.AbstractProtocol start
信息: Starting ProtocolHandler ["ajp-nio-8009"]
二月 18, 2017 1:02:38 下午 org.apache.catalina.startup.Catalina start
信息: Server startup in 711 ms