java.lang.NoClassDefFoundError: org/apache/log4j/Level的解决方案

报的错误是
Failed to instantiate SLF4J LoggerFactory
Reported exception:
java.lang.NoClassDefFoundError: org/apache/log4j/Level
at org.slf4j.LoggerFactory.bind(LoggerFactory.java:150)
at org.slf4j.LoggerFactory.performInitialization(LoggerFactory.java:124)
at org.slf4j.LoggerFactory.getILoggerFactory(LoggerFactory.java:412)
at org.slf4j.LoggerFactory.getLogger(LoggerFactory.java:357)
at org.slf4j.LoggerFactory.getLogger(LoggerFactory.java:383)
at org.quartz.impl.StdSchedulerFactory.(StdSchedulerFactory.java:284)
at quartz.HiScheduling.main(HiScheduling.java:17)
Caused by: java.lang.ClassNotFoundException: org.apache.log4j.Level
at java.net.URLClassLoader 1.run(URLClassLoader.java:372)atjava.net.URLClassLoader 1.run(URLClassLoader.java:361)
at java.security.AccessController.doPrivileged(Native Method)
at java.net.URLClassLoader.findClass(URLClassLoader.java:360)
at java.lang.ClassLoader.loadClass(ClassLoader.java:424)
at sun.misc.Launcher AppClassLoader.loadClass(Launcher.java:308)atjava.lang.ClassLoader.loadClass(ClassLoader.java:357)7moreExceptioninthreadmainjava.lang.NoClassDefFoundError:org/apache/log4j/Levelatorg.slf4j.LoggerFactory.bind(LoggerFactory.java:150)atorg.slf4j.LoggerFactory.performInitialization(LoggerFactory.java:124)atorg.slf4j.LoggerFactory.getILoggerFactory(LoggerFactory.java:412)atorg.slf4j.LoggerFactory.getLogger(LoggerFactory.java:357)atorg.slf4j.LoggerFactory.getLogger(LoggerFactory.java:383)atorg.quartz.impl.StdSchedulerFactory.(StdSchedulerFactory.java:284)atquartz.HiScheduling.main(HiScheduling.java:17)Causedby:java.lang.ClassNotFoundException:org.apache.log4j.Levelatjava.net.URLClassLoader 1.run(URLClassLoader.java:372)
at java.net.URLClassLoader 1.run(URLClassLoader.java:361)atjava.security.AccessController.doPrivileged(NativeMethod)atjava.net.URLClassLoader.findClass(URLClassLoader.java:360)atjava.lang.ClassLoader.loadClass(ClassLoader.java:424)atsun.misc.Launcher AppClassLoader.loadClass(Launcher.java:308)
at java.lang.ClassLoader.loadClass(ClassLoader.java:357)
… 7 more

其实是导jar包导多了
java.lang.NoClassDefFoundError: org/apache/log4j/Level的解决方案_第1张图片
把该jar包删了就没事了!
就能够正常运行了

打赏一点钱,帮我买杯咖啡,继续创作,谢谢大家!
java.lang.NoClassDefFoundError: org/apache/log4j/Level的解决方案_第2张图片

你可能感兴趣的:(异常)