[prev in list] [next in list] [prev in thread] [next in thread] 

List:       tomcat-user
Subject:    FAQ ? log4j:ERROR setFile(null,true)
From:       Harald Henkel <h.henkel () gs-automation ! de>
Date:       2004-06-30 10:28:46
Message-ID: 40E295DE.72A3675A () gs-automation ! de
[Download RAW message or body]

Hello all.

I guess this is a FAQ.

When I start Tomcat, I receive the error message (see below).
I serached a bit (with Google) and found out, that probably this is
caused, by not setting the log destination directory (correctly).
Yet, some log files ARE created.
But I didn't find out, how this is done.
Anybody got a link to the documentation for this ? Or even better, or
even better a simple example.

The log4j errors do come 4 times, I guess for every <context>.

The initializing messages in the other log files created (all in the
$CATALINE_HOME/logs dir) DO have a correctly looking timestamp...

The files have names like click_log.2004-06-30.txt (not "click.log") and
contain lines like 

2004-06-30 11:30:48 WebappLoader[/Click]: Deploying class repositories
to work directory
/usr/jakarta-tomcat-4.1.30/work/Standalone/localhost/Click

BTW, could this be a reason for Tomcat/Java creating lots of
threads/processes (on Linux), because Log4j tries to log something but
cannot and thus hangs ?

Any help appreciated,
with kind regards,
Harald Henkel

Catalina.out:
***************************************************************************************
30.06.2004 11:30:47 org.apache.coyote.http11.Http11Protocol init
INFO: Initializing Coyote HTTP/1.1 on port 80
Starting service Tomcat-Standalone
Apache Tomcat/4.1.30
30.06.2004 11:30:49 org.apache.struts.util.PropertyMessageResources
<init>
INFO: Initializing, config='org.apache.struts.util.LocalStrings',
returnNull=true
30.06.2004 11:30:49 org.apache.struts.util.PropertyMessageResources
<init>
INFO: Initializing, config='org.apache.struts.action.ActionResources',
returnNull=true
30.06.2004 11:30:49 org.apache.struts.util.PropertyMessageResources
<init>
INFO: Initializing,
config='org.apache.webapp.admin.ApplicationResources', returnNull=true
30.06.2004 11:30:51 org.apache.coyote.http11.Http11Protocol start
INFO: Starting Coyote HTTP/1.1 on port 80
30.06.2004 11:30:51 org.apache.jk.common.ChannelSocket init
INFO: JK2: ajp13 listening on /0.0.0.0:8009
30.06.2004 11:30:51 org.apache.jk.server.JkMain start
INFO: Jk running ID=0 time=1/63 
config=/usr/jakarta-tomcat-4.1.30/conf/jk2.properties

log4j:ERROR setFile(null,true) call failed.
java.io.FileNotFoundException: logs/click.log (No such file or
directory)
	at java.io.FileOutputStream.openAppend(Native Method)
	at java.io.FileOutputStream.<init>(FileOutputStream.java:177)
	at java.io.FileOutputStream.<init>(FileOutputStream.java:102)
	at org.apache.log4j.FileAppender.setFile(FileAppender.java:272)
[...]
	at
org.apache.tomcat.util.net.TcpWorkerThread.runIt(PoolTcpEndpoint.java:584)
	at
org.apache.tomcat.util.threads.ThreadPool$ControlRunnable.run(ThreadPool.java:683)
	at java.lang.Thread.run(Thread.java:534)
log4j:ERROR Either Filename or DatePattern options are not set for
[file].


-- 
Harald Henkel

GS automation GmbH
Winterstraße 2
82223 Eichenau
Germany
Tel:    + 49-8141-35 731-37
Fax:    + 49-8141-35 731-38
Mobile: + 49-178-7829126
e-mail: H.Henkel@GS-automation.DE
Web:    www.GS-automation.DE

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


[prev in list] [next in list] [prev in thread] [next in thread] 

Configure | About | News | Add a list | Sponsored by KoreLogic