我们在从spring-boot 1.3.2升级到最近发布的1.3.3时遇到了问题。
我们的应用程序一直在使用以下依赖项,每个依赖项都是最新的,并且没有问题:
<neo4j.version>2.3.2</neo4j.version>
<sdn.version>4.0.0.RELEASE</sdn.version>
<sdn.rest.version>3.4.0.RELEASE</sdn.rest.version>
<neo4j.ogm.version>1.1.5</neo4j.ogm.version>
今天我升级了我们基于spring-boot和Spring Data Neo4j的应用程序。它在spring-boot 1.3.2.RELEASE下启动和运行良好。升级是通过修改pom.xml实现的。
Today I upgraded our spring-boot and Spring Data Neo4j-based application, which starts and works well with spring-boot 1.3.2.RELEASE, by changing the pom.xml from:
<parent>
<groupId>org.springframework.boot</groupId>
<artifactId>spring-boot-starter-parent</artifactId>
<version>1.3.2.RELEASE</version>
</parent>
到
<parent>
<groupId>org.springframework.boot</groupId>
<artifactId>spring-boot-starter-parent</artifactId>
<version>1.3.3.RELEASE</version>
</parent>
仅此一项更改后,应用现在无法启动,并显示以下错误:
...
Failed to instantiate [ch.qos.logback.classic.LoggerContext]
Reported exception:
java.lang.AbstractMethodError: ch.qos.logback.classic.pattern.EnsureExceptionHandling.process(Lch/qos/logback/core/pattern/Converter;)V
at ch.qos.logback.core.pattern.PatternLayoutBase.start(PatternLayoutBase.java:88)
at ch.qos.logback.classic.encoder.PatternLayoutEncoder.start(PatternLayoutEncoder.java:28)
at ch.qos.logback.core.joran.action.NestedComplexPropertyIA.end(NestedComplexPropertyIA.java:167)
at ch.qos.logback.core.joran.spi.Interpreter.callEndAction(Interpreter.java:317)
at ch.qos.logback.core.joran.spi.Interpreter.endElement(Interpreter.java:196)
at ch.qos.logback.core.joran.spi.Interpreter.endElement(Interpreter.java:182)
at ch.qos.logback.core.joran.spi.EventPlayer.play(EventPlayer.java:62)
at ch.qos.logback.core.joran.GenericConfigurator.doConfigure(GenericConfigurator.java:149)
at ch.qos.logback.core.joran.GenericConfigurator.doConfigure(GenericConfigurator.java:135)
at ch.qos.logback.core.joran.GenericConfigurator.doConfigure(GenericConfigurator.java:99)
at ch.qos.logback.core.joran.GenericConfigurator.doConfigure(GenericConfigurator.java:49)
at ch.qos.logback.classic.util.ContextInitializer.configureByResource(ContextInitializer.java:77)
at ch.qos.logback.classic.util.ContextInitializer.autoConfig(ContextInitializer.java:152)
at org.slf4j.impl.StaticLoggerBinder.init(StaticLoggerBinder.java:85)
at org.slf4j.impl.StaticLoggerBinder.<clinit>(StaticLoggerBinder.java:55)
at org.slf4j.LoggerFactory.bind(LoggerFactory.java:143)
at org.slf4j.LoggerFactory.performInitialization(LoggerFactory.java:122)
at org.slf4j.LoggerFactory.getILoggerFactory(LoggerFactory.java:378)
at org.slf4j.LoggerFactory.getLogger(LoggerFactory.java:328)
at org.slf4j.LoggerFactory.getLogger(LoggerFactory.java:349)
at com.mycompany.Application.<clinit>(Application.java:35)
如预期的那样,返回到1.3.2.RELEASE没有引起任何问题。
目前搜索未发现任何线索。比较使用spring-boot 1.3.2.RELEASE和1.3.3.RELEASE时mvn dependency:tree
输出之间的差异,我可以看到 ch.qos.logback:logback-classic 和 ch.qos.logback:logback-access依赖的传递性依赖已从 spring-boot 1.3.2.RELEASE 的1.1.3更改为 spring-boot 1.3.3.RELEASE的1.1.5,而ch.qos.logback:logback-core在两种spring-boot版本中均保持为1.1.3。
是否有人知道潜在问题是什么(我猜测未能实例化的类已被删除或重新定位)以及/或者更重要的是我该怎么做才能解决它?
mvn dependency:tree
的输出。您可能有另一个依赖项将其强制回到1.1.3,而不是使用Spring Boot 1.1.5。 - M. Deinum