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:59:40 GMT
    I should have read a little closer. You were right. I apologize for
wasting time on a typo.


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



    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

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




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

<!DOCTYPE sqlMap

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


<sqlMap namespace="Hla">

<select id="getHlaById" parameterClass="java.lang.Integer"

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









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

<!DOCTYPE sqlMapConfig

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



<transactionManager type="JDBC">

<dataSource type="JNDI">

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



<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 "/>






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.

View raw message