spring-projects / spring-boot

Spring Boot
https://spring.io/projects/spring-boot
Apache License 2.0
74.61k stars 40.55k forks source link

LoggerContext.getConfigurationLock() causes NoSuchMethodError #42432

Closed BlueCaboose42 closed 3 hours ago

BlueCaboose42 commented 4 hours ago

Hello,

When trying to use the getConfigurationLock() method of LogbackConfigurator, the following error is thrown (spring boot version 3.3.0):

java.lang.IllegalStateException: java.lang.NoSuchMethodError: 'java.lang.Object ch.qos.logback.classic.LoggerContext.getConfigurationLock()

An issue was raised in logback that seems near identical to what we're experiencing. The issue was closed citing this commit which seems to have been applied to version 3.3.3.

Can the same fix be applied to version 3.3.0?

Current boot version 3.3.0 Logback version 1.5.7, previously 1.5.6 worked fine

wilkinsona commented 3 hours ago

We can't apply a fix to 3.3.0 as it's been released and cannot be changed. You should either allow Spring Boot to control the version of Logback so that you're using a compatible version or upgrade to Spring Boot 3.3.3 or later.

Duplicates https://github.com/spring-projects/spring-boot/issues/41887.