一个jar冲突引发的tomcat没法启动的问题

问题

因为公司有多个jdk版本的使用,而我如今使用的是一个老的版本库,这个库好久没有升级了,因为使用了es因此须要升级一下jar包,我理所固然的升级了,而后一切都很顺利,在沙箱环境下依旧没有问题,直到上线遇到了问题java

严重: The required Server component failed to start so Tomcat is unable to start.
org.apache.catalina.LifecycleException: Failed to start component [StandardServer[9000]]
        at org.apache.catalina.util.LifecycleBase.start(LifecycleBase.java:154)
        at org.apache.catalina.startup.Catalina.start(Catalina.java:689)
        at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
        at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:62)
        at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43)
        at java.lang.reflect.Method.invoke(Method.java:498)
        at org.apache.catalina.startup.Bootstrap.start(Bootstrap.java:321)
        at org.apache.catalina.startup.Bootstrap.main(Bootstrap.java:455)
Caused by: org.apache.catalina.LifecycleException: Failed to start component [StandardService[Catalina]]
        at org.apache.catalina.util.LifecycleBase.start(LifecycleBase.java:154)
        at org.apache.catalina.core.StandardServer.startInternal(StandardServer.java:739)
        at org.apache.catalina.util.LifecycleBase.start(LifecycleBase.java:150)
        ... 7 more
Caused by: org.apache.catalina.LifecycleException: Failed to start component [StandardEngine[Catalina]]
        at org.apache.catalina.util.LifecycleBase.start(LifecycleBase.java:154)
        at org.apache.catalina.core.StandardService.startInternal(StandardService.java:443)

解决问题

1,这个问题感受多是jar包冲突
然而基本上解决了大部分冲突依旧没法解决这个问题
2,认为多是升级JDK致使的问题,在这纠结了好久,而后经过AB Test发现仍是新代码的问题
3,找到关键报错日志,发现真正的报错日志其实已经打印出来了apache

Caused by: java.lang.IllegalStateException: a StackOverflowError. 
Possible root causes include a too low setting for -Xss and illegal cyclic inheritance dependencies. 
The class hierarchy being processed was 
[org.bouncycastle.asn1.ASN1Boolean->org.bouncycastle.asn1.DERBoolean-
>org.bouncycastle.asn1.ASN1Boolean]

发现仍是依赖问题,我所使用的jar包看着其实没有冲突,其实仍是有版本冲突,这时候经过忽略相应的低版本jar包解决了该问题。tomcat

总结

遇到问题仍是要细心查看日志,由于最关键的信息仍是经过日志发现,由于以前没有这台机器的权限,让同事给我打印了日志,可是他截取的是部分日志,并非最核心的日志,经过Google发现的解决方式都是改tomcat文件,可是这种每每都是治标不治本,没有从根本上理解该问题产生的缘由。ui

本质这个问题仍是由于jar冲突致使的

相关文章
相关标签/搜索