-
1. Re: How to set up Log4J.properties in JBoss 5.1.0?
jaikiran Apr 20, 2010 8:57 AM (in response to dejanmr)The log4j config file is expected to be in the classpath of the application. I guess the root of the .ear used to be in the classpath for 4.2.x.
For AS-5, try moving that file to .ear/lib folder (if you don't have an .ear/lib folder, then create one). See if that works.
-
2. Re: How to set up Log4J.properties in JBoss 5.1.0?
dejanmr Apr 20, 2010 9:44 AM (in response to jaikiran)Nothing changed when I have moved file to lib.
I guess almost all enterprise applications have log4j set up some how. Anyone got it working? Is my problem just file placement or could it be something else, ie. initialize/configure Log4j from my code?
Can someone confirm it is enough to put file on classpath, or there is more to it?
-
3. Re: How to set up Log4J.properties in JBoss 5.1.0?
vizvin May 10, 2010 1:09 AM (in response to dejanmr)I'm not sure if this response comes in late to you. But you can follow the steps to acheive that
1. Package ur log4j.properties inside the EAR so that it is available in the Classpath e.g Root or EAR/libs. Additionally you can also place it inside App-inf/libs but just that in the latter case make sure to have this
<library-directory>APP-INF/lib</library-directory>
in your jboss-app.xml.
2. Over-ride the class-loading(isolation). Like this
<loader-repository>
com.blahblah:archive=blahblah.ear
<loader-repository-config>
java2ParentDelegation=false
</loader-repository-config>
</loader-repository>
3. Package the log4j.jar(ur choice) inside the EAR somewhere @places mentioned in pt.1
4. You are done