You are viewing a plain text version of this content. The canonical link for it is here.
Posted to user@struts.apache.org by Ashish Kulkarni <ku...@yahoo.com> on 2005/07/01 18:11:07 UTC
[OT]question about ibatis, error when loading resource properties file
Hi
I am trying SQLMap as stand alone application,
here is my folder structure
c:
--test
|
--com
|
ashish
|
--data
|
-- SQLMapConfig.xml
-- SqlMapConfig.properties
In my SQLMapConfig.xml file i have defined resource
tag as below
<properties
resource="com/ashish/data/SqlMapConfig.properties" />
in my java program i do the following
String resource = "com/ashish/data/SQLMapConfig.xml";
Reader reader =
Resources.getResourceAsReader(resource);
sqlMap =
SqlMapClientBuilder.buildSqlMapClient(reader);
But i am getting the following error
Error parsing XPath '/sqlMapConfig/properties'.
Cause:
com.ibatis.common.exception.NestedRuntimeException:
Error loading properties. Cause: java.io.IOException:
Could not find resource
com/pfizer/maps/data/SqlMapConfig.properties
how do i solve this problem
I am using eclipse to code and run this program
Ashish
A$HI$H
__________________________________
Do you Yahoo!?
Read only the mail you want - Yahoo! Mail SpamGuard.
http://promotions.yahoo.com/new_mail
---------------------------------------------------------------------
To unsubscribe, e-mail: user-unsubscribe@struts.apache.org
For additional commands, e-mail: user-help@struts.apache.org
Re: [OT]question about ibatis, error when loading resource properties file
Posted by "M. Bitner" <mo...@gmail.com>.
What are you trying to do? I don't think that you need to explicitly
load your properties file in your Java - iBATIS takes care of all of
that internally.
On 7/1/05, Ashish Kulkarni <ku...@yahoo.com> wrote:
> Hi
> I am trying SQLMap as stand alone application,
> here is my folder structure
> c:
> --test
> |
> --com
> |
> ashish
> |
> --data
> |
> -- SQLMapConfig.xml
> -- SqlMapConfig.properties
>
> In my SQLMapConfig.xml file i have defined resource
> tag as below
> <properties
> resource="com/ashish/data/SqlMapConfig.properties" />
>
> in my java program i do the following
> String resource = "com/ashish/data/SQLMapConfig.xml";
> Reader reader =
> Resources.getResourceAsReader(resource);
> sqlMap =
> SqlMapClientBuilder.buildSqlMapClient(reader);
>
> But i am getting the following error
> Error parsing XPath '/sqlMapConfig/properties'.
> Cause:
> com.ibatis.common.exception.NestedRuntimeException:
> Error loading properties. Cause: java.io.IOException:
> Could not find resource
> com/pfizer/maps/data/SqlMapConfig.properties
>
> how do i solve this problem
> I am using eclipse to code and run this program
>
> Ashish
>
> A$HI$H
>
>
>
> __________________________________
> Do you Yahoo!?
> Read only the mail you want - Yahoo! Mail SpamGuard.
> http://promotions.yahoo.com/new_mail
>
> ---------------------------------------------------------------------
> To unsubscribe, e-mail: user-unsubscribe@struts.apache.org
> For additional commands, e-mail: user-help@struts.apache.org
>
>
---------------------------------------------------------------------
To unsubscribe, e-mail: user-unsubscribe@struts.apache.org
For additional commands, e-mail: user-help@struts.apache.org