My Oracle Support Banner

ORA-600: [qmcxpmapGPFPI0] When Trying To Insert XML Data Having Many Namespaces Into Xmltype Column (Doc ID 2466263.1)

Last updated on MARCH 09, 2019

Applies to:

Oracle Database - Enterprise Edition - Version 12.1.0.2 and later
Information in this document applies to any platform.

Symptoms

CREATE OR REPLACE DIRECTORY xml_dir AS '<path of xml file>';

CREATE TABLE xml_tab1 (
id        NUMBER(10),
filename  VARCHAR2(100),
xml       XMLTYPE
);

ALTER TABLE xml_tab1 ADD (CONSTRAINT xml_tab_pk PRIMARY KEY (id));
CREATE SEQUENCE xml_tab1_seq;
CREATE OR REPLACE PROCEDURE load_xml (p_dir IN VARCHAR2, p_filename IN VARCHAR2) AS
l_bfile BFILE := BFILENAME(p_dir, p_filename);
l_clob  CLOB;
l_dest_offset  INTEGER := 1;
l_src_offset   INTEGER := 1;
l_bfile_csid   NUMBER  := 0;
l_lang_context INTEGER := 0;
l_warning      INTEGER := 0;

BEGIN
DBMS_LOB.createtemporary (l_clob, TRUE);
DBMS_LOB.fileopen(l_bfile, DBMS_LOB.file_readonly);
-- loadfromfile deprecated.
-- DBMS_LOB.loadfromfile(l_clob, l_bfile, DBMS_LOB.getlength(l_bfile));
DBMS_LOB.loadclobfromfile (
  dest_lob      => l_clob,
  src_bfile     => l_bfile,
  amount        => DBMS_LOB.lobmaxsize,
  dest_offset   => l_dest_offset,
  src_offset    => l_src_offset,
  bfile_csid    => l_bfile_csid ,
  lang_context  => l_lang_context,
  warning       => l_warning);
DBMS_LOB.fileclose(l_bfile);

INSERT INTO xml_tab1 (
  id,
  filename,
  xml
)
VALUES (
  xml_tab1_seq.NEXTVAL,
  p_filename,
  XMLTYPE.createXML(l_clob)
);
COMMIT;

DBMS_LOB.freetemporary (l_clob);
END;
/

-- sqlplus
set serveroutput on
exec load_xml(p_dir => 'XML_DIR', p_filename => 'emp_ok.xml');
exec load_xml(p_dir => 'XML_DIR', p_filename => 'emp_value_error.xml');

col filename for a20
col xml for a50
set lin 200
select id, filename, t.xml.getclobval() xml from XML_TAB1 t;

        ID FILENAME             XML
---------- --------------------
--------------------------------------------------
         1 emp_ok.xml           <?xml version="1.0" encoding="UTF-8"?>
                                <p:pDokumentPackage xmlns:xci113="http://

ERROR:
ORA-00600: internal error code, arguments: [qmcxpmapGPFPI0], [], [], [], [],[], [], [], [], [], [], []

Changes

 

Cause

To view full details, sign in with your My Oracle Support account.

Don't have a My Oracle Support account? Click to get started!


In this Document
Symptoms
Changes
Cause
Solution
References


My Oracle Support provides customers with access to over a million knowledge articles and a vibrant support community of peers and Oracle experts.