Hello
We are integrating Spring Batch into web-application (Tomcat).
All Spring Batch - related beans are defined in separate context definition xml file.
There is nothing specific to log4j in this file, also nothing specific to Spring Batch classes in log4j configuration.
However when we add import of this file to the main applicationContext.xml and deploy, we are getting errors (upon deployment):
Does Spring batch use any specific classloader indeed ? How to resolve this conflict ?Code:log4j:ERROR A "org.apache.log4j.xml.DOMConfigurator" object is not assignable to a "org.apache.log4j.spi.Configurator" variable. log4j:ERROR The class "org.apache.log4j.spi.Configurator" was loaded by log4j:ERROR [org.apache.catalina.loader.StandardClassLoader@172e449] whereas object of type log4j:ERROR "org.apache.log4j.xml.DOMConfigurator" was loaded by [WebappClassLoader delegate: false repositories: /WEB-INF/classes/ ----------> Parent Classloader: org.apache.catalina.loader.StandardClassLoader@172e449 ]. log4j:ERROR Could not instantiate configurator [org.apache.log4j.xml.DOMConfigurator].
Thank you.


Reply With Quote

