bufff! i dont know how to make it.
i never have been made one help class.
can you help me?
is one normal class? what returns this class.
can you help me please?
thanks

 
2005/9/27, Priyesh Mashelkar <[EMAIL PROTECTED]>:
There is one solution.
You will need a helper class in the resource package which will read the file using the following code:
this.getClass().getResource("daoConfig.xml")
The helper class has to exist in the same package as the xml file to be able to find the xml file.
 
Regards,
Priyesh
 


From: Carlos de la Flor Egiluz [mailto:[EMAIL PROTECTED]]
Sent: Tuesday, September 27, 2005 7:48 PM
To: [EMAIL PROTECTED]
Cc: user-java@ibatis.apache.org
Subject: Re: the systems cannot load the resource files

 
But i have one great problem.
i am using WSAD for develop the application.
i must to build one ear file for deploy it into the WAS.
i dont know the absolute path into the server for oput it into my xml files.
 
do you know any solution?

 
2005/9/27, Larry Meadors <[EMAIL PROTECTED]>:
This line is wrong:

Resources.getResourceAsReader("../../resources/daoConfig.xml");

Resources are absolute names based on the classpath. So, if you put
your daoConfig.xml file in a resources package, you would use this
instead:

Resources.getResourceAsReader("/resources/daoConfig.xml");

Larry


On 9/27/05, Carlos de la Flor Egiluz <[EMAIL PROTECTED]> wrote:
>
>
> Hello i am new using ibatis.
> I am working, making, one j2ee applicaction.
> the packeages are:
> com.domain.resources
> com.domain.ibatis.sqlmapdao
>
> in the sqlmapdao package i have one class, DaoConfig.java with this.
>
> public static DaoManager getDaoManager(){
> DaoManager daoManager=null;
> try{
> Reader reader =
> Resources.getResourceAsReader("../../resources/daoConfig.xml");
> daoManager = DaoManagerBuilder.buildDaoManager (reader);
> }
> ....
>
> in the resources package i have:
> the xqlmapconfig, iwth the configuration to the db and with the includes for
> the sql xml files.
>
> i cannot deploy my application into one was server.
> the server log says me the the resource file has been begin with one /
>
> how must i to load the resource files?
> this is correct?
> Reader reader =
> Resources.getResourceAsReader ("../../resources/daoConfig.xml");
>
> my application goes into one ear file for deploy into other platform, i dont
> know the absolute path to the conf files, resource files.
> and the properties files go into the ear. afte the deploy i cannot change.
>
> how can i solve this problem?
> thanks
>





Reply via email to