Is it possible to put myBatis (iBatis) xml mappers outside the project?
Posted
by kospiotr
on Stack Overflow
See other posts from Stack Overflow
or by kospiotr
Published on 2010-06-08T17:04:44Z
Indexed on
2010/06/08
17:12 UTC
Read the original article
Hit count: 297
ibatis
According to the user guide i am able to use file path instead of resource:
// Using classpath relative resources
<mappers>
<mapper resource="org/mybatis/builder/AuthorMapper.xml"/>
</mappers>
// Using url fully qualified paths
<mappers>
<mapper url="file:///var/sqlmaps/AuthorMapper.xml"/>
</mappers>
in my project I'm trying to put my mapper xml "outside" the project and i'm doing this:
<mapper url="file://D:/Mappers/ComponentMapper1.xml" />
The output of my log4j console:
Error building SqlSession.
The error may exist in file://D:/Mappers/ComponentMapper1.xml
Cause: org.apache.ibatis.builder.BuilderException: Error parsing
SQL Mapper Configuration. Cause: java.net.UnknownHostException: D
Is it bug or it's me doing something wrong?
© Stack Overflow or respective owner