Skip to content

log4j & jboss

August 3, 2007

To Use file in jboss for a given application.

Create your own scoped classloaders:

1. create jboss-web.xml
The log4j.war/WEB-INF/jboss-web.xml is:

<class-loading java2ClassLoadingCompliance=”false”>
log4j.test:loader=log4j.war <<YOUR OWN WAR FILE NAME OVER HERE…>>>


2.copy log4j.jar in your lib
3. To use log

Rename the jboss<Server>>/conf/log4j.xml to conf/jboss-log4j.xml Change the ConfigurationURL? attribute of the Log4jService in the conf/jboss-service.xml to jboss-log4j.xml
You can refer to the site:

solve the classloader issue is by reverting the JBoss configuration to the old classloading model.
Edit the file <jboss>/server/default/jbossweb-tomcat55.sar/META-INF/jboss-service.xml
Change the following lines:
<attribute name=”Java2ClassLoadingCompliance”>true</attribute>
<attribute name=”UseJBossWebLoader”>true</attribute>

(both are default set to false in jboss-4.0.2).

No comments yet

Leave a Reply

Fill in your details below or click an icon to log in: Logo

You are commenting using your account. Log Out / Change )

Twitter picture

You are commenting using your Twitter account. Log Out / Change )

Facebook photo

You are commenting using your Facebook account. Log Out / Change )

Google+ photo

You are commenting using your Google+ account. Log Out / Change )

Connecting to %s

%d bloggers like this: