maven工程,启动main方法报错,slf4j 和 log4j冲突?

SLF4J: Failed to load class "org.slf4j.impl.StaticLoggerBinder".

SLF4J: Defaulting to no-operation (NOP) logger implementation

SLF4J: See http://www.slf4j.org/codes.html#StaticLoggerBinder for further details.

Exception in thread "main" java.lang.NoClassDefFoundError: org/apache/commons/logging/LogFactory

at com.espertech.esper.client.Configuration.<clinit>(Configuration.java:40)

at esper.TransationChecker.<init>(TransationChecker.java:31)

at esper.InitEsper.main(InitEsper.java:17)

Caused by: java.lang.ClassNotFoundException: org.apache.commons.logging.LogFactory

at java.net.URLClassLoader$1.run(URLClassLoader.java:366)

at java.net.URLClassLoader$1.run(URLClassLoader.java:355)

at java.security.AccessController.doPrivileged(Native Method)

at java.net.URLClassLoader.findClass(URLClassLoader.java:354)

at java.lang.ClassLoader.loadClass(ClassLoader.java:423)

at sun.misc.Launcher$AppClassLoader.loadClass(Launcher.java:308)

at java.lang.ClassLoader.loadClass(ClassLoader.java:356)

... 3 more


小花要努力奋斗
浏览 3763回答 1
1回答

Caballarii

并不是冲突,而是你少包或者少配置了commons-logging.jar
打开App,查看更多内容
随时随地看视频慕课网APP

相关分类

Java