[jboss-user] [Installation, Configuration & DEPLOYMENT] - Log4j woes, please help

moksha2007 do-not-reply at jboss.com
Wed Jul 9 06:52:51 EDT 2008


Hi,

I've wrapped a complex WAR (using its own log4j.xml config) inside an EAR and deployed that in Jboss (4.2.2 Ga) and encounter the following:

- Logging fails: ERROR: invalid console appender config detected, console stream is looping
- The application IS deployed and runs as expected, just that I couldn't know other than simply testing the URL.

In order to circumvent this I followed some guidelines, but I fear that they are either not complete, or totally wrong. With this, I need help. What I did so far is:

- Remove the log4j.jar and commons-logging.jar from the WAR-lib, to avoid possible class loading conflicts.
- Configured the run script (in Jboss/bin) to deal with JVM optional parameters: JAVA_OPTS="-Dorg.jboss.logging.Log4jService.catchSystemOut=false $JAVA_OPTS"
- Configured the application (jboss-web.xml) as follow:


  |     <class-loading java2ClassLoadingCompliance='false'>
  |         <loader-repository>
  |             cis-web-1.0.0.war:loader=cis-web-1.0.0.war
  |             <loader-repository-config>java2ParentDelegation=false</loader-repository-config>
  |         </loader-repository>
  |     </class-loading>
  | 

However, before the logging fails completely, I do read:
2008-07-09 10:55:28,747 WARN  [org.jboss.deployment.DeploymentInfo] Only the root deployment can set the loader repository, ignoring config=LoaderRepositoryConfig(repositoryName: cis-web-1.0.0.war:loader=cis-web-1.0.0.war, repositoryClassName: org.jboss.mx.loading.HeirarchicalLoaderRepository3, configParserClassName: org.jboss.mx.loading.HeirarchicalLoaderRepository3ConfigParser, repositoryConfig: java2ParentDelegation=false)

- I've editted the log4j.xml inside the WAR, so that the consoleAppender is not defined at all.

Now, I've read that Jboss uses its own log4j.xml and basically all other appenders are rerouted to that, is that correct? Btw, wouldn't that comprimise performance as multiple apps are using the same root? Anyways, I am in the dark here of how it works exactly, and how to deal with the issue here at hand.

Thanks in advance,
Mike Ahlers

View the original post : http://www.jboss.com/index.html?module=bb&op=viewtopic&p=4163255#4163255

Reply to the post : http://www.jboss.com/index.html?module=bb&op=posting&mode=reply&p=4163255



More information about the jboss-user mailing list