LPX-00607 for ora:包含在java中但不包含在sqlplus中
我正在尝试在 Oracle 11g 中执行一些 SQL 查询,但在使用 ora:contains
时遇到问题。我正在使用 Spring 的 JDBC 实现,我的代码生成 sql 语句:
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
显然我已经删除了实际的视图/列名称,但是当我将其复制到 sqlplus 并替换为随机值时,选择会正确执行。当我尝试在我的 DAO 代码中运行它时,我得到了这个堆栈跟踪:(
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'
像这样继续一段时间......)
我认为值得一提的是,我正在使用 Maven,并且我可能缺少一些依赖项为此需要。抱歉,这篇文章太长了,但我想避免信息过多。
感谢您至少花时间阅读本文 =)
-Windle
I am trying to doing some SQL queries out of Oracle 11g and am having issues using ora:contains
. I am using Spring's JDBC implementation 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
如果你对这篇内容有疑问,欢迎到本站社区发帖提问 参与讨论,获取更多帮助,或者扫码二维码加入 Web 技术交流群。
绑定邮箱获取回复消息
由于您还没有绑定你的真实邮箱,如果其他用户或者作者回复了您的评论,将不能在第一时间通知您!
发布评论
评论(1)
您的名称空间声明中似乎存在拼写错误:
如果这确实是您的代码中的拼写错误(而不仅仅是您在此处发布的内容),那么修复它也没什么坏处。
You appear to have a spelling mistake in your namespace declaration:
If that really is a typo in your code (rather than just in your posting here) it can't hurt to fix it.