tomcat启动内存堆栈溢出ASN1EncodableVector,DEREncodableVector循环依赖
2018-04-03 11:04
477 查看
主要问题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.ASN1EncodableVector]
解决的手段1、有的说调整tomcat的xss大小,就是tomcat的启动参数,然而在这里没什么用,-xss =1024m(如果是循环依赖,内存再大也是死循环会用完)。2、告诉tomcat不要扫描annotations, 修改web.xml (这里没有用)<web-app id="WebApp_ID" version="2.4" metadata-complete="true"
xmlns="http://java.sun.com/xml/ns/j2ee" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
xsi:schemaLocation="http://java.sun.com/xml/ns/javaee http://java.sun.com/xml/ns/javaee/web-app_2_5.xsd">
问题原因红色部分为报错的根本原因:是jvm的栈溢出问题;而导致栈溢出的根本原因是由于蓝色部分显示的jar包冲突,这种情况是有两个jar都含有上述相同的类名,且继承关系刚好相反,故造成tomcat启动的环问题。ASN1EncodableVector依赖DEREncodableVector,DEREncodableVector依赖ASN1EncodableVector形成死循环。解决方法找到lib下面的jar集,
这里打开所有的jar后,发现DEREncodableVector和ASN1EncodableVector在bcmail-jdk14-1.38.jar及下面的三个包都存在,删掉重复的,部署访问成功。
解决的手段1、有的说调整tomcat的xss大小,就是tomcat的启动参数,然而在这里没什么用,-xss =1024m(如果是循环依赖,内存再大也是死循环会用完)。2、告诉tomcat不要扫描annotations, 修改web.xml (这里没有用)<web-app id="WebApp_ID" version="2.4" metadata-complete="true"
xmlns="http://java.sun.com/xml/ns/j2ee" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
xsi:schemaLocation="http://java.sun.com/xml/ns/javaee http://java.sun.com/xml/ns/javaee/web-app_2_5.xsd">
问题原因红色部分为报错的根本原因:是jvm的栈溢出问题;而导致栈溢出的根本原因是由于蓝色部分显示的jar包冲突,这种情况是有两个jar都含有上述相同的类名,且继承关系刚好相反,故造成tomcat启动的环问题。ASN1EncodableVector依赖DEREncodableVector,DEREncodableVector依赖ASN1EncodableVector形成死循环。解决方法找到lib下面的jar集,
这里打开所有的jar后,发现DEREncodableVector和ASN1EncodableVector在bcmail-jdk14-1.38.jar及下面的三个包都存在,删掉重复的,部署访问成功。
相关文章推荐
- 解决tomcat启动Socket监听端口死循环被hold问题
- tomcat 启动内存设置
- Myeclipse 启动tomcat提示内存溢出的解决方案
- eclipse启动tomcat出现内存溢出错误 java.lang.OutOfMemoryError: PermGen space
- eclipse中启动tomcat设置tomcat内存大小
- Myeclipse10内存溢出,tomcat启动不溢出
- tomcat7启动服务内存溢出
- tomcat启动jvm内存设置
- Linux中设置tomcat启动内存
- Tomcat启动的初始内存设置(Tomcat 的JVM 内存溢出)
- Tomcat启动内存设置
- OpenCL优化方法-消除访问内存数组引起的循环依赖关系
- tomcat 启动内存设置
- tomcat 启动内存设置
- Maven项目启动Tomcat对应项目目录下lib中没有引进依赖包
- Eclipse里启动Tomcat,配置内存大小
- myeclipse启动tomcat程序爆内存溢出的心得
- 解决tomcat启动被某个servlet里执行方法死循环tomcat被hold的问题
- java.lang.OutOfMemoryError: Java heap space + myeclipse中分配tomcat启动时所占内存大小
- tomcat启动增加内存