You are viewing a plain text version of this content. The canonical link for it is here.
Posted to dev@commons.apache.org by Apache Wiki <wi...@apache.org> on 2005/07/05 08:19:37 UTC

[Jakarta-commons Wiki] Update of "Logging/FrequentlyAskedQuestions" by BrianStansberry

Dear Wiki user,

You have subscribed to a wiki page or wiki category on "Jakarta-commons Wiki" for change notification.

The following page has been changed by BrianStansberry:
http://wiki.apache.org/jakarta-commons/Logging/FrequentlyAskedQuestions

The comment on the change is:
Add discussion of JCL in JBoss 4.0.2

------------------------------------------------------------------------------
  (With thanks to David Karlsen for this information)
  
  For more information see http://mail-archives.apache.org/eyebrowse/ReadMsg?listName=commons-user@jakarta.apache.org&msgNo=5737
+ 
+ == How Can I Use Commons-Logging In JBoss 4.0.2? ==
+ 
+ {{{
+ I'm using JBoss 4.0.2. Commons-Logging doesn't seem to recognize the commons-logging.properties file in my WAR. Help!
+ }}}
+ 
+ Some JBoss services use commons-logging, so it's on the server classpath. Copies of commons-logging loaded from a webapp's WEB-INF/lib folder were causing type conflicts with the version on the server classpath, so beginning with version 4.0.2 JBoss disables loading commons-logging from a WAR.  This has the side effect of preventing commons-logging from accessing logging libraries that are placed in the WEB-INF/lib folder.
+ 
+ Fortunately, there is an easy fix:
+ 
+ {{{
+ Place your logging library jar (e.g. avalon-framework.jar) in JBoss' server/.../lib folder (where "..." is "all" or "default" or a custom configuration you use).
+ }}}
+ 
+ This places your logging library on the server classpath, where the copy of commons-logging used by JBoss can see it.  The downside to this is your logging library is no longer hot-deployable, so upgrading it will require a server restart.
  
  
  == How can I close loggers when using Commons-Logging? ==

---------------------------------------------------------------------
To unsubscribe, e-mail: commons-dev-unsubscribe@jakarta.apache.org
For additional commands, e-mail: commons-dev-help@jakarta.apache.org