ibatis-user-java mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Larry Meadors <lmead...@apache.org>
Subject Re: iBatis and Tomcat
Date Mon, 30 Jan 2006 20:54:40 GMT
Yeah, this is a bit of a mess. :-)

Using new File(".") to get your working directory should never work. :-)

Put the sqlmap files somewhere under classes like Tony suggested, then
use the resource attribute to specify the location of them.

If you want to post your config files, we can help more.

Larry


On 1/30/06, Rashmi Dave <rashmid@persistent.co.in> wrote:
>
>
> I have an application which I am deploying as a WAR onto a tomcat 5.5
> server. The application contains a daoConfig and an SQLMapConfig. The WAR
> file looks like
>
>
>
> App.war =
>
> -          config (dataaccess.config and other config files)
>
> -          screens (containing jsp pages)
>
> -          WEB-INF (contains struts-config, web.xml)
>
> o        Lib (related lib files)
>
> o        Classes
>
>
>
>
>
> When I deploy the app on the tomcat server, daoConfig is initialized in the
> ActionServlet class. For initializing this config, I have had to supply the
> exact path name to the config file rather than a relative one. This is
> because I find that File f = new File("."); sysout f. getCanonicalPath()
> prints the TOMCAT_HOME and not the App directory in TOMCAT_HOME as I would
> have expected.
>
>
>
> I also find that supplying a relative path in daoConfig.xml for SQLMapConfig
> isn't working. I tried giving the actual path (instead of the package
> hierarchy) however even that's not working. I get the following exception
>
>
>
> Caused by: com.ibatis.dao.client.DaoException: Error
> configuring SQL Map.  Cause
>
> : java.io.IOException: Could not find resource E:\ source\Ap
>
> p\WEB-INF\src\com\eobone\uam\dblayer\impl\sqlmap\config\SQLMapConfig.xml
>
>         at
> com.ibatis.dao.engine.builder.xml.XmlDaoManagerBuilder.buildDaoManage
>
> r(XmlDaoManagerBuilder.java:127)
>
>
>
> What am I doing wrong? Do I need to configure something in tomcat? Please
> help.
>
>
>
> Thanks!!!
>
> Rashmi

Mime
View raw message