Tomcat启动堆栈异常
近日部署项目到Tomcat,访问一直404。
于是查看 catalina.out 日志信息,发现如下信息
30-Jun-2019 16:38:03.642 SEVERE [main] org.apache.catalina.core.StandardContext.startInternal One or more listeners failed to start. Full details will be found in the appropriate container log file
30-Jun-2019 16:38:03.646 SEVERE [main] org.apache.catalina.core.StandardContext.startInternal Context [/XXX] startup failed due to previous errors
其实还是没有看明白原因,只知道项目启动失败
再次查看 localhost.2019-06-30.log 发现如下循环输出的异常信息:
30-Jun-2019 16:13:56.351 SEVERE [localhost-startStop-1] org.apache.catalina.core.StandardContext.listenerStart Exception sending context initialized event to listener instance of class [org.springframework.web.context.ContextLoaderListener]
java.lang.StackOverflowError
at org.apache.log4j.Log4jLoggerFactory.getLogger(Log4jLoggerFactory.java:39)
at org.apache.log4j.LogManager.getLogger(LogManager.java:45)
at org.slf4j.impl.Log4jLoggerFactory.getLogger(Log4jLoggerFactory.java:66)
at org.slf4j.LoggerFactory.getLogger(LoggerFactory.java:270)
at org.apache.log4j.Category.<init>(Category.java:57)
at org.apache.log4j.Logger.<init>(Logger.java:37)
at org.apache.log4j.Log4jLoggerFactory.getLogger(Log4jLoggerFactory.java:43)
at org.apache.log4j.LogManager.getLogger(LogManager.java:45)
at org.slf4j.impl.Log4jLoggerFactory.getLogger(Log4jLoggerFactory.java:66)
at org.slf4j.LoggerFactory.getLogger(LoggerFactory.java:270)
at org.apache.log4j.Category.<init>(Category.java:57)
at org.apache.log4j.Logger.<init>(Logger.java:37)
推测是jar包冲突:log4j-over-slf4j.jar 和 slf4j-log4j12.jar
果然在 WEB-INF\lib 里面找到这两个家伙,于是先删除log4j-over-slf4j.jar,在重启tomcat,通过浏览器能够正常访问。
我们的是maven项目,用的Idea。
打开pom.xml文件
右键 -> Maven -> Show Dependencies
然后打开依赖的图, 看到依赖关系之后,
ctrl+f 在弹出框Diagram Elements 找到 log4j-over-slf4j 点进去:
右键 -> Exclude 即可。
最终在pom.xml文件里自动生成排除我们在界面exclude的依赖。
重新打包项目,发布war包到tomcat,能正常启动,访问。
问题解决。
Tomcat启动堆栈异常的更多相关文章
- tomcat启动出现异常 Error filterStart
tomcat启动中出现 Error filterStart异常, 没有任何堆栈信息,如下: SEVERE: Error filterStart Jul 6, 2012 3:39:05 PM org.a ...
- tomcat启动报异常(一)
异常问题:Caused by: java.lang.IllegalStateException: Unable to complete the scan for annotations for web ...
- Tomcat 启动过滤器异常
严重 [RMI TCP Connection(2)-127.0.0.1] org.apache.catalina.core.StandardContext.filterStart 启动过滤器异常 ja ...
- tomcat 启动 证书异常java.io.IOException: Alias name [cas] does not identify a key entry
在搭建CAS server的过程中,Tomcat开启https,配置秘钥证书,证书是通过keytool生成的 <Connector port=" protocol="org. ...
- Tomcat启动之异常java.lang.IllegalStateException
严重: Exception sending context destroyed event to listener instance of class org.springframework.web. ...
- 用普通用户通过sudo进行启动tomcat时报如下异常
用普通用户通过sudo进行启动tomcat时报如下异常 tomcat user 不在 sudoers 文件中.此事将被报告. 这是由于sudo命令使用root用户执行命令.而处于安全性的考虑,一般不允 ...
- Tomcat启动load action异常
近期将之前的项目移到另一个文件夹中(包的路径也更改了),启动Tomcat之后包错:无法加载action,看错误提示知道是路径错误,网上也有各种各样的解决方案,这里我的错误是因为项目移到了别的文件中,所 ...
- IDEA tomcat启动异常 org.apache.catalina.startup.ContextConfig parseWebXml
启动Tomcat发现有异常,总是无法启动,具体的异常日志为下图 具体的解决方法为:在tomcat的conf/content.xml中加上<Loader delegate="true&q ...
- tomcat 启动异常 EOFException: Unexpected end of ZLIB input stream
EVERE: Exception fixing docBase for context [/agdis] java.io .EOFException: Unexpected end of ZLIB i ...
随机推荐
- [转]docx4j实现动态表格(模板式)
原文地址:https://chendd.cn/information/viewInformation/other/257.a 除了前篇文章中讲到的编程式创建表格外,基于模板实现的列表表格也是非常常用或 ...
- 利用Superlance监控Supervisor运行状态并实现报警
Superlance是基于supervisor的事件机制实现的一系列命令行的工具集,它实现了许多supervisor本身没有实现的实用的进程监控和管理的特性,包括内存监控,http接口监控,邮件和短信 ...
- IfcEdge
/* Generated By: IFC Tools Project EXPRESS TO JAVA COMPILER: Do not edit this file!! */ package ifc2 ...
- 【Git】PHP项目自动化部署的注意事项
直接开始 1 服务器克隆项目 git clone git@*****.com/project.git 2 更改所有者 chown www:www /www/wwwroot/project/* -R 3 ...
- C语言设计模式
一 .C语言和设计模式(继承.封装.多态) C++有三个最重要的特点,即继承.封装.多态.我发现其实C语言也是可以面向对象的,也是可以应用设计模式的,关键就在于如何实现面向对象语言的三个重要属性. ( ...
- https本地自签名证书添加到信任证书访问
1.背景 本文适用于基于https(http+ssl)的网站通信.本地调试等,上线是请寻找免费 ssl证书申请. 本地调试过程中,一些特殊的场景需要我使用http+ssl通信,比如在Chrome中使用 ...
- Leetcode problems classified by company 题目按公司分类(Last updated: October 2, 2017)
All LeetCode Questions List 题目汇总 Sorted by frequency of problems that appear in real interviews. Las ...
- 关于jQuery请求后台成功一直走error回调函数问题
如果dataType声明与响应不符就会进入error回调.就算接口请求成功,也是走error回调函数.
- ThreadLocal源代码3
public class ThreadLocal1<T> { //当创建了一个 ThreadLocal 的实例后,它的散列值就已经确定了, //threadLocal实例的hashCode ...
- C++ 每日一题 参数分析 (vector)
首先给出原题地址: https://www.nowcoder.com/practice/668603dc307e4ef4bb07bcd0615ea677?tpId 以下是代码解析: #include& ...