ORA-31094 when registering an XML schema

(Doc ID 1345525.1)

Last updated on AUGUST 07, 2011

Applies to:

Oracle Server - Enterprise Edition - Version: and later   [Release: 11.1 and later ]
Information in this document applies to any platform.


Registering an XML schema as a binary XML fails with errors

    schemaURL => 'EmployeeDataImport.xsd'
   ,schemaDoc => bfilename('XMLDIR','EmployeeDataImport.xsd')
   ,genTypes => FALSE
   ,genTables => FALSE
   ,options => dbms_xmlschema.register_binaryxml
ERROR at line 1:
ORA-31094: incompatible SQL type "TIMESTAMP WITH TIME ZONE" for attribute or element "Time"
ORA-6512: at "XDB.DBMS_XMLSCHEMA_INT", line 37
ORA-6512: at "XDB.DBMS_XMLSCHEMA", line 61
ORA-6512: at "XDB.DBMS_XMLSCHEMA", line 132
ORA-6512: at line 2

The XSD has an xdb:SQLType="TIMESTAMP WITH TIME ZONE" annotation with an element declared of type xs:time. For example:

<xs:element name="Time" type="xs:time" xdb:SQLType="TIMESTAMP WITH TIME ZONE"/>


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