Skip to content

Log4j2SpringBootLoggingSystem (log4j-spring-boot) is not compatible with spring-boot 4.0.0-RC1 #3969

@seregamorph

Description

@seregamorph

The latest spring-boot release candidate 4.0.0-RC1 is not compatible with Log4j2SpringBootLoggingSystem (2.25.2).
The problem is that Log4j2SpringBootLoggingSystem extends org.springframework.boot.logging.log4j2.Log4J2LoggingSystem and this class changed the signature of it's constructor:

  • the constructor is not public anymore (package visible)
  • now it has two parameters, not one

As a result, the application bootstrap fails:

    java.lang.NoSuchMethodError: org.springframework.boot.logging.log4j2.Log4J2LoggingSystem: method 'void <init>(java.lang.ClassLoader)' not found
        at org.apache.logging.log4j.spring.boot.Log4j2SpringBootLoggingSystem.<init>(Log4j2SpringBootLoggingSystem.java:77)
        at org.apache.logging.log4j.spring.boot.Log4j2SpringBootLoggingSystem$Factory.getLoggingSystem(Log4j2SpringBootLoggingSystem.java:266)
        at org.springframework.boot.logging.DelegatingLoggingSystemFactory.getLoggingSystem(DelegatingLoggingSystemFactory.java:46)
        at org.springframework.boot.logging.LoggingSystem.get(LoggingSystem.java:170)

Metadata

Metadata

Assignees

Labels

bugIncorrect, unexpected, or unintended behavior of existing code

Type

No type

Projects

Status

Done

Relationships

None yet

Development

No branches or pull requests

Issue actions