Project: mule
Issue MULE-6628: Should be able to replace Log4j for another logging implementation
http://www.mulesoft.org/documentation/display/MULE3USER/Configuring+Logging says in the section titled "I don't want to use Log4j" that the log4j jar can be removed so long as SLF4J is wired to another logging implementation. Removing the Log4j jar results in WrapperManager Error: Error in WrapperListener.start callback. java.lang.NoClassDefFoundError: org/apache/log4j/spi/RepositorySelector WrapperManager Error: java.lang.NoClassDefFoundError: org/apache/log4j/spi/RepositorySelector WrapperManager Error: at java.lang.Class.getDeclaredConstructors0(Native Method) WrapperManager Error: at java.lang.Class.privateGetDeclaredConstructors(Class.java:2389) WrapperManager Error: at java.lang.Class.getConstructor0(Class.java:2699) WrapperManager Error: at java.lang.Class.getConstructor(Class.java:1657) WrapperManager Error: at org.mule.module.reboot.MuleContainerWrapper.start(MuleContainerWrapper.java:53) WrapperManager Error: at org.tanukisoftware.wrapper.WrapperManager$12.run(WrapperManager.java:3925) WrapperManager Error: Caused by: java.lang.ClassNotFoundException: org.apache.log4j.spi.RepositorySelector WrapperManager Error: at java.net.URLClassLoader$1.run(URLClassLoader.java:202) WrapperManager Error: at java.security.AccessController.doPrivileged(Native Method) WrapperManager Error: at java.net.URLClassLoader.findClass(URLClassLoader.java:190) WrapperManager Error: at java.lang.ClassLoader.loadClass(ClassLoader.java:306) WrapperManager Error: at java.lang.ClassLoader.loadClass(ClassLoader.java:247) WrapperManager Error: ... 6 more This is due to the patch done to fix MULE-5264 which causes MuleContainer to have a direct reference to Log4j's RepositorySelector. Simply moving the reference and the call to setRepositorySelector to some other class which is not accessed via a static reference should solve the problem.
Story points: 5