Home » SQL & PL/SQL » SQL & PL/SQL » XML parsing error-ORA-06512 (oracle 10g)
XML parsing error-ORA-06512 [message #646592] Tue, 05 January 2016 04:16 Go to next message
gobi21
Messages: 6
Registered: January 2016
Location: Singapore
Junior Member
I am facing the below error while trying to export the data from the resulted output from TOAD.

ORA-31011: XML parsing failed
ORA-19202: Error occurred in XML processing
LPX-00229: input source is empty
Error at line 0
ORA-06512: at "SYS.XMLTYPE", line 254
ORA-06512: at line 1

SELECT docdata, xml_path,PROCESSING_STATUS,
EXTRACTVALUE(xmltype(u_xml), '/ata_document/doc_sub_channel') Channel,
EXTRACTVALUE(xmltype(u_xml), '/ata_document/data_capture/capture_info/audit_trail/audit_entry[@action="ENTRY"]/tstamp') ENTRY
from table1;

I am able to see the output in TOAD and while exporting, i am facing the above error. The query was working fine until last month and i am facing this issue suddenly. I dont face this issue in test environment.

Can someone suggest me how we can resolve this error or what is wrong with the query here?.

Here is the xml file:
<?xml version="1.0" encoding="UTF-8"?>
<!--DOCTYPE ata_document SYSTEM "/tmp/20090104.0000/gs/ebesela.dtd"-->
<ata_document version="1.0">
<doc_channel>xx</doc_channel>
<doc_sub_channel>xxxxxx</doc_sub_channel>
<data_capture>
<capture_info>
<scan_loc>xx</scan_loc>
<scan_workstation>XXXXX</scan_workstation>
<scan_date>2009/01/04 16:56:13</scan_date>
<priority>2</priority>
<components>
<component>
<name>CommonExport</name>
<version>2.4</version>
</component>
<component>
<name>ApplicationExport</name>
<version>3.0</version>
</component>
</components>
<audit_trail>
<audit_entry action="SCANNING">
<actor>xxxxx</actor>
</audit_entry>
<audit_entry action="ENTRY">
<tstamp>200901041703</tstamp>
<actor>esa</actor>
</audit_entry>
<audit_entry action="TYPE">
<tstamp>200901041708</tstamp>
<actor>xxxxx</actor>
</audit_entry>
<audit_entry action="CORR1">
<tstamp>200901041717</tstamp>
<actor>T153066</actor>
</audit_entry>
<audit_entry action="CORR2">
<tstamp>200901041719</tstamp>
<actor>xxxxx</actor>
</audit_entry>
<audit_entry action="EXPORT2ATA">
<tstamp>200901041720</tstamp>
<actor>exporter</actor>
</audit_entry>
</audit_trail>
</capture_info>
<index>
<tdkmnt>
<docformat>JPG</docformat>
<doc_type_code>PYMT</doc_type_code>
<archive_type>RG</archive_type>
<user_id>xxxxx</user_id>
<pages>1</pages>
<stamm_nr>xxxxx</stamm_nr>
<status>3</status>
<locid>SG</locid>
</tdkmnt>
<tregi_doc>
<doc_date>05.01.2009</doc_date>
<box_nr>XXXX</box_nr>
<fldr_nr>XXXX</fldr_nr>
</tregi_doc>
<workflow>
<several_debit_account>N</several_debit_account>
<currency>xxx</currency>
<amount>xxx</amount>
<payment_type>xxxx</payment_type>
<funding_arrangement>N</funding_arrangement>
<notes/>
</workflow>
</index>
<note/>
<files>
<file>
<file_name>1.pg</file_name>
<file_type>JPG</file_type>
<checksum algorithm="SHA1">XXXXXXXXXXXXXXX</checksum>
</file>
</files>
</data_capture>
<requests>
<request>
<idno>1</idno>
<request_type>archive_document</request_type>
<archive_service>XXXX</archive_service>
<priority>1</priority>
</request>
</requests>
</ata_document>

[Updated on: Tue, 05 January 2016 04:17]

Report message to a moderator

Re: XML parsing error-ORA-06512 [message #646596 is a reply to message #646592] Tue, 05 January 2016 05:03 Go to previous messageGo to next message
Michel Cadot
Messages: 68641
Registered: March 2007
Location: Nanterre, France, http://...
Senior Member
Account Moderator

First thing, try to do it in SQL*Plus.

Re: XML parsing error-ORA-06512 [message #646597 is a reply to message #646596] Tue, 05 January 2016 05:08 Go to previous messageGo to next message
Michel Cadot
Messages: 68641
Registered: March 2007
Location: Nanterre, France, http://...
Senior Member
Account Moderator

I have no problem in version 11.2.0.4 both db and SQL*Plus:
SQL> SELECT EXTRACTVALUE(xmltype(u_xml), '/ata_document/doc_sub_channel') Channel,
  2  EXTRACTVALUE(xmltype(u_xml), '/ata_document/data_capture/capture_info/audit_trail/audit_entry[@action="ENTRY"]/tstamp')
  3  from table1;
CHANNEL
------------------------------------------------------------------------------------------------------------------------
ENTRY
------------------------------------------------------------------------------------------------------------------------
xxxxxx
200901041703

Re: XML parsing error-ORA-06512 [message #646599 is a reply to message #646597] Tue, 05 January 2016 05:09 Go to previous messageGo to next message
Michel Cadot
Messages: 68641
Registered: March 2007
Location: Nanterre, France, http://...
Senior Member
Account Moderator

And not more in 10.2.0.4:
SQL> SELECT EXTRACTVALUE(xmltype(u_xml), '/ata_document/doc_sub_channel') Channel,
  2  EXTRACTVALUE(xmltype(u_xml), '/ata_document/data_capture/capture_info/audit_trail/audit_entry[@action="ENTRY"]/tstamp')
  3  from table1;
CHANNEL
------------------------------------------------------------------------------------------------------------------------
EXTRACTVALUE(XMLTYPE(U_XML),'/ATA_DOCUMENT/DATA_CAPTURE/CAPTURE_INFO/AUDIT_TRAIL/AUDIT_ENTRY[@ACTION="ENTRY"]/TSTAMP')
------------------------------------------------------------------------------------------------------------------------
xxxxxx
200901041703

1 row selected.

SQL> @v

Version Oracle : 10.2.0.4.0

Re: XML parsing error-ORA-06512 [message #646624 is a reply to message #646599] Tue, 05 January 2016 21:50 Go to previous message
gobi21
Messages: 6
Registered: January 2016
Location: Singapore
Junior Member
Hi,

Thanks for the inputs. Let me try in Sql plus.

Previous Topic: Collections- Associative arrays
Next Topic: Query is not running from 11.2.0.3 to 11.2.0.4
Goto Forum:
  


Current Time: Thu Apr 18 16:12:40 CDT 2024