ERROR StatusLogger Log4j2 could not find a logging implementation. Please add log4j-core to the classpath
问题: ERROR StatusLogger Log4j2 could not find a logging implementation. Please add log4j-core to the classpath. Using SimpleLogger to log to the console..
场景: 在配置SSH的时候遇到了这个错误, 然后就需要找一下问题
分析: 按照英文提示, 是说缺少了一个log4j-core.jar的日志核心包
解决方法: 下载log4j-core.jar包
下载地址:
http://central.maven.org/maven2/org/apache/logging/log4j/log4j-core/2.11.2/log4j-core-2.11.2.jar
然后在 src 目录下新建 log4j2.xml
<?xml version="1.0" encoding="UTF-8"?>
<Configuration status="WARN">
<Appenders>
<Console name="Console" target="SYSTEM_OUT">
<PatternLayout pattern="%d{HH:mm:ss.SSS} [%t] %-5level %logger{36} - %msg%n"/>
</Console>
</Appenders>
<Loggers>
<Root level="info">
<AppenderRef ref="Console"/>
</Root>
</Loggers>
</Configuration>
重启tomcat,ok!
注意! 必须要重启tomcat! 而且要把out目录下的web.xml文件删除掉
因为Tomcat执行的时候, 是按照out目录下面的web.xml去执行的.
如果没有重启tomcat, 这个错误会一直都在, 重启了之后就没有了!

参考资料: https://ask.csdn.net/questions/663142
ERROR StatusLogger Log4j2 could not find a logging implementation. Please add log4j-core to the classpath的更多相关文章
- ERROR StatusLogger Log4j2 could not find a logging implementation. Please add log4j-core to the classpath. Using SimpleLogger to log to the console...
Struts2未配置Log4j2.xml报错 Log4j2.xml中的配置 log4j的jar包:log4j-core-2.7.jar log4j2只支持xml和json两种格式的配置,所以配置log ...
- 使用Log4j2,打包后提示ERROR StatusLogger Log4j2 could not find a logging implementation.
从Log4j切换到Log4j2,没有打包之前日志输出正常,但是打包后总是提示下面内容: 错误一: ERROR StatusLogger Log4j2 could not find a logging ...
- ERROR StatusLogger Log4j2 could not find a logging implementation.
今天在学习structs2 2.5.5的版本的时候碰到2个问题.第一个网上下的包里面差log4j-core这个包. 虽然程序可以运行,但控制台会报这个错误. ERROR StatusLogger L ...
- log4j报错ERROR StatusLogger No log4j2 configuration file found. Using default configuration: logging only errors to the console.
ERROR StatusLogger No log4j2 configuration file found. Using default configuration: logging only err ...
- 测试中出现ERROR StatusLogger No log4j2 configuration file
概述 在hibernate框架搭建完成用log4j2进行测试时,总是出现ERROR StatusLogger No log4j2 configuration file found. Using def ...
- Log4j2报错ERROR StatusLogger Unrecognized format specifier
问题 使用maven-shade-plugin或者maven-assembly-plugin插件把项目打成一个可执行JAR包时,如果你引入了log4j2会出现如下问题: ERROR StatusLog ...
- Log4j2 - Unable to invoke factory method in class org.apache.logging.log4j.core.appender.RollingFileAppender for element RollingFileAppender for element RollingFile
问题与分析 在使用Log4j2时,虽然可以正确读取配置文件并生成log文件,但偶然发现控制台打印了异常信息如下: 2018-12-31 17:28:14,282 Log4j2-TF-19-Config ...
- 巨坑npm run dev 报错 终于找到正确答案 Error: EPERM: operation not permitted, open '/data/public/build/css/add.p
Windows10环境 npm run dev 报错 终于找到正确答案 Error: EPERM: operation not permitted, open '/data/public/build ...
- Spring Boot ERROR StatusLogger No Log4j 2 configuration file found
1. 问题描述 项目之前的 log4j2 配置没问题,把 pom 文件中的 spring-boot-starter-web 依赖删除后,然后启动项目就报错找不到 log4j2.yml 文件. 之前引用 ...
随机推荐
- js 模拟a标签打开新网页
在这里备份一下,方便以后查找. var el = document.createElement("a"); document.body.appendChild(el); e ...
- 【204】显示3D大球球
1. 光滑球 From Jan 28, 2016 2. 大球球 https://www.revolvermaps.com/?target=enlarge&i=0xoqkxnu52c&a ...
- Linux ubuntu 下寻找 texlive 缺失包 texlive 缺失包(转载)
转自:http://blog.sina.com.cn/s/blog_87315ca60101d4d1.html 在Linux下用 latex 编译 ××.tex 文件有时候时会提示: ! LaTeX ...
- 洛谷 - P1034 - 矩形覆盖 - dfs
https://www.luogu.org/problemnew/show/P1034 可能是数据太水了瞎搞都可以过. 判断两个平行于坐标轴的矩形相交(含顶点与边相交)的代码一并附上. 记得这里的xy ...
- 解决sqlserver的sql脚本内存不足问题
1.Win+R输出cmd 2.sqlcmd -i E:\Work\xxxxx.sql -d xxxxx(数据库名称) -s 127.0.0.1
- POJ2796【单调栈】
题意: 题意:n个数,求某段区间的最小值*该段区间所有元素之和的最大值 思路: 主要参考:http://www.cnblogs.com/ziyi–caolu/archive/2013/06/23/31 ...
- bzoj 1823: [JSOI2010]满汉全席【2-SAT+tarjan】
因为每种食材只有一份,所以两个评委的如果有要求同一种食材的两种做法就是不可行,用这个来建立2-SAT模型 然后跑tarjan判可行性即可 #include<iostream> #inclu ...
- IT兄弟连 JavaWeb教程 Servlet表单乱码问题
在使用原生的Servlet进行Web应用开发时经常会遇到一些中文乱码问题,造成乱码问题的原因只有一个:即客户端与服务端的字符编码不一致所导致的. 请求参数乱码问题 服务器端获取客户端传递过来的数据出现 ...
- jQuery笔记之位置图形
位置图形: 位置坐标图形大小相关方法: .offset() .position() .scrollTop()..scrollLeft() .width().height() .innerWidth() ...
- JAVA学习笔记(一)配置环境
java语言的两种机制: Java 的虚拟机机制(JVM):虚拟机机制保证Java程序的跨平台特性. Java 的垃圾回收机制:垃圾回收机制保证Java程序更安全.更高效. 环境搭配:安装JDK和JR ...