ORA-31001 from xmlparser.parse / dbms_xmlParser.parse with a HTTPS url (Doc ID 1065066.1)

Last updated on OCTOBER 21, 2010

Applies to:

Oracle Server - Enterprise Edition - Version: 10.2.0.4 to 11.2.0.1.0 - Release: 10.2 to 11.2
Information in this document applies to any platform.

Symptoms

The following sample code

set serveroutput on
set echo on

declare
reportURL VARCHAR2(128);
MyParser xmlparser.Parser;
MyXML xmltype;
MyDOMDoc xmldom.DOMDocument;
begin
-- This is the URL to get the report
reportURL := 'https://myserver.oracle.com:1445/Employee.xml';

dbms_output.put_line('reportURL is :');
dbms_output.put_line(reportURL);

MyParser := xmlparser.newParser;
xmlparser.parse(MyParser,reportURL);
MyDOMDoc := xmlParser.getDocument(MyParser);
xmldom.freeDocument(MyDOMDoc);
xmlParser.freeParser(MyParser );
end;
/

Fails when xmlparser.parse is called with a HTTPS url:

13 MyParser := xmlparser.newParser;
14 xmlparser.parse(MyParser,reportURL);
15 MyDOMDoc := xmlParser.getDocument(MyParser);
16 xmldom.freeDocument(MyDOMDoc);
17 xmlParser.freeParser(MyParser );
18 end;
19 /
reportURL is :
https://myserver.oracle.com:1445/Employee.xml
declare
*
ERROR at line 1:
ORA-31001: Invalid resource handle or path name
"https://myserver.oracle.com:1445/Employee.xml"
ORA-06512: at "SYS.XDBURITYPE", line 11
ORA-06512: at "XDB.DBMS_XSLPROCESSOR", line 142
ORA-29280: invalid directory path
ORA-29280: invalid directory path
ORA-29280: invalid directory path
ORA-06512: at "XDB.DBMS_XMLPARSER", line 119
ORA-06512: at line 14

However, the same code completes successfully when ran with a regular HTTP url:

13 MyParser := xmlparser.newParser;
14 xmlparser.parse(MyParser,reportURL);
15 MyDOMDoc := xmlParser.getDocument(MyParser);
16 xmldom.freeDocument(MyDOMDoc);
17 xmlParser.freeParser(MyParser );
18 end;
19 /
reportURL is :
http://myserver.oracle.com:8082/Employee.xml

PL/SQL procedure successfully completed.

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