[logback-dev] [JIRA] Updates for LOGBACK-1761: Logback 1.4.8 -> 1.4.10 breaks Spring Boot 3.1.2

logback developers list logback-dev at qos.ch
Thu Aug 10 17:42:00 CEST 2023


logback / LOGBACK-1761 [Open]
Logback 1.4.8 -> 1.4.10 breaks Spring Boot 3.1.2

==============================

Here's what changed in this issue in the last few minutes.

This issue has been created
This issue is now assigned to you.


View or comment on issue using this link
https://jira.qos.ch/browse/LOGBACK-1761

==============================
 Issue created
------------------------------

Garret Wilson created this issue on 10/Aug/23 17:30

Summary:              Logback 1.4.8 -> 1.4.10 breaks Spring Boot 3.1.2
Issue Type:           Bug
Assignee:             Logback dev list
Components:           logback-core
Created:              10/Aug/23 17:30
Priority:             Critical
Reporter:             Garret Wilson
Description:
  I am using this just-release {{com.globalmentor:globalmentor-root:0.8.16}} POM as a parent: https://github.com/globalmentor/globalmentor-root/blob/main/pom.xml . It sets the {{logback.version}} Maven property to {{1.4.10}}, and then puts some Logback artifacts under dependency management.
  
  {code:xml}
  <dependency>
    <groupId>ch.qos.logback</groupId>
    <artifactId>logback-access</artifactId>
    <version>${logback.version}</version>
  </dependency>
  
  <dependency>
    <groupId>ch.qos.logback</groupId>
    <artifactId>logback-classic</artifactId>
    <version>${logback.version}</version>
  </dependency>
  
  <dependency>
    <groupId>ch.qos.logback</groupId>
    <artifactId>logback-core</artifactId>
    <version>${logback.version}</version>
  </dependency>
  {code}
  
  (Unfortunately Logback doesn't have a BOM; see SLF4J-437.)
  
  In my child POM I am using Spring Boot, with {{spring.boot.version}} similarly set to {{3.1.2}} in the parent POM:
  
  {code:xml}
  <dependency>
    <groupId>org.springframework.boot</groupId>
    <artifactId>spring-boot-dependencies</artifactId>
    <version>${spring.boot.version}</version>
    <type>pom</type>
    <scope>import</scope>
  </dependency>
  {code}
  
  
  This all means that I am using Spring Boot 3.1.2, but pulling in {{logback-access}}, {{logback-classic}}, and {{logback-core}} at v1.4.10 to override the v1.4.8 brought in by {{spring-boot-starter-logging}}.
  
  Unfortunately when I run a Spring Boot application it gives me:
  
  {noformat}
  Exception in thread "main" java.lang.AbstractMethodError: Receiver class org.springframework.boot.logging.logback.RootLogLevelConfigurator does not define or inherit an implementation of the resolved method 'abstract ch.qos.logback.classic.spi.Configurator$ExecutionStatus configure(ch.qos.logback.core.Context)' of interface ch.qos.logback.classic.spi.Configurator.
  	at ch.qos.logback.classic.util.ContextInitializer.invokeConfigure(ContextInitializer.java:122)
  	at ch.qos.logback.classic.util.ContextInitializer.autoConfig(ContextInitializer.java:87)
  	at ch.qos.logback.classic.util.ContextInitializer.autoConfig(ContextInitializer.java:65)
  	at ch.qos.logback.classic.spi.LogbackServiceProvider.initializeLoggerContext(LogbackServiceProvider.java:52)
  	at ch.qos.logback.classic.spi.LogbackServiceProvider.initialize(LogbackServiceProvider.java:41)
  	at org.slf4j.LoggerFactory.bind(LoggerFactory.java:183)
  	at org.slf4j.LoggerFactory.performInitialization(LoggerFactory.java:170)
  	at org.slf4j.LoggerFactory.getProvider(LoggerFactory.java:455)
  	at org.slf4j.LoggerFactory.getILoggerFactory(LoggerFactory.java:441)
  	at org.slf4j.LoggerFactory.getLogger(LoggerFactory.java:390)
  	at org.apache.commons.logging.LogAdapter$Slf4jAdapter.createLocationAwareLog(LogAdapter.java:121)
  	at org.apache.commons.logging.LogAdapter.createLog(LogAdapter.java:95)
  	at org.apache.commons.logging.LogFactory.getLog(LogFactory.java:67)
  	at org.apache.commons.logging.LogFactory.getLog(LogFactory.java:59)
  	at org.springframework.boot.SpringApplication.<clinit>(SpringApplication.java:185)
  	at ….main(….java:27)
  {noformat}
  
  This tells me there is at least one of two problems going on:
  
  * Logback 1.4.10 is incompatible with Spring Boot 3.1.2, and/or
  * Something in {{logback-access}}, {{logback-classic}}, and {{logback-core}} at v1.4.10 depends on some other Logback artifact I missed, which is still set out v1.4.8 because of Spring Boot. (I wouldn't have this second doubt if there was a Logback BOM.)
  
  You will know better than me what changed between Logback v1.4.8 and v1.4.10 that might be causing this message, or that might depend on some other updated Logback artifact.
  
  For now I will set {{logback.version}} back to {{1.4.8}} so the program will run, but this seems pretty urgent to address, either by fixing the incompatibility, or by providing a BOM to ensure that all artifacts are updated in sync.


==============================
 This message was sent by Atlassian Jira (v9.6.0#960000-sha1:a3ee8af)



More information about the logback-dev mailing list