You are viewing a plain text version of this content. The canonical link for it is here.
Posted to user-java@ibatis.apache.org by "Leucht, Axel" <Ax...@prodv.de> on 2009/08/18 11:15:46 UTC
ibatis-3: first try, first problem
Hi,
I'm currently trying to do my first steps with ibatis-3 (beta-2) and can't execute a very simple select statement. I can do everything fine with ibatis-2 but fail miserably with ibatis-3. Seems to me that the parsing of my config is failing. Here is my SQLConfiguration.xml file
<?xml version="1.0" encoding="UTF-8" ?>
<!DOCTYPE configuration
PUBLIC "-//ibatis.apache.org//DTD Config 3.0//EN"
"http://ibatis.apache.org/dtd/ibatis-3-config.dtd">
<configuration>
<properties resource="database/ora9207.properties " />
<environments default="development">
<environment id="development">
<transactionManager type="JDBC"/>
<dataSource type="POOLED">
<property name="driver" value="${driver}"/>
<property name="url" value="${url}"/>
<property name="username" value="${username}"/>
<property name="password" value="${password}"/>
</dataSource>
</environment>
</environments>
<mappers>
<mapper resource="database/maps/Student.xml"/>
</mappers>
</configuration>
And my Student.xml:
<?xml version="1.0" encoding="UTF-8" ?>
<!DOCTYPE sqlMap
PUBLIC "-//ibatis.apache.org//DTD SQL Map 2.0//EN"
"http://ibatis.apache.org/dtd/ibatis-mapper-3.dtd">
<sqlMap namespace="Student">
<select id="getAllStudenten" resultType="entities.Student">
select name,descr as description from student s
</select>
</sqlMap>
It seems that ibatis-3 is trying to read the dtd via internet but fails to do so, though the proper ibatis-jar file is on my classpath.
I'd appreciate any help.
/Axel
---------------------------------------------------------------------
To unsubscribe, e-mail: user-java-unsubscribe@ibatis.apache.org
For additional commands, e-mail: user-java-help@ibatis.apache.org
Re: ibatis-3: first try, first problem
Posted by Clinton Begin <cl...@gmail.com>.
Can you post the exception as well?
On 2009-08-18, Leucht, Axel <Ax...@prodv.de> wrote:
> Hi,
>
> I'm currently trying to do my first steps with ibatis-3 (beta-2) and can't
> execute a very simple select statement. I can do everything fine with
> ibatis-2 but fail miserably with ibatis-3. Seems to me that the parsing of
> my config is failing. Here is my SQLConfiguration.xml file
>
> <?xml version="1.0" encoding="UTF-8" ?>
> <!DOCTYPE configuration
> PUBLIC "-//ibatis.apache.org//DTD Config 3.0//EN"
> "http://ibatis.apache.org/dtd/ibatis-3-config.dtd">
> <configuration>
> <properties resource="database/ora9207.properties " />
> <environments default="development">
> <environment id="development">
> <transactionManager type="JDBC"/>
> <dataSource type="POOLED">
> <property name="driver" value="${driver}"/>
> <property name="url" value="${url}"/>
> <property name="username" value="${username}"/>
> <property name="password" value="${password}"/>
> </dataSource>
> </environment>
> </environments>
> <mappers>
> <mapper resource="database/maps/Student.xml"/>
> </mappers>
> </configuration>
>
> And my Student.xml:
> <?xml version="1.0" encoding="UTF-8" ?>
> <!DOCTYPE sqlMap
> PUBLIC "-//ibatis.apache.org//DTD SQL Map 2.0//EN"
> "http://ibatis.apache.org/dtd/ibatis-mapper-3.dtd">
> <sqlMap namespace="Student">
> <select id="getAllStudenten" resultType="entities.Student">
> select name,descr as description from student s
> </select>
> </sqlMap>
>
> It seems that ibatis-3 is trying to read the dtd via internet but fails to
> do so, though the proper ibatis-jar file is on my classpath.
>
> I'd appreciate any help.
>
> /Axel
>
>
> ---------------------------------------------------------------------
> To unsubscribe, e-mail: user-java-unsubscribe@ibatis.apache.org
> For additional commands, e-mail: user-java-help@ibatis.apache.org
>
>
--
Sent from my mobile device
---------------------------------------------------------------------
To unsubscribe, e-mail: user-java-unsubscribe@ibatis.apache.org
For additional commands, e-mail: user-java-help@ibatis.apache.org