gpt4 book ai didi

tomcat - 如何修复 Tomcat 7.0.35 中 org.apache.catalina.startup.ContextConfig.populateSCIsForCacheEntry 中的 StackOverflowError

转载 作者:行者123 更新时间:2023-11-28 23:10:37 32 4
gpt4 key购买 nike

我们正在运行旧版本的 Tomcat,而新的 Web 应用程序导致了这样的堆栈跟踪

Caused by: java.lang.StackOverflowError
at org.apache.catalina.startup.ContextConfig.populateSCIsForCacheEntry(ContextConfig.java:2269)
at org.apache.catalina.startup.ContextConfig.populateSCIsForCacheEntry(ContextConfig.java:2269)
at org.apache.catalina.startup.ContextConfig.populateSCIsForCacheEntry(ContextConfig.java:2269)

这已在 https://bz.apache.org/bugzilla/show_bug.cgi?id=53871 中提到, 以及更高版本(如 Tomcat 8)似乎不受影响。

我该如何解决这个问题?

最佳答案

由于无法升级 Tomcat,我需要一种解决此问题的方法。

事实证明 Tomcat 7.0.47 有同样的问题,但报告更好。在本地运行时,报告向我展示了这一点:

Caused by: java.lang.IllegalStateException: Unable to complete the scan for 
annotations for web application [/api] 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.ASN1Boolean->org.bouncycastle.asn1.DERBoolean-
>org.bouncycastle.asn1.ASN1Boolean]

一旦找到有问题的 jar 文件,我就将它添加到 catalina.properties 文件中,如下所示:

org.apache.catalina.startup.ContextConfig.jarsToSkip=bcprov*.jar

这似乎解决了旧版本 Tomcat 中的问题。

关于tomcat - 如何修复 Tomcat 7.0.35 中 org.apache.catalina.startup.ContextConfig.populateSCIsForCacheEntry 中的 StackOverflowError,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/58539052/

32 4 0
Copyright 2021 - 2024 cfsdn All Rights Reserved 蜀ICP备2022000587号
广告合作:1813099741@qq.com 6ren.com