Skip to Main Content

DevOps, CI/CD and Automation

Announcement

For appeals, questions and feedback about Oracle Forums, please email oracle-forums-moderators_us@oracle.com. Technical questions should be asked in the appropriate category. Thank you!

Error with basic XMLTable

783942Jul 8 2010 — edited Jul 29 2010
Hi all,

I'm struggling to get a basic XML table working, i've stripped everything back to basics but still no joy. This works:
select xmltype(bfilename('XMLDIR','mylog.log'), nls_charset_id('AL32UTF8')) from dual
So i know i can access the file and create a valid XMLType. However, when i try and create a table:
select * from XMLTABLE( '/log/record'
passing xmltype(bfilename('XMLDIR','mylog.log'), nls_charset_id('AL32UTF8'))
  	columns
                   message varchar2(20) path 'message'); 
or even
select * from XMLTABLE( '/log/record'
passing xmltype(bfilename('XMLDIR','mylog.log'), nls_charset_id('AL32UTF8'))
);
I get the error:

ORA-29900: operator binding does not exist
ORA-06540: PL/SQL: compilation error
ORA-06553: PLS-907: cannot load library unit SYS.XQSEQUENCEFROMXMLTYPE (referenced by SYS.XQSEQUENCE)

I've spent ages trying different things, playing with the namespace clause, different XQuery paths etc. Here's the XML i used with the code above to test:
<?xml version="1.0" encoding="utf-8" ?>
<log>
<record>
  <date>2010-06-30T17:31:11</date>
  <millis>1277915471029</millis>
  <sequence>19</sequence>
  <logger>timings</logger>
  <level>FINE</level>
  <class>com.MASAgentRunner</class>
  <method>run</method>
  <thread>11</thread>
  <message>Agent 1370 started running</message>
</record>
<record>
  <date>2010-06-30T17:31:11</date>
  <millis>1277915471029</millis>
  <sequence>19</sequence>
  <logger>timings</logger>
  <level>FINE</level>
  <class>com.MASAgentRunner</class>
  <method>run</method>
  <thread>11</thread>
  <message>Agent 345321515</message>
</record>
<record>
  <date>2010-06-30T17:31:11</date>
  <millis>1277915471029</millis>
  <sequence>19</sequence>
  <logger>timings</logger>
  <level>FINE</level>
  <class>com.MASAgentRunner</class>
  <method>run</method>
  <thread>11</thread>
  <message>Agent complete</message>
</record>
</log>
Thanks
Alistair
Comments
Locked Post
New comments cannot be posted to this locked post.
Post Details
Locked on Aug 26 2010
Added on Jul 8 2010
5 comments
2,851 views