LPX-00607 for ora:contains in java but not sqlplus
Posted
by Windle
on Stack Overflow
See other posts from Stack Overflow
or by Windle
Published on 2010-03-21T04:04:52Z
Indexed on
2010/03/21
4:11 UTC
Read the original article
Hit count: 434
Hey all,
I am trying to doing some sql querys out of Oracle 11g and am having issues using ora:contains. I am using spring's jdbc impl and my code generates the 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 have removed the actual view / column names obviously, but when I copy that into sqlplus and substitute in random values, the select executes properly. 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'
(continues on like this for awhile....)
I think it is worth mentioning that I am using maven and it is possible I am missing some dependency that is required for this. Sorry the post is so long, but I wanted to err on the side of too much info.
Thanks for taking the time to read this at least =)
-Windle
© Stack Overflow or respective owner