ibatis-user-java mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Larry Meadors <larry.mead...@gmail.com>
Subject Re: Puzzled about finding a resource
Date Fri, 26 Aug 2005 12:27:34 GMT
I have had similar issues in a slightly different context. One thing
I'd try is to add a leading "/" to the resource name. We found that in
tomcat 4, different configurations required that the "/" be there
sometimes, and NOT be there other times.

Give it a shot, you won't make it work less. ;-)

Larry


On 8/25/05, Alan Chandler <alan@chandlerfamily.org.uk> wrote:
> I am starting to debug my very first attempt at using iBATIS.  Unfortunately,
> I have fallen over at the very first hurdle.
> 
> Using Eclipse, running tomcat4.1 within it...
> 
> I am getting
> 
> java.io.IOException: Could not find resource
> uk/org/chandlerfamily/tapestry/sqlmap/famtree/SqlMapConfig.xml
>         at
> com.ibatis.common.resources.Resources.getResourceAsStream(Resources.java:101)
> 
> trying to access my config file
> 
> The offending piece in my code is  (baring my mail wordwrapping)
> 
>               String resource =
> "uk/org/chandlerfamily/tapestry/sqlmap/famtree/SqlMapConfig.xml";
> 
> 
> The file SqlMapConfig.xml is stored in
> 
> <webapp-context>/WEB-INF/classes/uk/org/chandlerfamily/tapestry/sqlmap/famtree/SqlMapConfig.xml
> 
> I can't see what's wrong here.
> --
> Alan Chandler
> http://www.chandlerfamily.org.uk
>

Mime
View raw message