tomcat-users mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Joe Hansen <joe.hansen...@gmail.com>
Subject Re: Log4j logging doesn't work when a web application is moved outside Tomcat/webapps directory
Date Tue, 04 May 2010 23:04:09 GMT
Chuck, please note that when commons-logging.jar is present only in
the WEB-INF/lib directory,
I get the following error:
java.lang.NoClassDefFoundError: org/apache/commons/logging/LogFactory

So, either I get
a) Invalid class loader hierarchy.  You have more than one version of
'org.apache.commons.logging.Log' visible, which is not allowed.

or

b) java.lang.NoClassDefFoundError: org/apache/commons/logging/LogFactory

I am really stumped. I even tried the following:
<Context>
     <loader delegate=“false”/>
</Context>
which the following link recommends.
http://www.richardrauser.com/index.php/2009/09/02/log4j-multiple-web-apps-common-lib-logging/
But that doesn't solve my issue.

Thanks,
Joe

On Tue, May 4, 2010 at 4:58 PM, Caldarale, Charles R
<Chuck.Caldarale@unisys.com> wrote:
>> From: Joe Hansen [mailto:joe.hansen.at@gmail.com]
>> Subject: Re: Log4j logging doesn't work when a web application is moved
>> outside Tomcat/webapps directory
>>
>> When commons-logging.jar is present in Tomcat/lib and WEB-INF/lib
>> directories, I get the following error :
>
> As you should.  As Chris said, put everything (including the spring jars) in each webapp's
WEB-INF/lib directory, and as little as possible (preferably nothing) in Tomcat's lib directory.
>
>  - Chuck
>
>
> THIS COMMUNICATION MAY CONTAIN CONFIDENTIAL AND/OR OTHERWISE PROPRIETARY MATERIAL and
is thus for use only by the intended recipient. If you received this in error, please contact
the sender and delete the e-mail and its attachments from all computers.
>
>
> ---------------------------------------------------------------------
> To unsubscribe, e-mail: users-unsubscribe@tomcat.apache.org
> For additional commands, e-mail: users-help@tomcat.apache.org
>
>

---------------------------------------------------------------------
To unsubscribe, e-mail: users-unsubscribe@tomcat.apache.org
For additional commands, e-mail: users-help@tomcat.apache.org


Mime
View raw message