Regression: Commons Logging setup in AnnotationUtils causes early initialization of logging system [SPR-12329] #16934
Labels
in: core
Issues in core modules (aop, beans, core, context, expression)
status: backported
An issue that has been backported to maintenance branches
type: bug
A general bug
Milestone
Yanming Zhou opened SPR-12329 and commented
I am using log4j, and using a custom system property "app.home" placeholder in log4j configuration.
set system property with a ServletContextListener.contextInitialized(), It works fine util I have more than one WebApplicationInitializers, after my investigation, I found it caused by SpringServletContainerInitializer
AnnotationAwareOrderComparator depends on org.springframework.core.annotation.AnnotationUtils, AnnotationUtils used commons-logging, It will make my log4j premature, "app.home" will eval as empty since SpringServletContainerInitializer is executed before any ServletContextListener.contextInitialized().
please remove logging from AnnotationUtils, it's not useful. or use java.util.logging instead.
Affects: 4.0.7, 4.1.1
Issue Links:
Backported to: 4.0.8
The text was updated successfully, but these errors were encountered: