The following error occurs with Spring Boot.
Failed to instantiate SLF4J LoggerFactory Reported exception:
Failed to instantiate SLF4J LoggerFactory Reported exception: java.lang.NoClassDefFoundError: ch/qos/logback/core/joran/spi/JoranException 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.apache.commons.logging.impl.SLF4JLogFactory.getInstance(SLF4JLogFactory.java:155) at org.apache.commons.logging.impl.SLF4JLogFactory.getInstance(SLF4JLogFactory.java:132) at org.apache.commons.logging.LogFactory.getLog(LogFactory.java:273) at org.springframework.boot.SpringApplication.(SpringApplication.java:189) at hello.HelloWorldConfiguration.main(HelloWorldConfiguration.java:11) Caused by: java.lang.ClassNotFoundException: ch.qos.logback.core.joran.spi.JoranException at java.net.URLClassLoader.findClass(URLClassLoader.java:381) at java.lang.ClassLoader.loadClass(ClassLoader.java:424) at sun.misc.Launcher$AppClassLoader.loadClass(Launcher.java:331) at java.lang.ClassLoader.loadClass(ClassLoader.java:357) … 9 more Exception in thread “main” java.lang.NoClassDefFoundError: ch/qos/logback/core/joran/spi/JoranException 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.apache.commons.logging.impl.SLF4JLogFactory.getInstance(SLF4JLogFactory.java:155) at org.apache.commons.logging.impl.SLF4JLogFactory.getInstance(SLF4JLogFactory.java:132) at org.apache.commons.logging.LogFactory.getLog(LogFactory.java:273) at org.springframework.boot.SpringApplication.(SpringApplication.java:189) at hello.HelloWorldConfiguration.main(HelloWorldConfiguration.java:11) Caused by: java.lang.ClassNotFoundException: ch.qos.logback.core.joran.spi.JoranException at java.net.URLClassLoader.findClass(URLClassLoader.java:381) at java.lang.ClassLoader.loadClass(ClassLoader.java:424) at sun.misc.Launcher$AppClassLoader.loadClass(Launcher.java:331) at java.lang.ClassLoader.loadClass(ClassLoader.java:357) … 9 more
Solution:
The following dependencies need to be added.
<dependency>
<groupId>ch.qos.logback</groupId>
<artifactId>logback-core</artifactId>
<version>${logback.version}</version>
</dependency>
Similar Posts:
- [Solved] Logback configuration error: SLF4J: Class path contains multiple SLF4J bindings.
- [How to Solve] Hive: Unsupported major.minor version 51.0
- [Java. Lang. unsupported classversionerror] version inconsistency error
- java.lang.NoClassDefFoundError: org/hamcrest/SelfDescribing
- [Solved] MVN – version error: Exception in thread “main” java.lang.UnsupportedClassVersionError
- [Solved] java.lang.IllegalStateException: Failed to introspect Class xxxx
- Error reported by feign component of springcloud microservice
- org.springframework.core.log.LogMessage [How to Solve]
- [Solved] Hadoop running jar package error: xception in thread “main” java.lang.ClassNotFoundException: Filter
- [Solved] SLF4J: Failed to load class “org.slf4j.impl.StaticLoggerBinder”