112_报错解决:springboot : java.lang.NoClassDefFoundError ch/qos/logback/core/joran/spi/JoranException

报错:

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.logging.slf4j.SLF4JLoggerContext.getLogger(SLF4JLoggerContext.java:39)
    at org.apache.commons.logging.LogFactory$Log4jLog.(LogFactory.java:204)
    at org.apache.commons.logging.LogFactory$Log4jDelegate.createLog(LogFactory.java:166)
    at org.apache.commons.logging.LogFactory.getLog(LogFactory.java:109)
    at org.apache.commons.logging.LogFactory.getLog(LogFactory.java:99)
    at org.springframework.boot.SpringApplication.(SpringApplication.java:200)
    at com.wangp.springboot.quickstart.SpringBoot02QuickstartApplication.main(SpringBoot02QuickstartApplication.java:13)
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)
    ... 11 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.logging.slf4j.SLF4JLoggerContext.getLogger(SLF4JLoggerContext.java:39)
    at org.apache.commons.logging.LogFactory$Log4jLog.(LogFactory.java:204)
    at org.apache.commons.logging.LogFactory$Log4jDelegate.createLog(LogFactory.java:166)
    at org.apache.commons.logging.LogFactory.getLog(LogFactory.java:109)
    at org.apache.commons.logging.LogFactory.getLog(LogFactory.java:99)
    at org.springframework.boot.SpringApplication.(SpringApplication.java:200)
    at com.wangp.springboot.quickstart.SpringBoot02QuickstartApplication.main(SpringBoot02QuickstartApplication.java:13)
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)
    ... 11 more
 

解决方式:

1.删除maven仓库中ch文件夹

112_报错解决:springboot : java.lang.NoClassDefFoundError ch/qos/logback/core/joran/spi/JoranException_第1张图片

2.项目右键:Maven-->Update Project就可以解决了

112_报错解决:springboot : java.lang.NoClassDefFoundError ch/qos/logback/core/joran/spi/JoranException_第2张图片

你可能感兴趣的:(Java)