ibatis-user-java mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From "Voorhoeve, Niels {PBG}" <niels.voorho...@pepsi.com>
Subject RE: cannot using a dollar sign in my maps
Date Wed, 12 Oct 2005 16:00:56 GMT
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:steven.pannell@zooplus.com] 
Sent: Wednesday, October 12, 2005 11:49 AM
To: user-java@ibatis.apache.org
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.


Mime
View raw message