ibatis-user-java mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From radha rukmani <radharukm...@yahoo.com>
Subject Re: Resource not found exception
Date Thu, 02 Mar 2006 16:10:35 GMT
Hi Tony,
  I read the previous post, it says put them in the web-inf/classes directory. But mine is
a standalone batch process application. Please let me know where should i put these.
  Thanks, Radha.

Tony Qian <daqiqian2@aol.com> wrote:

Resource doesn't work well inside jar or war file. Please see previous post on this issue
for fix.


radha rukmani wrote on 3/2/2006, 10:53 AM:   
  I have an application developed in eclipse using ibatis which runs correctly. When i tried
to jar this application(using the eclipse jar utility) and run it from a batch file, it throws
me an exception saying that my resource is not found.  This is the error message
  2006-03-02 10:46:37,237 DEBUG [main] dao.ConfigData    (ConfigData.java:243)
 - Found config/GeCABatchProcess.ini - loading configuration
java.io.IOException: Could not find resource com\comp\drimm\FERTPlateTransfer\
        at com.ibatis.common.resources.Resources.getResourceAsStream(Resources.j
        at com.ibatis.common.resources.Resources.getResourceAsStream(Resources.j
        at com.ibatis.common.resources.Resources.getResourceAsReader(Resources.j
        at com.comp.drimm.FERTPlateTransfer.AppSqlConfig.<clinit>(AppSqlConfig
  This is how i am calling the resource in the AppSqlConfig.java
     String resource="com\\comp\\drimm\\FERTPlateTransfer\\xml\\sqlMapConfig.xml";
   Reader reader=Resources.getResourceAsReader(resource);
  This works fine when i run in eclipse, could any one please let me know why it is not working
when i call it from the batch file.
  This is my .bat file
  set rootpath=.\SignedJars
  set Classpath=%Classpath%;%rootpath%\FERTPlateTransfer.jar
echo %Classpath%
  "C:\Program Files\Java\j2re1.4.2_01\bin\java" com.comp.drimm.FERTPlateTransfer.GeCABatchProcessMain


  Brings words and photos together (easily) with
PhotoMail - it's free and works with Yahoo! Mail. 

Yahoo! Mail
Bring photos to life! New PhotoMail  makes sharing a breeze. 
View raw message