Return-Path: Delivered-To: apmail-jakarta-tomcat-user-archive@jakarta.apache.org Received: (qmail 38944 invoked by uid 500); 7 May 2001 01:29:36 -0000 Mailing-List: contact tomcat-user-help@jakarta.apache.org; run by ezmlm Precedence: bulk Reply-To: tomcat-user@jakarta.apache.org list-help: list-unsubscribe: list-post: Delivered-To: mailing list tomcat-user@jakarta.apache.org Received: (qmail 38935 invoked from network); 7 May 2001 01:29:36 -0000 Received: from web12707.mail.yahoo.com (216.136.173.244) by h31.sny.collab.net with SMTP; 7 May 2001 01:29:36 -0000 Message-ID: <20010507012942.10765.qmail@web12707.mail.yahoo.com> Received: from [203.42.214.98] by web12707.mail.yahoo.com; Mon, 07 May 2001 11:29:42 EST Date: Mon, 7 May 2001 11:29:42 +1000 (EST) From: =?iso-8859-1?q?teh=20j?= Subject: Re: log4j and tomcat To: tomcat-user@jakarta.apache.org Cc: agrawal@lucent.com In-Reply-To: <3AB7F35A.5A2A70F5@lucent.com> MIME-Version: 1.0 Content-Type: text/plain; charset=iso-8859-1 Content-Transfer-Encoding: 8bit X-Spam-Rating: h31.sny.collab.net 1.6.2 0/1000/N Hello there! I was wondering if anybody could help with a tomcat and log4j problem? I have placed my log4j.properties file into my WEB-INF/classes direcotry but it seems that Tomcat is not picking it up! This is the line in my code in my .java file taht tells me what .properties file to look for PropertyConfigurator.configure("log4j.properties"); If I put in the full path to the .properties file, it still does not seem to find it! It tells me the following the error message: (but the application in the browser works fine log4j:ERROR Could not read configuration file [log4j.properties]. java.io.FileNotFoundException: log4j.properties (No such file or directory) at java.io.FileInputStream.open(Native Method) at java.io.FileInputStream.(FileInputStream.java:64) at org.apache.log4j.PropertyConfigurator.doConfigure(PropertyConfigurator.java:289) at org.apache.log4j.PropertyConfigurator.configure(PropertyConfigurator.java:308) at security.security.(security.java:32) at java.lang.Class.newInstance0(Native Method) at java.lang.Class.newInstance(Class.java:237) at java.beans.Beans.instantiate(Beans.java:207) at java.beans.Beans.instantiate(Beans.java:51) at jason.security._0002fjason_0002fsecurity_0002flogin_0005fhandler_0002ejsplogin_0005fhandler_jsp_0._jspService(_0002fjason_0002fsecurity_0002flogin_0005fhandler_0002ejsplogin_0005fhandler_jsp_0.java:68) at org.apache.jasper.runtime.HttpJspBase.service(HttpJspBase.java:119) at javax.servlet.http.HttpServlet.service(HttpServlet.java:853) at org.apache.jasper.servlet.JspServlet$JspServletWrapper.service(JspServlet.java:177) at org.apache.jasper.servlet.JspServlet.serviceJspFile(JspServlet.java:318) at org.apache.jasper.servlet.JspServlet.service(JspServlet.java:391) at javax.servlet.http.HttpServlet.service(HttpServlet.java:853) at org.apache.tomcat.core.ServletWrapper.doService(ServletWrapper.java:404) at org.apache.tomcat.core.Handler.service(Handler.java:286) at org.apache.tomcat.core.ServletWrapper.service(ServletWrapper.java:372) at org.apache.tomcat.core.ContextManager.internalService(ContextManager.java:797) at org.apache.tomcat.core.ContextManager.service(ContextManager.java:743) at org.apache.tomcat.service.http.HttpConnectionHandler.processConnection(HttpConnectionHandler.java:210) at org.apache.tomcat.service.TcpWorkerThread.runIt(PoolTcpEndpoint.java:416) at org.apache.tomcat.util.ThreadPool$ControlRunnable.run(ThreadPool.java:498) at java.lang.Thread.run(Thread.java:484) log4j:ERROR Ignoring configuration file [log4j.properties]. any help is appreciated! Jason --- Anuj Agrawal wrote: > Yes it can. > > You might want to consider creating a > log4j.properties file to hold your log4j > configuration. Have that file in your > WEB-INF/classes dir and tomcat would > automatically pick it up. > > HTH. > Anuj. > > teh j wrote: > > > I have recently started playing with log4j. Does > > anybody know if it can be used with Tomcat? > > I have a a JSP app running on tomcat that has > several > > beans and classes and was wondering if I could use > > log4j as a logging tool > _____________________________________________________________________________ http://store.yahoo.com.au - Yahoo! Store - It's time you had your business online!