You are viewing a plain text version of this content. The canonical link for it is here.
Posted to notifications@logging.apache.org by "Ralph Goers (Jira)" <ji...@apache.org> on 2020/12/10 21:26:00 UTC

[jira] [Created] (LOG4J2-2974) Log4j fails to initialize with Log4j-spring-cloud-config in Java 8

Ralph Goers created LOG4J2-2974:
-----------------------------------

             Summary: Log4j fails to initialize with Log4j-spring-cloud-config in Java 8
                 Key: LOG4J2-2974
                 URL: https://issues.apache.org/jira/browse/LOG4J2-2974
             Project: Log4j 2
          Issue Type: Bug
          Components: API
    Affects Versions: 2.14.0
            Reporter: Ralph Goers


During initialization Log4j tries to access properties. If Log4j's Spring support is present it will try to access Spring's environment. In order to do that it tries to check if LogManager's factory has been initialized. That will run the static block in LogManager which then gets a NullPointerException in a method it calls. 

To address this Log4j's Spring environment lookup needs to be able to determine that one isn't available yet without accessing LogManager.



--
This message was sent by Atlassian Jira
(v8.3.4#803005)