I am trying to execute some SQL queries from Oracle 11g and I am having problems using it ora:contains. I am using Spring JDBC implementation and my code generates sql statement:
select *
from view_name
where column_a = ?
and column_b = ?
and existsNode(xmltype(clob_column),
'record/name [ora:contains(text(), "name1") > 0]',
'xmlns:ora="http://xmlns.oralce.com/xdb"') = 1
I really deleted the actual view / column names, but when I copy them to sqlplus and replace them with random values, the selection is made correctly. When I try to run it in my DAO code, I get this stack trace:
org.springframework.jdbc.UncatergorizedSQLException: PreparedStatementCallback;
uncatergorizedSQLException for SQL [the big select above]; SQL state [99999];
error code [31011];
ORA-31011: XML parsing failed.
ORA-19202: Error occured in XML processing
LPX-00607: Invalid reference: 'contains';nested exception is java.sql.SQLException:
ORA-31011: XML parsing failed
ORA-19202: Error occured in XML processing
LPX-00607: Invalid reference: 'contains'
(lasts like this for a while ....)
I think it's worth mentioning that I'm using Maven, and maybe I'm missing some of the dependency that is required for this. Sorry, the mail is so long, but I wanted to make a mistake on the side of too much information.
Thanks for taking the time to read this at least =)
-Windle