ORA-31000 Error for Registered Schema
651348Jun 17 2009 — edited Jun 22 2009I have seven schemas I am trying to register that I may build XMLType tables. The parent schema has 5 includes and 1 import.
I had to use the force => TRUE option during their registration as the includes and import reference types within the parent.
On checking resource_view, path_view, user_xml_schemas, and dba_xml_schemas I found all entries consistent.
When I tried to build an XMLTYPE column table using the parent schema, the script returned --> "ORA-31000: Resource 'Harmony-DOCUMENT-LOV.xsd' is not an XDB schema document" for one of the includes.
The offending XSD structure is quite different as it does not contain a single complexType or element. It contains enumerations and simpleType definitions. as sampled below:
--------------------------------------------------------------------------------------------------------------------------------
<xsd:schema xmlns:xsd="http://www.w3.org/2001/XMLSchema" xmlns="urn:us:gov:ic:doc" xmlns:xdb="http://xmlns.oracle.com/xdb" targetNamespace="urn:us:gov:ic:doc" xdb:storeVarrayAsTable="false" xdb:mapUnboundedStringToLob="true"
xdb:schemaURL="http://dharm2:8080/public/FADS/schemas/xsd/Harmony-DOCUMENT-LOV.xsd" elementFormDefault="unqualified" version="2.2.0">
<!--elementFormDefault="qualified" xml:lang="en"-->
<!--
****************************************************************
LIST OF VALUES MANAGEMENT
****************************************************************
-->
<xsd:simpleType name="AgencyMember">
<xsd:restriction base="xsd:string">
<xsd:enumeration value="202MI">
<xsd:annotation>
<xsd:documentation>202ND Military Intelligence Battalion</xsd:documentation>
</xsd:annotation>
</xsd:enumeration>
<xsd:enumeration value="300MI">
<xsd:annotation>
<xsd:documentation>300MI -- 300th Military Intelligence Brigade</xsd:documentation>
</xsd:annotation>
</xsd:enumeration>
... ad nauseum
----------------------------------------------------------------------------------------------------------------------------------------
With the exception of the schema name all registrations were done as the schema owner using:
dbms_xmlschema.registerschema (schemaurl => 'http://dharm2:8080/public/FADS/xsd/Harmony-DOCUMENT-LOV.xsd',
schemadoc => BFILENAME ('FADSXSDDIR', 'Harmony-DOCUMENT-LOV.xsd'
),
local => TRUE,
gentypes => TRUE,
genbean => FALSE,
owner => 'FADSADMIN',
force => TRUE,
gentables => FALSE
csid => NLS_CHARSET_ID ('AL32UTF8')
);
----------------------------------------------------------------------------------------------------------------------------------
Please point me in the right direction that I may successfully implement XDB as the center of our XML framework.
Thank you,
David