Return-Path: Delivered-To: apmail-jakarta-log4j-user-archive@apache.org Received: (qmail 62904 invoked from network); 1 Aug 2003 17:35:56 -0000 Received: from exchange.sun.com (192.18.33.10) by daedalus.apache.org with SMTP; 1 Aug 2003 17:35:56 -0000 Received: (qmail 15744 invoked by uid 97); 1 Aug 2003 17:38:35 -0000 Delivered-To: qmlist-jakarta-archive-log4j-user@nagoya.betaversion.org Received: (qmail 15737 invoked from network); 1 Aug 2003 17:38:35 -0000 Received: from daedalus.apache.org (HELO apache.org) (208.185.179.12) by nagoya.betaversion.org with SMTP; 1 Aug 2003 17:38:35 -0000 Received: (qmail 62149 invoked by uid 500); 1 Aug 2003 17:35:47 -0000 Mailing-List: contact log4j-user-help@jakarta.apache.org; run by ezmlm Precedence: bulk List-Unsubscribe: List-Subscribe: List-Help: List-Post: List-Id: "Log4J Users List" Reply-To: "Log4J Users List" Delivered-To: mailing list log4j-user@jakarta.apache.org Received: (qmail 62136 invoked from network); 1 Aug 2003 17:35:47 -0000 Received: from mxgateway.vignette.com (HELO vscan4.vignette.com) (12.110.208.252) by daedalus.apache.org with SMTP; 1 Aug 2003 17:35:47 -0000 Received: from vscan4.vignette.com ([10.20.16.161]) by vscan4.vignette.com with Microsoft SMTPSVC(5.0.2195.5329); Fri, 1 Aug 2003 12:35:51 -0500 Received: FROM omail1.vignette.com BY vscan4.vignette.com ; Fri Aug 01 12:35:50 2003 -0500 Received: from IMC2.vignette.com (imc2.vignette.com [10.20.16.155]) by omail1.vignette.com (8.12.9/8.11.2) with ESMTP id h71HZnrb009930 for ; Fri, 1 Aug 2003 12:35:49 -0500 (CDT) Received: by imc2.vignette.com with Internet Mail Service (5.5.2656.59) id ; Fri, 1 Aug 2003 12:35:50 -0500 Message-ID: From: "Ebersole, Steven" To: "'Log4J Users List'" Subject: RE: Uncaught exception in PropertyConfigurator - log4j1.2.8 ? Date: Fri, 1 Aug 2003 12:35:43 -0500 MIME-Version: 1.0 X-Mailer: Internet Mail Service (5.5.2656.59) Content-Type: text/plain; charset="iso-8859-1" X-OriginalArrivalTime: 01 Aug 2003 17:35:51.0055 (UTC) FILETIME=[59EA19F0:01C35853] X-Spam-Rating: daedalus.apache.org 1.6.2 0/1000/N X-Spam-Rating: daedalus.apache.org 1.6.2 0/1000/N Try setting the System property "log4j.debug" to true; typically this is done using -Dlog4j.debug=true. The other option would be to slightly alter the main as follows: public static void main( String[] args ) { System.setProperty( "log4j.debug", "true" ); try { PropertyConfigurator.configure( args[0] ); } catch( Exception e ) { BasicConfigurator.configure(); } System.out.println("After catch block never reached!"); } Log4j will then output all kinds of helpful information as it tries to configure itself... Also, what do you mean by "crash"? If your getting an exception, how about cutting and pasting the stack trace here so we can see whats happening. -----Original Message----- From: Desai, Chetan P [ITS] [mailto:Chetan.P.Desai@mail.sprint.com] Sent: Thursday, July 31, 2003 4:35 PM To: log4j-user@jakarta.apache.org Subject: Uncaught exception in PropertyConfigurator - log4j1.2.8 ? I tried searching the mailing list but did not find a solution to the following issue I face which causes my code to crash: a) If the filename specified in args[0] does not exist b) If there are syntax errors in the contents of the Configuration files specified by args[0] Any help/pointers will be appreciated. ========================================== public static void main(String[] args) { try { PropertyConfigurator.configure(args[0]); }catch(Exception e) { BasicConfigurator.configure(); } System.out.println("After catch block never reached!"); } ========================================== -Chetan desai. --------------------------------------------------------------------- To unsubscribe, e-mail: log4j-user-unsubscribe@jakarta.apache.org For additional commands, e-mail: log4j-user-help@jakarta.apache.org