Failed to instantiate [ch.qos.logback.classic.LoggerContext] logback self4j版本不匹配

Failed to instantiate [ch.qos.logback.classic.LoggerContext]
Reported exception:
java.lang.AbstractMethodError: ch.qos.logback.classic.pattern.EnsureExceptionHandling.process(Lch/qos/logback/core/Context;Lch/qos/logback/core/pattern/Converter;)V
	at ch.qos.logback.core.pattern.PatternLayoutBase.start(PatternLayoutBase.java:86)
	at ch.qos.logback.classic.encoder.PatternLayoutEncoder.start(PatternLayoutEncoder.java:28)
	at ch.qos.logback.classic.BasicConfigurator.configure(BasicConfigurator.java:50)
	at ch.qos.logback.classic.util.ContextInitializer.autoConfig(ContextInitializer.java:150)
	at org.slf4j.impl.StaticLoggerBinder.init(StaticLoggerBinder.java:85)
	at org.slf4j.impl.StaticLoggerBinder.(StaticLoggerBinder.java:55)
	at org.slf4j.LoggerFactory.bind(LoggerFactory.java:142)
	at org.slf4j.LoggerFactory.performInitialization(LoggerFactory.java:121)
	at org.slf4j.LoggerFactory.getILoggerFactory(LoggerFactory.java:332)
	at org.slf4j.LoggerFactory.getLogger(LoggerFactory.java:284)
	at org.slf4j.LoggerFactory.getLogger(LoggerFactory.java:305)
	at org.tianlangstudio.data.hamal.common.Logging.$init$(Logging.scala:10)
	at org.tianlangstudio.data.hamal.server.http.HttpServerApp$.(HttpServerApp.scala:12)
	at org.tianlangstudio.data.hamal.server.http.HttpServerApp.main(HttpServerApp.scala)

因self4j与logback版本不匹配引起,修改self4j版本为1.7.26 logback版本为1.2.3解决

<dependency>
			<groupId>org.slf4jgroupId>
			<artifactId>slf4j-apiartifactId>
			<version>1.7.26version>
		dependency>
		<dependency>
			<groupId>ch.qos.logbackgroupId>
			<artifactId>logback-classicartifactId>
			<version>1.2.3version>
		dependency>
		<dependency>
			<groupId>ch.qos.logbackgroupId>
			<artifactId>logback-coreartifactId>
			<version>1.2.3version>
		dependency>

你可能感兴趣的:(Java,Scala)