我在这里绝望了。我可以在本地的tomcat7服务器上启动我的webApp但是当我在pom.xml中添加一个jar(它是我的WebApp所需的模块)时,我收到此错误并且服务器无法启动:
SEVERE: A child container failed during start
java.util.concurrent.ExecutionException: org.apache.catalina.LifecycleException: Failed to start component [StandardEngine[Catalina].StandardHost[localhost].StandardContext[/densite-simulator-WebApp]]
at java.util.concurrent.FutureTask.report(FutureTask.java:122)
at java.util.concurrent.FutureTask.get(FutureTask.java:192)
at org.apache.catalina.core.ContainerBase.startInternal(ContainerBase.java:1122)
at org.apache.catalina.core.StandardHost.startInternal(StandardHost.java:819)
at org.apache.catalina.util.LifecycleBase.start(LifecycleBase.java:150)
at org.apache.catalina.core.ContainerBase$StartChild.call(ContainerBase.java:1574)
at org.apache.catalina.core.ContainerBase$StartChild.call(ContainerBase.java:1564)
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 [StandardEngine[Catalina].StandardHost[localhost].StandardContext[/densite-simulator-WebApp]]
at org.apache.catalina.util.LifecycleBase.start(LifecycleBase.java:154)
... 6 more
Caused by: java.lang.SecurityException: Invalid signature file digest for Manifest main attributes
at sun.security.util.SignatureFileVerifier.processImpl(SignatureFileVerifier.java:284)
at sun.security.util.SignatureFileVerifier.process(SignatureFileVerifier.java:238)
at java.util.jar.JarVerifier.processEntry(JarVerifier.java:273)
at java.util.jar.JarVerifier.update(JarVerifier.java:228)
at java.util.jar.JarFile.initializeVerifier(JarFile.java:383)
at java.util.jar.JarFile.getInputStream(JarFile.java:450)
at org.apache.tomcat.util.scan.FileUrlJar.getEntryInputStream(FileUrlJar.java:97)
at org.apache.catalina.startup.ContextConfig.processAnnotationsJar(ContextConfig.java:1964)
at org.apache.catalina.startup.ContextConfig.processAnnotationsUrl(ContextConfig.java:1931)
at org.apache.catalina.startup.ContextConfig.processAnnotations(ContextConfig.java:1916)
at org.apache.catalina.startup.ContextConfig.webConfig(ContextConfig.java:1330)
at org.apache.catalina.startup.ContextConfig.configureStart(ContextConfig.java:889)
at org.apache.catalina.startup.ContextConfig.lifecycleEvent(ContextConfig.java:386)
at org.apache.catalina.util.LifecycleSupport.fireLifecycleEvent(LifecycleSupport.java:117)
at org.apache.catalina.util.LifecycleBase.fireLifecycleEvent(LifecycleBase.java:90)
at org.apache.catalina.core.StandardContext.startInternal(StandardContext.java:5419)
at org.apache.catalina.util.LifecycleBase.start(LifecycleBase.java:150)
答案 0 :(得分:1)
这让我今天疯了。最后,我发现了对org.bouncycastle库的依赖,在这个库中,它在几个月没有工作的情况下突然出现了这个 - 删除
'org.bouncycastle:bcprov-jdk16:1.45'
和
'org.bouncycastle:bcpg-jdk16:1.46'
来自依赖项的为我解决了这个问题。
答案 1 :(得分:0)
我今天遇到了同样的问题。我的应用程序依赖于Bouncy Castle,并且Tomcat在尝试初始化servlet时抛出了此确切异常。
就我而言,我正在将弹性城堡JAR文件原样部署到Tomcat中(没有将其分解为胖的JAR)。但是,在我们的构建过程中,我们有一个插件可以使我们的构建具有可复制性(如果源未更改,则每个构建都会生成相同的哈希值)。相同的插件正在更改弹性城堡JAR(以剥离一些时间相关的信息,这些信息会导致JAR的哈希值在两次构建之间更改),从而导致错误。
虽然这可能不是您的确切问题,但希望对您有所帮助。此错误的根本原因是某些东西正在修改充气城堡签名的JAR文件,从而导致签名不再匹配。看看您的构建过程,并检查是否有可能在部署JAR文件之前对其进行了修改(例如packaging everything as a fat JAR)。