ibatis-user-java mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From "Javier Leyba" <xle...@gmail.com>
Subject Resource load problem
Date Tue, 29 Aug 2006 11:09:25 GMT
Hi

I' ll use iBatis in my JBoss application and want to keep all
configuration files in my conf directory so I did:

static {
		try {
			String resource = System.getProperty("jboss.server.home.dir")
								+ "/conf/SqlMapConfig.xml";
			Reader reader = Resources.getResourceAsReader(resource);
			sqlMap = SqlMapClientBuilder.buildSqlMapClient(reader);
		} catch (Exception e) {
			e.printStackTrace();
			throw new RuntimeException(
					"Error initializing MyAppSqlConfig class. Cause: " + e);
		}


But when I call the application I get the error message:

12:52:06,764 INFO  [STDOUT] java.io.IOException: Could not find
resource /home/jcm/jboss-4.0.3SP1/server/javier01/conf/SqlMapConfig.xml

but if open a telent console and do

vi /home/jcm/jboss-4.0.3SP1/server/javier01/conf/SqlMapConfig.xml from
elsewhere I can open the file without problems.

Any idea ?

Thanks in advance

J


-- 
Javier Leyba
Barcelona - Spain
http://blog.leyba.com.ar

Mime
View raw message