tomcat启动报异常(一)


  异常问题:Caused by: java.lang.IllegalStateException: Unable to complete the scan for annotations for web application [XXX] due to 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.ASN1EncodableVector->org.bouncycastle.asn1.DEREncodableVector->org.bouncycastle.asn1.ASN1EncodableVe
ctor]

  问题根因:因为tomcat启动会去扫描jar包,看错误信息org.bouncycastle.asn1.ASN1EncodableVector是出在这个类,这个类似出现在bcprov*.jar这个包。

 

  解决方法:找到tomcat --> conf中的catalina.properties文件,在tomcat.util.scan.DefaultJarScanner.jarsToSkip=里面加上bcprov*.jar过滤,重启就不会报错了。

 

  ps:百度搜索到其他解决方案有:升级tomcat。(这个没亲测过,不知行不行)


免责声明!

本站转载的文章为个人学习借鉴使用,本站对版权不负任何法律责任。如果侵犯了您的隐私权益,请联系本站邮箱yoyou2525@163.com删除。



 
粤ICP备18138465号  © 2018-2025 CODEPRJ.COM