Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Logging System Fails to Initialize After Upgrading Logback to 1.5.16 (NoSuchMethodError in LogbackConfigurator) #904

Open
kuanchengLiu opened this issue Jan 9, 2025 · 2 comments
Assignees

Comments

@kuanchengLiu
Copy link

kuanchengLiu commented Jan 9, 2025

Hi all,

.Upgrading to logback from 1.5.6 to 1.5.16 with tomcat resulting into
Logging system failed to initialize using configuration from 'null'

Spring Boot expects getConfigurationLock to return an Object and fails with NoSuchMethodError.

Error Logs

Logging system failed to initialize using configuration from 'null'
java.lang.NoSuchMethodError: 'java.lang.Object ch.qos.logback.classic.LoggerContext.getConfigurationLock()'
	at org.springframework.boot.logging.logback.LogbackConfigurator.getConfigurationLock(LogbackConfigurator.java:53)
	at org.springframework.boot.logging.logback.DefaultLogbackConfiguration.apply(DefaultLogbackConfiguration.java:57)
	... (stack trace continues)

Environment

  • Spring Boot Version: 3.2.9
  • Logback Version: 1.5.16
  • JDK Version: 21.0.1
@ceki ceki self-assigned this Jan 9, 2025
@ceki
Copy link
Member

ceki commented Jan 9, 2025

@kuanchengLiu The change was introduced in logback version 1.5.7 dated 2024-08-15.

In any case, this issue is present in Spring Boot version 3.2.x but has been fixed in Spring Boot version 3.3.3 and later. Please update to Spring Boot version 3.3.3 or later.

@nitinkumar-na
Copy link

For your information, upgrading to Spring Boot 3.3 is not that easy (at least for us). There are a lot of breaking changes that we need to adapt to.
You can't expect people to upgrade the framework version to fix a security vulnerability.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

3 participants