ORA-31001: Invalid resource handle or path name error with Schema Registration (Doc ID 471568.1)

Last updated on FEBRUARY 08, 2017

Applies to:

Oracle Database - Enterprise Edition - Version 10.2.0.1 and later
Information in this document applies to any platform.
Checked for Relevance on 22-Mar-2013

Symptoms

The following error is seen when registering a schema as below:

SQL> BEGIN
 DBMS_XMLSCHEMA.registerSchema(
 'http://localhost:8080/source/schemas/poSource/xsd/purchaseOrder.xsd',
 XDBURIType('/source/schemas/poSource/xsd/purchaseOrder.xsd').getClob(),
 TRUE,
 TRUE,
 FALSE,
 TRUE);
 END;
/
BEGIN
*
ERROR at line 1:
ORA-31001: Invalid resource handle or path name
"/source/schemas/poSource/xsd/purchaseOrder.xsd"
ORA-06512: at "SYS.XDBURITYPE", line 4
ORA-06512: at line 2



The folders for containing the schema document have already been created in the XDB repository:

SQL> declare
 res boolean;
 begin
 res := dbms_xdb.createFolder('/source/');
 end;
/

SQL> declare
 res boolean;
 begin
 res := dbms_xdb.createFolder('/source/schemas/');
 res := dbms_xdb.createFolder('/source/schemas/poSource/');
 res := dbms_xdb.createFolder('/source/schemas/poSource/xsd/');
 commit;
 end;
/

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