Log4J is not excluded in JBoss EAP6 / AS7

In jboss-deployment-structure.xml from the application's warware file, I exclude log4j modules or so

 <?xml version="1.0" encoding="UTF-8"?> <jboss-deployment-structure xmlns="urn:jboss:deployment-structure:1.0"> <deployment> <dependencies> <module name="oracle" /> </dependencies> <exclusions> <module name="org.apache.log4j" /> <module name="org.apache.commons.logging" /> <module name="org.jboss.logging" /> <module name="org.jboss.logging.jul-to-slf4j-stub" /> <module name="org.jboss.logmanager" /> <module name="org.jboss.logmanager.log4j" /> <module name="org.slf4j" /> </exclusions> </deployment> </jboss-deployment-structure> 

This should be fine, but when deploying and running the application, I got this error:

 21:46:28,661 ERROR [stderr] (MSC service thread 1-1) log4j:ERROR A "org.apache.log4j.RollingFileAppender" object is not assignable to a "org.apache.log4j.Appender" variable. 21:46:28,662 ERROR [stderr] (MSC service thread 1-1) log4j:ERROR The class "org.apache.log4j.Appender" was loaded by 21:46:28,662 ERROR [stderr] (MSC service thread 1-1) log4j:ERROR [ModuleClassLoader for Module "org.jboss.log4j.logmanager:main" from local module loader @656de49c (roots: D:\JAVA\EAP-6.0.0.GA\jboss-eap-6.0\modules)] whereas object of type 21:46:28,662 ERROR [stderr] (MSC service thread 1-1) log4j:ERROR "org.apache.log4j.RollingFileAppender" was loaded by [ModuleClassLoader for Module "deployment.your-application.war:main" from Service Module Loader]. 21:46:28,663 ERROR [stderr] (MSC service thread 1-1) log4j:ERROR Could not instantiate appender named "ROL". 

It is really very annoying since I am just a good boy to do what he should have, but the jboss master just play with me ....

Any hints appreciated.

+1
source share

Source: https://habr.com/ru/post/1482082/


All Articles