Hi 

Please check that you are using correct quotes around user in the XML.

This looks wrong:
xmlResultName="user"

Should be using " quotes. Please retype.


Med venlig hilsen
 
Claus Ibsen
......................................
Silverbullet
Skovsgårdsvænget 21
8362 Hørning
Tlf. +45 2962 7576
Web: www.silverbullet.dk

-----Original Message-----
From: Reda [mailto:[EMAIL PROTECTED] 
Sent: 14. oktober 2008 09:41
To: [email protected]
Subject: iBatis with xmlResultName fails


Hi

I have the file MyRouteBuilder.java like

        from("timer://pollTheDatabase?delay=1000&period=300000").
                
to("ibatis:selectAllUsers").splitter(body()).to("jms:topic:xxx");

It works if User.xml is like

<select id="selectAllUsers" resultClass="xml">
    select
        id,firstname,
        lastname,
        email
    from mdl_user
  </select>

It fails if User.xml is like

<select id="selectAllUsers" resultClass="xml" xmlResultName="user">
    select
        id,firstname,
        lastname,
        email
    from mdl_user
  </select>

with the error
SEVERE: Failed delivery for exchangeId:
ID-nowar.redaelli.org/56357-1223923215058/0-0. On delivery attempt: 3
caught: java.lang.RuntimeException: Error occurred.  Cause:
com.ibatis.common.xml.NodeletException: Error parsing XML.  Cause:
java.lang.RuntimeException: Error parsing XPath '/sqlMapConfig/sqlMap'. 
Cause: com.ibatis.common.xml.NodeletException: Error parsing XML.  Cause:
org.xml.sax.SAXParseException: Open quote is expected for attribute
"xmlResultName" associated with an  element type  "select".

What's wrong? Is there an other way to convert User.class to/from a xml
file? Using Jaxb and marshal/unmarshal? 

-- 
View this message in context: 
http://www.nabble.com/iBatis-with-xmlResultName-fails-tp19968530s22882p19968530.html
Sent from the Camel - Users mailing list archive at Nabble.com.

Reply via email to