Jboss eap 6.2 can not load log4j configuration file
j2ee6 Jun 2, 2014 11:40 AMHi,
I try to configure the log configuration. I am using SLF4 with an log4j implementation.
I exclude the corresponding server jar with the jboss-deployement-structure.xml. The jar are include in my ear/lib
The log4j.xml file is in the ear/META-INF.
The ear is correctly deployed.
I have set the option -Dorg.jboss.as.logging.per-deployment=false
The log4j.xml is not find. I try several place without any success.
17:32:23,288 INFO [stdout] (http-localhost/127.0.0.1:8080-3) log4j: Trying to find [log4j.xml] using context classloader ModuleClassLoader for Module "myear.ear.mywar.war:main" from Service Module Loader.
17:35:58,600 INFO [stdout] (http-localhost/127.0.0.1:8080-1) log4j: Could not find resource: [null].
Here is my config :
->Ear
-> META-INF-> MANIFEST.MF
-> log4j.xml
-> jboss-deployment-structure.xml
-> EJB1.jar
-> EJB2.jar
-> mywar.war
-> lib
My jboss-deployement-structure.xml :
jboss-deployment-structure xmlns="urn:jboss:deployment-structure:1.2">
<!-- for top deployment, e.g. ear -->
<deployment>
<!-- Exclusions allow you to prevent the server from automatically adding some dependencies -->
<exclusions>
<module name="org.apache.log4j" />
<module name="org.slf4j" />
<module name="org.slf4j.impl" />
<module name="org.slf4j.jcl-over-slf4j" />
<module name="org.slf4j.ext" />
</exclusions>
</deployment>
<!-- for sub deployment, e.g. war. sub-deployment is required when ear contains one or more wars -->
<sub-deployment name="xx-ejba.jar">
<exclusions>
<module name="org.apache.log4j" />
</exclusions>
</sub-deployment>
<sub-deployment name="xx-ejb.jar">
<exclusions>
<module name="org.apache.log4j" />
<module name="org.slf4j" />
<module name="org.slf4j.impl" />
<module name="org.slf4j.jcl-over-slf4j" />
<module name="org.slf4j.ext" />
</exclusions>
</sub-deployment>
<sub-deployment name="xx.rar">
<exclusions>
<module name="org.apache.log4j" />
<module name="org.slf4j" />
<module name="org.slf4j.impl" />
<module name="org.slf4j.jcl-over-slf4j" />
<module name="org.slf4j.ext" />
</exclusions>
</sub-deployment>
</jboss-deployment-structure>
Thanks for your help