2016-12-29 166 views
2

嘗試啓動tomcat時,出現此錯誤。這可能是什麼原因?無法啓動組件[StandardEngine [Catalina] .StandardHost [localhost]

我經歷了一堆類似的帖子,我找不到任何東西。

我使用Apache Tomcat的V8.0和JRE 1.8.0

java.util.concurrent.ExecutionException: org.apache.catalina.LifecycleException: Failed to start component [StandardEngine[Catalina].StandardHost[localhost].StandardContext[/ocmsLatest]] 
    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:915) 
    at org.apache.catalina.core.StandardHost.startInternal(StandardHost.java:871) 
    at org.apache.catalina.util.LifecycleBase.start(LifecycleBase.java:147) 
    at org.apache.catalina.core.ContainerBase$StartChild.call(ContainerBase.java:1407) 
    at org.apache.catalina.core.ContainerBase$StartChild.call(ContainerBase.java:1397) 
    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[/ocmsLatest]] 
    at org.apache.catalina.util.LifecycleBase.start(LifecycleBase.java:153) 
    ... 6 more 
Caused by: java.lang.SecurityException: SHA1 digest error for javax/activation/MimeTypeParameterList.class 
    at sun.security.util.ManifestEntryVerifier.verify(Unknown Source) 
    at java.util.jar.JarVerifier.processEntry(Unknown Source) 
    at java.util.jar.JarVerifier.update(Unknown Source) 
    at java.util.jar.JarVerifier$VerifierStream.read(Unknown Source) 
    at java.io.InputStream.skip(Unknown Source) 
    at java.io.BufferedInputStream.skip(Unknown Source) 
    at java.io.DataInputStream.skipBytes(Unknown Source) 
    at org.apache.tomcat.util.bcel.classfile.Utility.skipFully(Utility.java:61) 
    at org.apache.tomcat.util.bcel.classfile.Utility.swallowAttribute(Utility.java:86) 
    at org.apache.tomcat.util.bcel.classfile.Utility.swallowFieldOrMethod(Utility.java:76) 
    at org.apache.tomcat.util.bcel.classfile.ClassParser.readMethods(ClassParser.java:234) 
    at org.apache.tomcat.util.bcel.classfile.ClassParser.parse(ClassParser.java:94) 
    at org.apache.catalina.startup.ContextConfig.processAnnotationsStream(ContextConfig.java:2042) 
    at org.apache.catalina.startup.ContextConfig.processAnnotationsJar(ContextConfig.java:1988) 
    at org.apache.catalina.startup.ContextConfig.processAnnotationsUrl(ContextConfig.java:1958) 
    at org.apache.catalina.startup.ContextConfig.processAnnotations(ContextConfig.java:1912) 
    at org.apache.catalina.startup.ContextConfig.webConfig(ContextConfig.java:1157) 
    at org.apache.catalina.startup.ContextConfig.configureStart(ContextConfig.java:779) 
    at org.apache.catalina.startup.ContextConfig.lifecycleEvent(ContextConfig.java:306) 
    at org.apache.catalina.util.LifecycleSupport.fireLifecycleEvent(LifecycleSupport.java:95) 
    at org.apache.catalina.util.LifecycleBase.fireLifecycleEvent(LifecycleBase.java:90) 
    at org.apache.catalina.core.StandardContext.startInternal(StandardContext.java:5202) 
    at org.apache.catalina.util.LifecycleBase.start(LifecycleBase.java:147) 
    ... 6 more 

Dec 29, 2016 3:34:43 PM org.apache.catalina.core.ContainerBase startInternal 
SEVERE: 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:915) 
    at org.apache.catalina.core.StandardEngine.startInternal(StandardEngine.java:262) 
    at org.apache.catalina.util.LifecycleBase.start(LifecycleBase.java:147) 
    at org.apache.catalina.core.StandardService.startInternal(StandardService.java:441) 
    at org.apache.catalina.util.LifecycleBase.start(LifecycleBase.java:147) 
    at org.apache.catalina.core.StandardServer.startInternal(StandardServer.java:787) 
    at org.apache.catalina.util.LifecycleBase.start(LifecycleBase.java:147) 
    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) 
Caused by: org.apache.catalina.LifecycleException: Failed to start component [StandardEngine[Catalina].StandardHost[localhost]] 
    at org.apache.catalina.util.LifecycleBase.start(LifecycleBase.java:153) 
    at org.apache.catalina.core.ContainerBase$StartChild.call(ContainerBase.java:1407) 
    at org.apache.catalina.core.ContainerBase$StartChild.call(ContainerBase.java:1397) 
    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:923) 
    at org.apache.catalina.core.StandardHost.startInternal(StandardHost.java:871) 
    at org.apache.catalina.util.LifecycleBase.start(LifecycleBase.java:147) 
    ... 6 more 

Dec 29, 2016 3:34:43 PM org.apache.catalina.startup.Catalina start 
SEVERE: 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:153) 
    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) 
Caused by: org.apache.catalina.LifecycleException: Failed to start component [StandardService[Catalina]] 
    at org.apache.catalina.util.LifecycleBase.start(LifecycleBase.java:153) 
    at org.apache.catalina.core.StandardServer.startInternal(StandardServer.java:787) 
    at org.apache.catalina.util.LifecycleBase.start(LifecycleBase.java:147) 
    ... 7 more 
Caused by: org.apache.catalina.LifecycleException: Failed to start component [StandardEngine[Catalina]] 
    at org.apache.catalina.util.LifecycleBase.start(LifecycleBase.java:153) 
    at org.apache.catalina.core.StandardService.startInternal(StandardService.java:441) 
    at org.apache.catalina.util.LifecycleBase.start(LifecycleBase.java:147) 
    ... 9 more 
Caused by: org.apache.catalina.LifecycleException: A child container failed during start 
    at org.apache.catalina.core.ContainerBase.startInternal(ContainerBase.java:923) 
    at org.apache.catalina.core.StandardEngine.startInternal(StandardEngine.java:262) 
    at org.apache.catalina.util.LifecycleBase.start(LifecycleBase.java:147) 
    ... 11 more 

Dec 29, 2016 3:34:43 PM org.apache.coyote.AbstractProtocol pause 
INFO: Pausing ProtocolHandler ["http-nio-8080"] 
Dec 29, 2016 3:34:43 PM org.apache.coyote.AbstractProtocol pause 
INFO: Pausing ProtocolHandler ["ajp-nio-8009"] 
Dec 29, 2016 3:34:43 PM org.apache.catalina.core.StandardService stopInternal 
INFO: Stopping service Catalina 
Dec 29, 2016 3:34:43 PM org.apache.coyote.AbstractProtocol destroy 
INFO: Destroying ProtocolHandler ["http-nio-8080"] 
Dec 29, 2016 3:34:43 PM org.apache.coyote.AbstractProtocol destroy 
SEVERE: Failed to destroy end point associated with ProtocolHandler ["http-nio-8080"] 
java.lang.NullPointerException 
    at org.apache.tomcat.util.net.NioEndpoint.releaseCaches(NioEndpoint.java:316) 
    at org.apache.tomcat.util.net.NioEndpoint.unbind(NioEndpoint.java:492) 
    at org.apache.tomcat.util.net.AbstractEndpoint.destroy(AbstractEndpoint.java:821) 
    at org.apache.coyote.AbstractProtocol.destroy(AbstractProtocol.java:534) 
    at org.apache.catalina.connector.Connector.destroyInternal(Connector.java:1023) 
    at org.apache.catalina.util.LifecycleBase.destroy(LifecycleBase.java:297) 
    at org.apache.catalina.core.StandardService.destroyInternal(StandardService.java:589) 
    at org.apache.catalina.util.LifecycleBase.destroy(LifecycleBase.java:297) 
    at org.apache.catalina.core.StandardServer.destroyInternal(StandardServer.java:877) 
    at org.apache.catalina.util.LifecycleBase.destroy(LifecycleBase.java:297) 
    at org.apache.catalina.startup.Catalina.start(Catalina.java:633) 
    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) 

Dec 29, 2016 3:34:43 PM org.apache.coyote.AbstractProtocol destroy 
INFO: Destroying ProtocolHandler ["ajp-nio-8009"] 
Dec 29, 2016 3:34:43 PM org.apache.coyote.AbstractProtocol destroy 
SEVERE: Failed to destroy end point associated with ProtocolHandler ["ajp-nio-8009"] 
java.lang.NullPointerException 
    at org.apache.tomcat.util.net.NioEndpoint.releaseCaches(NioEndpoint.java:316) 
    at org.apache.tomcat.util.net.NioEndpoint.unbind(NioEndpoint.java:492) 
    at org.apache.tomcat.util.net.AbstractEndpoint.destroy(AbstractEndpoint.java:821) 
    at org.apache.coyote.AbstractProtocol.destroy(AbstractProtocol.java:534) 
    at org.apache.catalina.connector.Connector.destroyInternal(Connector.java:1023) 
    at org.apache.catalina.util.LifecycleBase.destroy(LifecycleBase.java:297) 
    at org.apache.catalina.core.StandardService.destroyInternal(StandardService.java:589) 
    at org.apache.catalina.util.LifecycleBase.destroy(LifecycleBase.java:297) 
    at org.apache.catalina.core.StandardServer.destroyInternal(StandardServer.java:877) 
    at org.apache.catalina.util.LifecycleBase.destroy(LifecycleBase.java:297) 
    at org.apache.catalina.startup.Catalina.start(Catalina.java:633) 
    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) 

和JAR文件:

activation 
antlr 
asm-3.1 
asm-commons-3.3 
asm-tree-3.3 
bcprov-jdk15on-1.47 
c3p0-0.9.1.2 
commons-beanutils-1.7.0 
commons-collections-3.1 
commons-digester 
commons-io-1.3.2 
commons-lang-2.3 
commons-logging-1.0.4 
commons-validator 
displaytag-1.2 
displaytag-export-poi-1.2 
displaytag-portlet-1.2 
dom4j-1.6 
eclipselink-2.0.2 
eclipselink-javax.persistence-2.0 
freemarker 
freemarker-2.3.15 
gcm-server-1.0.2 
imgscalr-lib-4.2 
iText-2.1.7 
jackson-annotations-2.2.3 
jackson-core-2.2.3 
jackson-core-asl-1.9.2 
jackson-databind-2.2.3 
jackson-jaxrs-1.9.2 
jackson-mapper-asl-1.9.2 
jackson-xc-1.9.2 
jasper-compiler-jdt 
jasperreports-4.1.1 
javapns-2.2.1 
javassist 
jcommon-1.0.17 
jersey-apache-client-1.18 
jersey-atom-abdera-1.18 
jersey-client-1.18 
jersey-core-1.18 
jersey-guice-1.18 
jersey-json-1.18 
jersey-multipart-1.18 
jersey-server-1.18 
jersey-servlet-1.18 
jersey-simple-server-1.18 
jersey-spring-1.18 
jettison-1.1 
jfreechart-1.0.14 
json-simple-1.1.1 
jsr311-api-1.1.1 
jxl 
log4j-1.2.13 
mail 
mimepull-1.4 
mysql-connector-java-5.0.5 
oauth-client-1.18 
oauth-server-1.18 
oauth-signature-1.18 
ognl-2.7.3 
poi-3.7 
poi-3.8-20120326 
poi-3.11-beta2 
poi-ooxml-3.11-beta2 
poi-ooxml-schemas-3.11-beta2 
quartz-all-2.1.6 
recaptcha4j-0.0.7 
slf4j-api-1.6.1 
slf4j-log4j12-1.6.1 
struts2-core-2.1.8.1 
struts2-dojo-plugin-2.2.3 
struts2-fullhibernatecore-plugin-1.4-GA 
struts2-jasperreports-plugin-2.2.3 
struts2-jquery-grid-plugin-3.2.1 
struts2-jquery-plugin-3.2.1 
struts2-json-plugin-2.2.3 
struts2-tiles-plugin-2.2.3 
tiles-api-2.0.6 
tiles-core-2.0.6 
tiles-jsp-2.0.6 
xmlbeans-2.6.0 
xwork-core-2.1.6 

回答

1

Tomcat確實有問題(請參閱bug #60087)和驗證jar文件簽名。

解決方案:

  • 更新的Apache Tomcat版本。

  • 在將應用程序部署到Tomcat服務器之前,如果您閱讀Verifying Signed JAR Files,則可能會手動驗證文件的簽名。

  • 您可能還會損壞下載的jar文件。您應該始終從已知來源或存儲庫下載。

  • 您還可以與jar文件一起下載摘要簽名文件並使用OS實用程序驗證文件的內容。

  • 請勿使用惡意網站託管的jar文件進行下載。

  • 使用防病毒掃描jar內的病毒並驗證簽名。某些防病毒軟件有錯誤,您不應該使用其結果報告作爲關於文件內容的最終決定。例如。 Error: "Invalid sha1 signature file digest for" when verifying a Jar file

1

你的罐子完全搞砸了:

  1. 始終保持版本一致性(例如,不是核心2.1.8.1插件2.2.3
  2. 總是拿起最新版本(例如, 2.3.x或者,如果您可以破解逆向兼容性,請參閱2.5.x
  3. 始終只包含您知道和使用的Struts2插件,只包含所需的插件。刪除所有其他人。
  4. 總是避免包括相同庫的兩個版本,例如。 poi 3.7 and poi 3.8。你在開玩笑嗎 ?
  5. 的Tomcat 8.0的第一個版本已經知道問題Struts2的,你應該升級到最新版本(如:8.0.39),或者甚至更好,以8.5
相關問題