axis-java-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From "Deepal Jayasinghe (JIRA)" <j...@apache.org>
Subject [jira] Assigned: (AXIS2-1839) FileSystemConfigurator doesn't throw AxisFault when failed to find a user supplied repo or axis2xml location
Date Wed, 06 Dec 2006 22:24:21 GMT
     [ http://issues.apache.org/jira/browse/AXIS2-1839?page=all ]

Deepal Jayasinghe reassigned AXIS2-1839:
----------------------------------------

    Assignee: Deepal Jayasinghe

> 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, nightly, 1.2
>         Environment: any
>            Reporter: George Stanchev
>         Assigned To: Deepal Jayasinghe
>
> 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


Mime
View raw message