Return-Path: Delivered-To: apmail-jakarta-commons-user-archive@www.apache.org Received: (qmail 84083 invoked from network); 7 Jun 2007 01:16:58 -0000 Received: from hermes.apache.org (HELO mail.apache.org) (140.211.11.2) by minotaur.apache.org with SMTP; 7 Jun 2007 01:16:58 -0000 Received: (qmail 39071 invoked by uid 500); 7 Jun 2007 01:16:57 -0000 Delivered-To: apmail-jakarta-commons-user-archive@jakarta.apache.org Received: (qmail 39019 invoked by uid 500); 7 Jun 2007 01:16:56 -0000 Mailing-List: contact commons-user-help@jakarta.apache.org; run by ezmlm Precedence: bulk List-Unsubscribe: List-Help: List-Post: List-Id: "Jakarta Commons Users List" Reply-To: "Jakarta Commons Users List" Delivered-To: mailing list commons-user@jakarta.apache.org Received: (qmail 38998 invoked by uid 99); 7 Jun 2007 01:16:56 -0000 Received: from herse.apache.org (HELO herse.apache.org) (140.211.11.133) by apache.org (qpsmtpd/0.29) with ESMTP; Wed, 06 Jun 2007 18:16:56 -0700 X-ASF-Spam-Status: No, hits=0.0 required=10.0 tests= X-Spam-Check-By: apache.org Received-SPF: neutral (herse.apache.org: local policy) Received: from [128.3.30.30] (HELO hpcrdm.lbl.gov) (128.3.30.30) by apache.org (qpsmtpd/0.29) with ESMTP; Wed, 06 Jun 2007 18:16:51 -0700 Received: from localhost (localhost [127.0.0.1]) by hpcrdm.lbl.gov (Postfix) with ESMTP id D4B15700029DA for ; Wed, 6 Jun 2007 18:16:30 -0700 (PDT) Received: from hpcrdm.lbl.gov ([127.0.0.1]) by localhost (hpcrdm [127.0.0.1]) (amavisd-new, port 10024) with ESMTP id 13216-14 for ; Wed, 6 Jun 2007 18:16:29 -0700 (PDT) Received: from [192.168.0.10] (user-1087r2v.cable.mindspring.com [64.131.236.95]) (using TLSv1 with cipher DHE-RSA-AES256-SHA (256/256 bits)) (No client certificate requested) by hpcrdm.lbl.gov (Postfix) with ESMTP id 9E14A70002992 for ; Wed, 6 Jun 2007 18:16:29 -0700 (PDT) Message-ID: <46675C6C.5080809@gridsphere.org> Date: Wed, 06 Jun 2007 21:16:28 -0400 From: Jason Novotny User-Agent: Thunderbird 1.5.0.12 (Macintosh/20070509) MIME-Version: 1.0 To: commons-user@jakarta.apache.org Subject: commons-logging and log4j headaches Content-Type: text/plain; charset=ISO-8859-1; format=flowed Content-Transfer-Encoding: 7bit X-Virus-Scanned: by amavisd-new at hpcrdm.lbl.gov X-Virus-Checked: Checked by ClamAV on apache.org Hi, I'm trying to use log4j and commons-logging in the simplest app and I get the infamous log4j:WARN No appenders could be found for logger (org.stockstats.tools.UpdateSymbols). log4j:WARN Please initialize the log4j system properly. In my classpath, I made sure I have commons-logging, log4j jars and my log4j.properties file as follows and I even turned on log4j debugging which claims that no log4j.properties file is found! [fuzzmonkey:~/StockStats] novotny% java -Dlog4j.debug -cp lib/log4j.properties:lib/commons-codec-1.3.jar:lib/commons-httpclient-3.1-rc1.jar:lib/commons-logging-1.0.4.jar:lib/log4j.properties:lib/log4j-1.2.11.jar:build/lib/stockstats-1.0.jar:. org.stockstats.tools.Main log4j: Trying to find [log4j.xml] using context classloader sun.misc.Launcher$AppClassLoader@a9c85c. log4j: Trying to find [log4j.xml] using sun.misc.Launcher$AppClassLoader@a9c85c class loader. log4j: Trying to find [log4j.xml] using ClassLoader.getSystemResource(). log4j: Trying to find [log4j.properties] using context classloader sun.misc.Launcher$AppClassLoader@a9c85c. log4j: Trying to find [log4j.properties] using sun.misc.Launcher$AppClassLoader@a9c85c class loader. log4j: Trying to find [log4j.properties] using ClassLoader.getSystemResource(). log4j: Could not find resource: [null]. log4j:WARN No appenders could be found for logger (org.stockstats.tools.UpdateSymbols). log4j:WARN Please initialize the log4j system properly. The only way I can get it to work is if I explicitly add -Dlog4configuration=file:///tmp/log4j.properties to specify the file location. I just cannot see why it can't find it in the classpath when I specified it explicitly. Thanks, Jason --------------------------------------------------------------------- To unsubscribe, e-mail: commons-user-unsubscribe@jakarta.apache.org For additional commands, e-mail: commons-user-help@jakarta.apache.org