My Oracle Support Banner

Ora-31001 Invalid Reference When Enqueuing Xmltype Payload With Dtd File Ref (Doc ID 730584.1)

Last updated on FEBRUARY 08, 2022

Applies to:

Oracle Database - Enterprise Edition - Version 10.2.0.1 to 10.2.0.4 [Release 10.2]
Gen 1 Exadata Cloud at Customer (Oracle Exadata Database Cloud Machine) - Version N/A and later
Oracle Cloud Infrastructure - Database Service - Version N/A and later
Oracle Database Cloud Exadata Service - Version N/A and later
Oracle Database Exadata Express Cloud Service - Version N/A and later
Information in this document applies to any platform.

Symptoms

Using AQ to store xmltype payloads in an Oracle 10g R2 DB.
   
Attempting to enqueue XML with a DOCTYPE tag with reference to a dtd file, fails :

declare
aeqopt dbms_aq.enqueue_options_t;
amsgprop dbms_aq.message_properties_t;
amsgdata SYS.XMLtype;
aenq_msgid raw(16);
atext CLOB;
adtd varchar2(200);


begin
atext := '<?xml version="1.0" encoding="UTF-8"?> <!-- edited with XML Spy v3.
5 NT (http://www.xmlspy.com) by ams (American Management Systems) --> <!DOCTYPE
BCHConso SYSTEM "/public/DawnaTest.dtd"><BCHConso></BCHConso>';
adtd := '<!ELEMENT BCHConso EMPTY>';

amsgdata := SYS.XMLtype(xmldata=>atext);
dbms_output.put_line('created');

dbms_aq.enqueue(
queue_name => 'tony.Q_XML_RFD_INPUT',
enqueue_options => aeqopt,
message_properties => amsgprop,
payload => amsgdata,
msgid => aenq_msgid);

commit;
END;
/

declare
*
ERROR at line 1:
ORA-31001: Invalid resource handle or path name "/public/DawnaTest.dtd"
ORA-06512: at "SYS.XMLTYPE", line 254
ORA-06512: at line 16

.

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

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