精华内容
下载资源
问答
  • 启动tomcat部署项目时,报This is very likely to create a memory leak. Stack trace of thread错误。 29-May-2018 12:30:09.322 SEVERE [localhost-startStop-1] org.apache.catalina.core.StandardC...

    前言:部分参考自网上,侵删。

    1、问题描述

    启动tomcat部署项目时,报This is very likely to create a memory leak. Stack trace of thread错误。

    29-May-2018 12:30:09.322 SEVERE [localhost-startStop-1] org.apache.catalina.core.StandardContext.startInternal One or more Filters failed to start. Full details will be found in the appropriate container log file

    29-May-2018 12:30:09.323 SEVERE [localhost-startStop-1] org.apache.catalina.core.StandardContext.startInternal Context [] startup failed due to previous errors

    29-May-2018 12:30:09.427 WARNING [localhost-startStop-1] org.apache.catalina.loader.WebappClassLoaderBase.clearReferencesJdbc The web application [ROOT] registered the JDBC driver [com.alibaba.druid.proxy.DruidDriver] but failed to unregister it when the web application was stopped. To prevent a memory leak, the JDBC Driver has been forcibly unregistered.

    29-May-2018 12:30:09.427 WARNING [localhost-startStop-1] org.apache.catalina.loader.WebappClassLoaderBase.clearReferencesJdbc The web application [ROOT] registered the JDBC driver [com.mysql.jdbc.Driver] but failed to unregister it when the web application was stopped. To prevent a memory leak, the JDBC Driver has been forcibly unregistered.

    29-May-2018 12:30:09.428 WARNING [localhost-startStop-1] org.apache.catalina.loader.WebappClassLoaderBase.clearReferencesJdbc The web application [ROOT] registered the JDBC driver [org.h2.Driver] but failed to unregister it when the web application was stopped. To prevent a memory leak, the JDBC Driver has been forcibly unregistered.

    29-May-2018 12:30:09.428 WARNING [localhost-startStop-1] org.apache.catalina.loader.WebappClassLoaderBase.clearReferencesThreads The web application [ROOT] appears to have started a thread named [Abandoned connection cleanup thread] but has failed to stop it. This is very likely to create a memory leak. Stack trace of thread:

    java.lang.Object.wait(Native Method)

    java.lang.ref.ReferenceQueue.remove(ReferenceQueue.java:143)

    com.mysql.jdbc.AbandonedConnectionCleanupThread.run(AbandonedConnectionCleanupThread.java:64)

    java.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1142)

    java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:617)

    java.lang.Thread.run(Thread.java:745)

    2、问题原因

    tomcat启动奔溃,同时释放了jdbc连接。

    3、解决方案

    这种异常造成的原因千奇百怪,并没有统一的处理方案。我主要两个原因:

    1.spring-context.xml中引入的bean,没有被成功加载。

    2.Mapper.xml出现错误,导致parse失败,比如,generate时,mapper内容重复,或dto,dao等位置不对。

    展开全文
  • 启动tomcat部署项目时,报This is very likely to create a memory leak. Stack trace of thread错误。 29-May-2018 12:30:09.322 SEVERE [localhost-startStop-1] org.apache.catalina.core.StandardContext....

    1、问题描述

    启动tomcat部署项目时,报This is very likely to create a memory leak. Stack trace of thread错误。

    29-May-2018 12:30:09.322 SEVERE [localhost-startStop-1] org.apache.catalina.core.StandardContext.startInternal One or more Filters failed to start. Full details will be found in the appropriate container log file
    29-May-2018 12:30:09.323 SEVERE [localhost-startStop-1] org.apache.catalina.core.StandardContext.startInternal Context [] startup failed due to previous errors
    29-May-2018 12:30:09.427 WARNING [localhost-startStop-1] org.apache.catalina.loader.WebappClassLoaderBase.clearReferencesJdbc The web application [ROOT] registered the JDBC driver [com.alibaba.druid.proxy.DruidDriver] but failed to unregister it when the web application was stopped. To prevent a memory leak, the JDBC Driver has been forcibly unregistered.
    29-May-2018 12:30:09.427 WARNING [localhost-startStop-1] org.apache.catalina.loader.WebappClassLoaderBase.clearReferencesJdbc The web application [ROOT] registered the JDBC driver [com.mysql.jdbc.Driver] but failed to unregister it when the web application was stopped. To prevent a memory leak, the JDBC Driver has been forcibly unregistered.
    29-May-2018 12:30:09.428 WARNING [localhost-startStop-1] org.apache.catalina.loader.WebappClassLoaderBase.clearReferencesJdbc The web application [ROOT] registered the JDBC driver [org.h2.Driver] but failed to unregister it when the web application was stopped. To prevent a memory leak, the JDBC Driver has been forcibly unregistered.
    29-May-2018 12:30:09.428 WARNING [localhost-startStop-1] org.apache.catalina.loader.WebappClassLoaderBase.clearReferencesThreads The web application [ROOT] appears to have started a thread named [Abandoned connection cleanup thread] but has failed to stop it. This is very likely to create a memory leak. Stack trace of thread:
     java.lang.Object.wait(Native Method)
     java.lang.ref.ReferenceQueue.remove(ReferenceQueue.java:143)
     com.mysql.jdbc.AbandonedConnectionCleanupThread.run(AbandonedConnectionCleanupThread.java:64)
     java.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1142)
     java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:617)
     java.lang.Thread.run(Thread.java:745)
    

    2、问题原因

    tomcat启动奔溃,同时释放了jdbc连接。

    3、解决方案

    这种异常造成的原因千奇百怪,并没有统一的处理方案,以下是我遇到的不同情况采取的几种解决方案。

    3.1、存在多个tomcat子线程

    启动前tomcat意外退出,使用ps -ef | grep "tomcat名称"查看是不是有多个tomcat在启动,若有,Kill掉。

    3.2、调整JVM参数

    JAVA_OPTS='-server -Xms5120m -Xmx10240m -XX:PermSize=256m -XX:MaxNewSize=256m -XX:MaxPermSize=5120m '

    3.3、去掉tomcat监听

    tomcat 6.025以后引入了内存泄露侦测,对于垃圾回收不能处理的对像,它就会做日志。去掉监听的方法也很简单:
    在tomcat的server.xml文件中,把
    <!-- Prevent memory leaks due to use of particular java/javax APIs--> <Listener className="org.apache.catalina.core.JreMemoryLeakPreventionListener"/>这个监听给关了。

    3.4、其他

    如果以上方案无法解决问题,只能逐步排查,排查方案如下:
    1.使用“之前部署正常的分支”(我们记为hoaven分支)部署项目;
    2.若tomcat能正常启动,说明tomcat或服务器没有问题,检查自己的代码;
    3.逐步检查自己的代码:从hoaven分支checkout一个分支(fixbug),然后将自己写的代码一点一点移至fixbug分支。
    4.每移动一次代码,部署一次,若正常启动,继续移动代码;若报出以上错误,停止移动,检查本次移动的代码。
    

    其实3.4方法很有效,特别是检查肉眼无法明了的莫名其妙的的bug。

    记录下我某一次检查以上bug采用的3.4方案,得出的结果:
    代码中,有一处注入报错很奇怪:

    @Slf4j
    @Component
    public class RestAuthFilter extends FormAuthenticationFilter {
    
        @Resource
        MobileDeviceService mobileDeviceService;
    
        @Resource
        UserService userService;
        
        ...
    }
    
    
    @Slf4j
    @Service
    public class MobileDeviceServiceImpl implements MobileDeviceService {
        @Resource
        IHddBaseService hddBaseService;
        
        ...
    }
    

    MobileDeviceServiceUserService上的@Resource改为@Autowired部署则没有问题,思考一下:@Resource属于jdk的注解,@Autowired属于spring的注解,应该是注入RestAuthFilter时,在spring容器中没有找到MobileDeviceService和UserService的实例,@Resource会强制将MobileDeviceServiceUserService注入进来,而@Autowired采取的措施是不注入(或注入null)。这样一来,就会有新的问题,MobileDeviceServiceUserService实例为null,解决方案在后面的博客解决。

    展开全文
  • [ERROR] To see the full stack trace of the errors, re-run Maven with the -e switch. [ERROR] Re-run Maven using the -X switch to enable full debug logging. [ERROR] [ERROR] For more information about ...
  • see log file for complete stacktrace com.bea.xml.XmlException: failed to load java type corresponding to e=weblogic-web-app@ http://www.b ea.com/ns/weblogic/90 at ...
  • HTTP状态 500 - 内部服务器错误 类型 异常报告 描述 服务器遇到一个意外的情况,阻止它完成请求。 例外情况 java.lang.NullPointerException com.tomcat.servlet.DownManagerServlet.doGet(DownManagerServlet.java:...

    问题描述

    HTTP状态 500 - 内部服务器错误
    类型 异常报告
    描述 服务器遇到一个意外的情况,阻止它完成请求。
    例外情况
    java.lang.NullPointerException
    com.tomcat.servlet.DownManagerServlet.doGet(DownManagerServlet.java:19)
    javax.servlet.http.HttpServlet.service(HttpServlet.java:626)
    javax.servlet.http.HttpServlet.service(HttpServlet.java:733)
    org.apache.tomcat.websocket.server.WsFilter.doFilter(WsFilter.java:53)
    ):注意 主要问题的全部 stack 信息可以在 server logs 里查看
    Apache Tomcat/9.0.37
    在这里插入图片描述

    找到问题

    • 根据500界面的反馈,可以看见,问题出在Servler容器里,具体查看servlet logs可以找到问题所在。
    • 根据HTTP协议可知,500状态码原因是内部服务错误,也就图中的500界面的反馈。

    解决方法(我用的是IDEA开发版,就以IDEA为例)

    • 首先根据500状态页找到(Tomcat Localhost Logs)红色部分
      在这里插入图片描述

    • 右上角会显示一个选择框白色部分

    • 即可找到问题所在点击灰色报错部分(一般为情况为代码错误)!

    • 然后就会自动找到对应代码(如图描述)
      在这里插入图片描述

    然后根据自己的问题解决问题(希望此片文章对大家有用,祝大家可以快速解决自己的问题!)



    (其他情况暂时还没有遇到,遇到了解决了问题会及时和大家分享)

    展开全文
  • Stack trace of thread: java.lang.Object.wait(Native Method) java.lang.Object.wait(Object.java:502) java.util.TimerThread.mainLoop(Timer.java:526) java.util.TimerThread.run(Timer.java:505) 三...
  • 具体错误信息如下: Struts Problem Report Struts has detected an unhandled exception: Messages: /WEB-INF/jsp/manager/common/login.jsp(6,2) /WEB-INF/jsp/manager/common/head.jsp(16,0) Invalid tld ...
  • 项目在我本机 (Windows) 和 一台服务器(CENTOS7.4)上都能正常启动,但是在另一台服务器(和第一台服务器配置相同)上老是启动失败,项目打开报404错误,重装系统后也是报同样的错误。这个问题困扰我2天了,望...
  • note The full stack trace of the root cause is available in the Apache Tomcat/6.0.13 logs. 这里是我的配置文件 web配置 <servlet-name>springmvc org.springframework.web.servlet....
  • 部署tomcat项目后,启动时报failed setting ip_tt1, 错误原因:未设置禁用IPv6:-Djava.net.preferIPv4Stack=true 解决方法: 1、eclipse: Window--Preferences--JAVA--Installed JREs--选中JDK--EDIT ...
    

    部署tomcat项目后,启动时报failed setting ip_tt1,

    错误原因:未设置禁用IPv6:-Djava.net.preferIPv4Stack=true

    解决方法:

    1、eclipse:

    Window--Preferences--JAVA--Installed JREs--选中JDK--EDIT

    Deault VM Arguments:-Djava.net.preferIPv4Stack=true

    2、服务器:

    windows平台:到<Tomcat安装目录>/bin 下的 catalina.bat文件,找到set JAVA_OPTS部分,

    在其下方添加:set JAVA_OPTS=-Djava.net.preferIPv4Stack=true即可

    linux平台:同上,找到catalina.sh文件。


    展开全文
  • 问题 使用IDEA2019创建Struts2工程时出现以下报错: 严重: Dispatcher initialization failed java.lang.RuntimeException: java.lang.reflect.Invocation...最终在stack overflow上找到了答案 原因:缺少javassist-...
  • 九月 09, 2016 12:34:23 下午 org.apache.catalina.core....这是我从别人那引入的工程,导入后出现上面错误,用的是eclipse,自动导入了好多jar包,请问我这个是什么错误,我自己导入了一个log4j-1.2.17.jar
  • Type Exception Report Message Servlet.init() for servlet WSServlet threw exception ...Note The full stack trace of the root cause is available in the server logs. Apache Tomcat/7.0.91
  • 错误描述: ** BEGIN NESTED EXCEPTION ** java.net.ConnectException MESSAGE: Connection refused: connect STACKTRACE: java.net.ConnectException: Connection refused: connect  at java.net.PlainS
  • **错误信息是在Server startup后立马就出现的**,还没来得及访问index.jsp呢!求指点,谢谢。 web.xml存放在WEB-INF文件夹下 ![图片说明](https://img-ask.csdn.net/upload/201907/20/1563607667_370819.png) ...
  • 在Eclipse中构建J2EE项目时,Tomcat出现access denied错误,不能正常启动TomcatSTACKTRACE: java.net.SocketException: java.security.AccessControlException: access denied (java.net.SocketPermission ...
  • 主要错误是:Skipping non-war project,说明没有找到war包。(web项目必备war包) [root@ovz6022 trunk]# mvn -e tomcat:run + Error stacktraces are turned on. [INFO] Scanning for projects... [INFO] --------...
  • maven项目中,使用clean tomcat7:run启动时报如下错误,小白,求大神解救。在pom.xml中已经配置了tomcat7-maven-plugin。 [INFO] Scanning for projects... [INFO] Downloading from : ...
  • eclipse启动tomcat服务器报错解决

    千次阅读 2018-07-25 16:48:56
    一、错误信息:Illegal access: this web application instance has been stopped already.Could not load . The eventual following stack trace is caused by an error thrown for debugging purposes as well as ...
  • **问题1**:启动tomcat服务器,log4j打印oscache错误信息如下: 2015-03-05 15:14:47,697 INFO GeneralCacheAdministrator:98 - Constructed GeneralCacheAdministrator() 2015-03-05 15:14:47,699 INFO ...
  • tomcat报错access denied

    2012-12-10 11:47:53
    在Eclipse中构建J2EE项目时,Tomcat出现access denied错误,不能正常启动TomcatSTACKTRACE: java.net.SocketException: java.security.AccessControlException: access denied (java.net.SocketPermission ...
  • tomcat 报错access denied

    千次阅读 2012-12-05 17:13:46
    在Eclipse中构建J2EE项目时,Tomcat出现access denied错误,不能正常启动TomcatSTACKTRACE: java.net.SocketException: java.security.AccessControlException: access denied (java.net.SocketPermission ...
  • 我的项目用的是apache-tomcat-8.0.26-windows-i64 出现问题描述: 在服务器启动一段时间后就会报错  错误信息: appears to have started a thread named [Resource Destroyer in BasicResourcePool.close()] but ...
  • [code="java"] 严重: Servlet.service() ... at org.apache.tomcat.util.net.JIoEndpoint$Worker.run(JIoEndpoint.java:489) at java.lang.Thread.run(Thread.java:619) [/code] 不知道什么原因,求指点。
  • 问题:把MySQL从阿里云还原到本地之后,启动Tomcat7,从浏览器运行WEB系统报如下的错误:### Error querying database.? Cause: java.sql.SQLException: Thread stack overrun:? 3480 bytes used of a 131072 byte ...
  • web项目启动一晚后报严重错误在学习Android时,有遇到过一个问题。我用个人电脑安装了Windows Server 2012 系统,并且搭建了个人服务器,用于手机app的数据存储。在使用MyEclipse里运行WebServer项目启动Tomcat时...
  • 把MySQL从阿里云还原到本地之后,启动Tomcat7,从浏览器运行WEB系统报如下的错误: ### Error querying database.? Cause: java.sql.SQLException: Thread stack overrun:? 3480 bytes used of a 131072 byte stack...
  • 问题:把MySQL从阿里云还原到本地之后,启动Tomcat7,从浏览器运行WEB系统报如下的错误:### Error querying database.? Cause: java.sql.SQLException: Thread stack overrun:? 3480 bytes used of a 131072 byte ...
  • 请问用spring+ibatis时,tomcat服务器一直启动着,但是如果长时间不访问网页,相隔估计8个小时以上,再访问网页时,就会报出下面的错误,在刷新网页就可以访问了,请问为什么???? [code="java"]...
  • 我想给你几个选择.你可以尝试一下.任何选项都可以满足您的需求.>重新启动tomcat和apache服务器...如错误所述,The eventual following stack trace is caused by an error thrown fordebugging purposes as well...

空空如也

空空如也

1 2 3
收藏数 58
精华内容 23
热门标签
关键字:

tomcat启动stack错误