Return-Path: Delivered-To: apmail-ws-axis-dev-archive@www.apache.org Received: (qmail 27414 invoked from network); 6 Dec 2006 21:58:46 -0000 Received: from hermes.apache.org (HELO mail.apache.org) (140.211.11.2) by minotaur.apache.org with SMTP; 6 Dec 2006 21:58:46 -0000 Received: (qmail 71949 invoked by uid 500); 6 Dec 2006 21:58:50 -0000 Delivered-To: apmail-ws-axis-dev-archive@ws.apache.org Received: (qmail 71904 invoked by uid 500); 6 Dec 2006 21:58:50 -0000 Mailing-List: contact axis-dev-help@ws.apache.org; run by ezmlm Precedence: bulk Reply-To: axis-dev@ws.apache.org list-help: list-unsubscribe: List-Post: List-Id: Delivered-To: mailing list axis-dev@ws.apache.org Received: (qmail 71885 invoked by uid 99); 6 Dec 2006 21:58:50 -0000 Received: from herse.apache.org (HELO herse.apache.org) (140.211.11.133) by apache.org (qpsmtpd/0.29) with ESMTP; Wed, 06 Dec 2006 13:58:50 -0800 X-ASF-Spam-Status: No, hits=0.8 required=10.0 tests=INFO_TLD X-Spam-Check-By: apache.org Received: from [140.211.11.4] (HELO brutus.apache.org) (140.211.11.4) by apache.org (qpsmtpd/0.29) with ESMTP; Wed, 06 Dec 2006 13:58:41 -0800 Received: from brutus (localhost [127.0.0.1]) by brutus.apache.org (Postfix) with ESMTP id F36087142E4 for ; Wed, 6 Dec 2006 13:58:20 -0800 (PST) Message-ID: <17529743.1165442300973.JavaMail.jira@brutus> Date: Wed, 6 Dec 2006 13:58:20 -0800 (PST) From: "George Stanchev (JIRA)" To: axis-dev@ws.apache.org Subject: [jira] Created: (AXIS2-1839) FileSystemConfigurator doesn't throw AxisFault when failed to find a user supplied repo or axis2xml location MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: 7bit X-Virus-Checked: Checked by ClamAV on apache.org FileSystemConfigurator doesn't throw AxisFault when failed to find a user supplied repo or axis2xml location ------------------------------------------------------------------------------------------------------------ Key: AXIS2-1839 URL: http://issues.apache.org/jira/browse/AXIS2-1839 Project: Apache Axis 2.0 (Axis2) Issue Type: Bug Components: kernel Affects Versions: 1.1, 1.2, nightly Environment: any Reporter: George Stanchev org.apache.axis2.deployment.FileSystemConfigurator.FileSystemConfigurator(String, String) has a bug in it right there where the repoLocation is determined if it is valid or not (lines 57-69): try { if (repoLocation != null) { File repo = new File(repoLocation); if (repo.exists()) { // ok, save it if so this.repoLocation = repo.getAbsolutePath(); } } } catch (Exception e) { log.info("Couldn't find repository location '" + repoLocation + "'"); this.repoLocation = null; } So if the repo path is invalid, the repo.exists() will be false and the block will complete gracefully without logging the condition (that repo location does not exist). The java.io.File.File(String) constructor will throw an exception only if the argument is null, which in our case obviously it is not. So that catch() block is a bit pointless unless it is intended for the SecurityException possibly thrown by File.getAbsolutePath() but then the message is wrong. FileSystemConfigurator is used by createConfigurationContextFromFileSystem method which can throw AxisFaults. I think FileSystemConfigurator should throw an exception if the repoLocation or axis2xlm are not found on the system instead of merely logging it and falling through the default configuration load. Otherwise the problem will snowball later on when the default axis2.xml is loaded, modules fail to engage etc and make the user wonder what is going on, like it was in my case. At the very least, besides fixing this problem, log it with error() severity. info() is too low for supplied-but-not-found configuration loading. -- This message is automatically generated by JIRA. - If you think it was sent incorrectly contact one of the administrators: http://issues.apache.org/jira/secure/Administrators.jspa - For more information on JIRA, see: http://www.atlassian.com/software/jira --------------------------------------------------------------------- To unsubscribe, e-mail: axis-dev-unsubscribe@ws.apache.org For additional commands, e-mail: axis-dev-help@ws.apache.org