[opencms-dev] log4j WARN in tomcat

ruben malchow r_malchow at web.de
Wed Sep 20 10:32:38 CEST 2006


hi daniel,

well, yeah, because someone configured the logger for that webapp. but
the config file is not in the scope of the initial class loader, it's
only available to the webapp classloader. this means that the
classloader that loads the server part of the tomcat (as opposed to the
various contexts) will not be able to find it. thus the warning.

you should look into that file. it probably contains a root logger, a
line like this:

log4j.rootLogger=INFO, A1

and the corresponding appender, a line like this:

log4j.appender.A1=org.apache.log4j.ConsoleAppender

those are used if no other matching entry is found.

.rm





Daniel Tsen schrieb:
> So strange, there is no such file in that directory in my Tomcat, but
> there is one in
> webapps/server/cmssrc/webapp/web-inf/classes/log4j.properties. I
> copyed it into the ${tomcat}/common/classes/ and the WARN disappeared.
>
> I haven't add the code piece ruben offered.
>
>> From: ruben malchow <r_malchow at web.de>
>> Reply-To: The OpenCms mailing list <opencms-dev at opencms.org>
>> To: The OpenCms mailing list <opencms-dev at opencms.org>
>> Subject: Re: [opencms-dev] log4j WARN in tomcat
>> Date: Wed, 20 Sep 2006 09:28:59 +0200
>>
>>
>> hi david,
>>
>> this is not a bug. it happens when there is no log4j.properties in
>> the classpath. putting this:
>>
>> # Set root logger level to DEBUG and its only appender to A1.
>> log4j.rootLogger=INFO, A1
>>
>> # A1 is set to be a ConsoleAppender.
>> log4j.appender.A1=org.apache.log4j.ConsoleAppender
>>
>>
>> in ${tomcat}/common/classes/log4j.properties will solve it. but you
>> might want to look into this a bit more and find out how to configure
>> log4j a bit more precisely. it really is quite powerful (and useful)
>>
>> .rm
>>
>>
>>
>>
>>> Hi, it happened to me too, I have read that this issue is a bug of the
>>> commons-logging.jar.
>>> Try with the 1.1 release.
>>>
>>>
>>
>>
>>> El dom, 17-09-2006 a las 00:48 +0000, �森纳 escribió:
>>>
>>>> Hi all:
>>>>
>>>> I have rebuild opencms6.2.1 in eclipse and got a war file. I
>>>> deployed it in Tomcat webapps.
>>>> and it works fine except the only problem: each time I start the
>>>> Tomcat , it gives a warn message that is "No appenders could be
>>>> found for logger <org.apache.commons.digester.Digester.sax>. Please
>>>> initialize the log4j system correctly."
>>>>
>>>> Could somebody tell me what that is?
>>>>
>>>> thanks!!
>>>> etiger99
>>>>
>>>> _________________________________________________________________
>>>> 享用世界上最大的电子邮件系统�MSN Hotmail�
>>>> http://www.hotmail.com
>>>>
>>>>
>>>> _______________________________________________
>>>> This mail is sent to you from the opencms-dev mailing list
>>>> To change your list options, or to unsubscribe from the list,
>>>> please visit
>>>> http://lists.opencms.org/mailman/listinfo/opencms-dev
>>>>
>>
>
>
>>
>> _______________________________________________
>> This mail is sent to you from the opencms-dev mailing list
>> To change your list options, or to unsubscribe from the list, please
>> visit
>> http://lists.opencms.org/mailman/listinfo/opencms-dev
>
> _________________________________________________________________
> ÓëÁª»úµÄÅóÓѽøÐн»Á÷£¬ÇëʹÓà MSN Messenger: http://messenger.msn.com/cn
>
> _______________________________________________
> This mail is sent to you from the opencms-dev mailing list
> To change your list options, or to unsubscribe from the list, please
> visit
> http://lists.opencms.org/mailman/listinfo/opencms-dev
>




More information about the opencms-dev mailing list