ibatis-user-java mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From "Stanley, Eric" <Eric.R.Stan...@qwest.com>
Subject RE: SqlMapConfig.xml and subsequent sqlMap entries
Date Mon, 26 Jan 2009 16:27:27 GMT
No. Its just the way the xml pasted into outlook.
 
-Ryan

________________________________

From: Jonathan Moores [mailto:jonathan.moores@gmail.com] 
Sent: Friday, January 23, 2009 5:18 PM
To: user-java@ibatis.apache.org
Subject: RE: SqlMapConfig.xml and subsequent sqlMap entries



Not sure but is there any reason that there are spaces after .xml?

 

From: Stanley, Eric [mailto:Eric.R.Stanley@qwest.com] 
Sent: zaterdag 24 januari 2009 0:40
To: user-java@ibatis.apache.org
Subject: SqlMapConfig.xml and subsequent sqlMap entries

 

All,

    New to iBATIS, just trying to get the thing to load properly. I am
using eclipse 3.4.1, Tomcat 6, iBATIS 2.3.4 and JDK 1.5. It seems to be
loading the SqlMapConfig.xml fine, but when it tries to parse the sqlMap
entries, it dies hard:

 

java.lang.RuntimeException: Error initializing MyAppSqlConfig class.
Cause: java.lang.RuntimeException: Error occurred. Cause:
com.ibatis.common.xml.NodeletException: Error parsing XML. Cause:
java.lang.RuntimeException: Error parsing XPath '/sqlMapConfig/sqlMap'.
Cause: java.io.IOException: Could not find resource
com/qwest/pt/domain/sql/Hla.xml 

This looks to me like a simple classpath issue, and maybe it is. I tried
putting the sqlMap files in the WEB-INF/classes folder and updating the
SqlMapConfig.xml to no avail. Ive tried just about every combination I
can think of, and it still cant find these sqlMap files. I really
appreciate any help on this, and would be happy to provide more info if
needed. Here is my setup:

 

------------------------------------------------------------------------
---------

Hla.xml located in: com.qwest.pt.domain.sql

------------------------------------------------------------------------
---------

<pre>

<code>

<?xml version="1.0" encoding="UTF-8" ?>

<!DOCTYPE sqlMap

PUBLIC "-//iBATIS.com//DTD SQL Map 2.0//EN"

"http://www.ibatis.com/dtd/sql-map-2.dtd">

<sqlMap namespace="Hla">

<select id="getHlaById" parameterClass="java.lang.Integer"
resultClass="com.qwest.pt.domain.Hla">

select * from hla where id = #value#</select>

</sqlMap>

</code>

</pre>

------------------------------------------------------------------------
---------

SqlMapConfig.xml

------------------------------------------------------------------------
---------

<pre>

<code>

<?xml version="1.0" encoding="UTF-8" ?>

<!DOCTYPE sqlMapConfig

PUBLIC "-//ibatis.apache.org//DTD SQL Map Config 2.0//EN"

"http://ibatis.apache.org/dtd/sql-map-config-2.dtd">

<sqlMapConfig>

<transactionManager type="JDBC">

<dataSource type="JNDI">

<property name="DataSource" value="java:comp/env/jdbc/pptracker"/>

</dataSource>

</transactionManager>

<sqlMap resource="com/qwest/pt/domain/sql/Hla.xml "/>

<sqlMap resource="com/qwest/pt/domain/sql/Loe.xml "/>

<sqlMap resource="com/qwest/pt/domain/sql/Priority.xml "/>

<sqlMap resource="com/qwest/pt/domain/sql/Status.xml "/>

<sqlMap resource="com/qwest/pt/domain/sql/User.xml "/>

<sqlMap resource="com/qwest/pt/domain/sql/Action.xml "/>

</sqlMapConfig>

</code>

</pre>

 

 



This communication is the property of Qwest and may contain confidential
or privileged information. Unauthorized use of this communication is
strictly prohibited and may be unlawful. If you have received this
communication in error, please immediately notify the sender by reply
e-mail and destroy all copies of the communication and any attachments.


Mime
View raw message