tomcat startup error too low setting for -Xss

tomcat startup error too low setting for -Xss

The answers given on the Internet are to adjust the Xss parameters, which is actually not the correct way.

-Xss: Stack size of each thread, "-Xss 15120" This makes tomcat consume 15M memory immediately for each additional thread (thread), and the optimal value should be 128K, the default value seems to be 512k. 

The specific error is as follows

Caused by: java.lang.IllegalStateException: Unable to complete the scan for annotations for web application [] 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]

Because tomcat starts to scan the jar package, see the error message org.bouncycastle.asn1.ASN1EncodableVector, which is in this class

This similar appears in the bcprov*.jar package

So in the catalina.properties file in the conf directory of tomcat,

Add bcprov*.jar filter in tomcat.util.scan.DefaultJarScanner.jarsToSkip=

Start without error


Or upgrade the tomcat version (absolutely solved)

Guess you like

Origin http://43.154.161.224:23101/article/api/json?id=325861903&siteId=291194637