tomcat8启动占内存溢出

发布时间:2020-07-23 11:17:10 作者:两天三顿
来源:网络 阅读:3345
严重: ContainerBase.addChild: start: 
org.apache.catalina.LifecycleException: Failed to start component [StandardEngine[Catalina].StandardHost[localhost].StandardContext[/OMAP]] 
at org.apache.catalina.util.LifecycleBase.start(LifecycleBase.java:154) 
at org.apache.catalina.core.ContainerBase.addChildInternal(ContainerBase.java:901) 
at org.apache.catalina.core.ContainerBase.addChild(ContainerBase.java:877) 
at org.apache.catalina.core.StandardHost.addChild(StandardHost.java:633) 
at org.apache.catalina.startup.HostConfig.deployDirectory(HostConfig.java:1114) 
at org.apache.catalina.startup.HostConfig$DeployDirectory.run(HostConfig.java:1673) 
at java.util.concurrent.Executors$RunnableAdapter.call(Executors.java:441) 
at java.util.concurrent.FutureTask$Sync.innerRun(FutureTask.java:303) 
at java.util.concurrent.FutureTask.run(FutureTask.java:138) 
at java.util.concurrent.ThreadPoolExecutor$Worker.runTask(ThreadPoolExecutor.java:886) 
at java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:908) 
at java.lang.Thread.run(Thread.java:619) 

Caused by: java.lang.IllegalStateException: Unable to complete the scan for annotations for web application [/mypro]. Possible root causes include a too low setting for -Xss and illegal cyclic inheritance dependencies

at org.apache.catalina.startup.ContextConfig.processAnnotationsStream(ContextConfig.java:2109) 
at org.apache.catalina.startup.ContextConfig.processAnnotationsJar(ContextConfig.java:1981) 
at org.apache.catalina.startup.ContextConfig.processAnnotationsUrl(ContextConfig.java:1947) 
at org.apache.catalina.startup.ContextConfig.processAnnotations(ContextConfig.java:1932) 
at org.apache.catalina.startup.ContextConfig.webConfig(ContextConfig.java:1326) 
at org.apache.catalina.startup.ContextConfig.configureStart(ContextConfig.java:878) 
at org.apache.catalina.startup.ContextConfig.lifecycleEvent(ContextConfig.java:369) 
at org.apache.catalina.util.LifecycleSupport.fireLifecycleEvent(LifecycleSupport.java:119) 
at org.apache.catalina.util.LifecycleBase.fireLifecycleEvent(LifecycleBase.java:90) 
at org.apache.catalina.core.StandardContext.startInternal(StandardContext.java:5179) 
at org.apache.catalina.util.LifecycleBase.start(LifecycleBase.java:150) 
... 11 more 
Caused by: java.lang.StackOverflowError 
at java.util.HashMap.get(HashMap.java:300) 
at org.apache.catalina.startup.ContextConfig.populateSCIsForCacheEntry(ContextConfig.java:2257) 
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) 
at org.apache.catalina.startup.ContextConfig.populateSCIsForCacheEntry(ContextConfig.java:2269) 
at org.apache.catalina.startup.ContextConfig.populateSCIsForCacheEntry(ContextConfig.java:2269) 
…… 

原因:
servlet3.1支持servlet注解,扫描jar包太深导致内存溢出
解决办法:
修改tomcat目录下conf/catalina.properties
在tomcat.util.scan.StandardJarScanFilter.jarsToSkip后添加“,*”(前提是不使用servlet3.0的annotation支持)

推荐阅读:
  1. tomcat8支持CGI
  2. windows下部署Tomcat8

免责声明:本站发布的内容(图片、视频和文字)以原创、转载和分享为主,文章观点不代表本网站立场,如果涉及侵权请联系站长邮箱:is@yisu.com进行举报,并提供相关证据,一经查实,将立刻删除涉嫌侵权内容。

tomcat stackoverflow omc

上一篇:关于Python中随机数的使用案例

下一篇:Oracle SQLPlus如何导出数据到csv文件

相关阅读

您好,登录后才能下订单哦!

密码登录
登录注册
其他方式登录
点击 登录注册 即表示同意《亿速云用户服务条款》