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.