Ora-31001 Invalid Reference When Enqueuing Xmltype Payload With Dtd File Ref

(Doc ID 730584.1)

Last updated on JUNE 21, 2011

Applies to:

Oracle Server - Enterprise Edition - Version: 10.2.0.1 to 10.2.0.4 - Release: 10.2 to 10.2
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

.

Cause

Sign In with your My Oracle Support account

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

My Oracle Support provides customers with access to over a
Million Knowledge Articles and hundreds of Community platforms