ibatis-user-java mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From "Priyesh Mashelkar" <priye...@mastek.com>
Subject RE: the systems cannot load the resource files
Date Tue, 27 Sep 2005 14:23:11 GMT
There is one solution.
You will need a helper class in the resource package which will read the
file using the following code:
The helper class has to exist in the same package as the xml file to be
able to find the xml file.


From: Carlos de la Flor Egiluz [mailto:c.delaflor@gmail.com] 
Sent: Tuesday, September 27, 2005 7:48 PM
To: lmeadors@apache.org
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
do you know any solution?

2005/9/27, Larry Meadors <larry.meadors@gmail.com>: 

	This line is wrong:
	Resources are absolute names based on the classpath. So, if you
	your daoConfig.xml file in a resources package, you would use
	On 9/27/05, Carlos de la Flor Egiluz <c.delaflor@gmail.com>
	> 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
	> public static DaoManager getDaoManager(){ 
	> DaoManager daoManager=null;
	> try{
	> Reader reader =
	> 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
	> 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


View raw message