I think Ibatis treats ${} as dynamic sql value and interprets it.  But you
would think the CDATA would take care of that.  Maybe if you escape it? 

-----Original Message-----
From: Steven Pannell [mailto:[EMAIL PROTECTED] 
Sent: Wednesday, October 12, 2005 11:49 AM
To: [email protected]
Subject: cannot using a dollar sign in my maps

Hi,

I have the following oracle (intermedia indexed) statement map sqlMap file:

    <select id="get" resultClass="long" >
      <![CDATA[
              select id from myTable
                where contains(title,'${Milben}',0 ) > 0
        ]]>
    </select>

When I run this statement I get the following error:

java.util.NoSuchElementException
        at java.util.StringTokenizer.nextToken(StringTokenizer.java:332)
        at
com.ibatis.sqlmap.engine.mapping.sql.simple.SimpleDynamicSql.processDynamicE
lements(Unknown Source)
        at
com.ibatis.sqlmap.engine.mapping.sql.simple.SimpleDynamicSql.getSql(Unknown
Source)
        at
com.ibatis.sqlmap.engine.mapping.statement.GeneralStatement.executeQueryWith
Callback(Unknown Source)
        at
com.ibatis.sqlmap.engine.mapping.statement.GeneralStatement.executeQueryForO
bject(Unknown Source)
        at
com.ibatis.sqlmap.engine.impl.SqlMapExecutorDelegate.queryForObject(Unknown
Source)
        at
com.ibatis.sqlmap.engine.impl.SqlMapExecutorDelegate.queryForObject(Unknown
Source)
        at
com.ibatis.sqlmap.engine.impl.SqlMapSessionImpl.queryForObject(Unknown
Source)
        at
com.ibatis.sqlmap.engine.impl.SqlMapClientImpl.queryForObject(Unknown
Source)

Seems that the dollar ($) sign is not accepted in the sqlMap. If I remove
the $ then the statement executes correctly.

Is there a way to resolve this issue??

thanks,
Steve.

Reply via email to