ibatis-user-java mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Soks86 <michael.chrostow...@gmail.com>
Subject Issues with Ibatis Configuration File
Date Wed, 09 Dec 2009 21:54:52 GMT


I have created the following configuration file for my Ibatis

<?xml version="1.0" encoding="UTF-8" ?>
<!DOCTYPE configuration
  PUBLIC "-//ibatis.apache.org//DTD Config 3.0//EN"
    <environments default="development">
        <environment id="development">
            <transactionManager type="JDBC" />
            <dataSource type="POOLED">
                <property name="driver"
value="org.apache.derby.jdbc.EmbeddedDriver" />
                <property name="url"
                    <property name="username" value="${username}" />
                    name="password" value="${password}" />
        <typeAlias alias="TradableDao"
            type="com.icarus.common.strategies.dao.TradableDao" />
        <typeAlias alias="Tradable"
type="com.icarus.common.strategies.Tradable" />
        <mapper resource="src/main/resources/IbatisMaps/TradableDao.xml" />

If I remove the <typeAliases> portion (and rename my aliases inside of
TradableDao.xml) then it works just fine. However when I put the aliases in
(exactly as shown above) I get XML parsing exceptions... in particular:

### Error building SqlSession.
### The error may exist in SQL Mapper Configuration
### Cause: org.apache.ibatis.builder.BuilderException: Error creating
document instance.  Cause: org.xml.sax.SAXParseException: The content of
element type "configuration" must match

Also my IDE (Eclipse) complains that the xml file is not compliant with the
DTD file... all of this goes away if I remove my aliases.

Anyone have any idea why this might be ocuring? I'm alright for now without
aliases but as I get farther and farther into iBATIS I fear that I will need
them to stay sane.

Just to be clear this is iBATIS 3 - Beta 5 and should be the latest file
from repository.sonatype.org.

Thanks in advance for any help!

Michael Chrostowski
View this message in context: http://old.nabble.com/Issues-with-Ibatis-Configuration-File-tp26718012p26718012.html
Sent from the iBATIS - User - Java mailing list archive at Nabble.com.

To unsubscribe, e-mail: user-java-unsubscribe@ibatis.apache.org
For additional commands, e-mail: user-java-help@ibatis.apache.org

View raw message