I think you are correct, that should read:

props = Resources.getUrlAsProperties(url); 

Larry

On Sat, 12 Feb 2005 19:02:18 +0100 (CET), Thijs van Nieuwkerk (JIRA)
<[email protected]> wrote:
> Problem using a "url" based properties file
> -------------------------------------------
> 
>          Key: IBATIS-74
>          URL: http://issues.apache.org/jira/browse/IBATIS-74
>      Project: iBatis for Java
>         Type: Bug
>   Components: SQL Maps
>     Versions: 2.0.8, 2.0.9
>  Environment: Developing on a Window NT desktop with WSAD 5.1. Using a 1.3 
> jdk (target is websphere 4.0.7).
>     Reporter: Thijs van Nieuwkerk
> 
> Instead of using a resource properties file I want to use a url based
> properties file. I always get a MalFormedURLException when I use the url
> properties files. I tested my url's in a simple java program and they are
> fine.
> 
> I think that there probably is a bug in the SqlMapConfigParser class. When
> using a url for retrieving a properties file I get a
> null pointer exception (in debug session). I looked into the ibatis code
> and found following bug:
> 
>          if (resource != null) {
>             vars.errorCtx.setResource(resource);
>             props = Resources.getResourceAsProperties(resource);
>           } else if (url != null) {
>             vars.errorCtx.setResource(url);
> =>>     props = Resources.getUrlAsProperties(resource);    <<==
> 
> This can't be OK. resource is null when the code for the url is executed.
> Maybe a copy paste error!
> 
> I used both iBatis 2.0.8 and 2.0.9. In both version the same error occurrs.
> 
> regards
> Thijs van Nieuwkerk
> 
> --
> 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
> -
> If you want more information on JIRA, or have a bug to report see:
>    http://www.atlassian.com/software/jira
> 
>

Reply via email to