ibatis-user-java mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Greg.Pe...@MDSUK.COM
Subject invalid character exception when returning an XML result object
Date Tue, 15 Mar 2005 11:44:24 GMT
I'm new to this, so please forgive me if this is a daft question

I'm trying to return an XML result object using a resultMap and I'm 
getting the following exception 

Caused by: org.w3c.dom.DOMException: INVALID_CHARACTER_ERR: An invalid or 
illegal XML character is specified. 

my sql map includes:

<resultMap  id="user-result-xml"  class="xml" xmlName="outermost element">
<result property="password" column="PASSWORD" javaType="java.lang.String"/>
</resultMap>
 
<select id="getXMLPasswordUsingUserId" parameterClass="java.lang.String" 
resultMap="user-result-xml"  >
        SELECT
        ut.password as PASSWORD
        FROM use_table ut
        WHERE 
        user_id = #userId# 
</select>

I've tried without the resultMap, ie by setting resultClass as "xml" in 
the <select> element, 
and it works fine. I just can't get it working using the result map

Thanks

Greg Peace
Mime
View raw message