I have a problem with disabling the logging subsystem ind JBoss 7.1.1. The reason why we want to do this is a bug in the logging subsystem that causes performance problems:
To do this I followed the descriptions in this article:
Unfortunately this seems not to work completely. I get the following error messages during server start:
08:42:13,787 ERROR [stderr] log4j:ERROR A "org.apache.log4j.xml.DOMConfigurator" object is not assignable to a "org.apache.log4j.spi.Configurator" variable.
08:42:13,790 ERROR [stderr] log4j:ERROR The class "org.apache.log4j.spi.Configurator" was loaded by
08:42:13,790 ERROR [stderr] log4j:ERROR [ModuleClassLoader for Module "deployment.myapp.ear:main" from Service Module Loader] whereas object of type
08:42:13,796 ERROR [stderr] log4j:ERROR "org.apache.log4j.xml.DOMConfigurator" was loaded by [ModuleClassLoader for Module "org.apache.log4j:main" from local module loader @d233caf (roots: /opt/jboss7/modules)].
08:42:13,796 ERROR [stderr] log4j:ERROR Could not instantiate configurator [org.apache.log4j.xml.DOMConfigurator].
08:42:13,805 ERROR [stderr] log4j:WARN No appenders could be found for logger (myapp.MyClass).
08:42:13,805 ERROR [stderr] log4j:WARN Please initialize the log4j system properly.
And after that a lot of loader constraint violations:
Caused by: java.lang.LinkageError: loader constraint violation: when resolving field "logger" the class loader (instance of org/jboss/modules/ModuleClassLoader) of the referring class, myapp/MyClass, and the class loader (instance of org/jboss/modules/ModuleClassLoader) for the field's resolved type, s/ModuleClassLoader, have different Class objects for that type
I seems to me that the logging module is still used despite the configuration changes that should prevent the using of the subsystem.
PS: I have completely removed the subsystem in the standalone.xml and added a jboss-deployment-structure.xml in the META-INF directory of my ear with the following content:
<!-- Exclusions allow you to prevent the server from automatically adding some dependencies -->
<module name="org.apache.log4j" />