Skip to Main Content

Database Software

Announcement

For appeals, questions and feedback about Oracle Forums, please email oracle-forums-moderators_us@oracle.com. Technical questions should be asked in the appropriate category. Thank you!

ORA-22809 when executing sample source code for purchaseOrder.xsd

flaviocJul 12 2008 — edited Jul 22 2008
Sorry for reposting the topic, i realized today i posted it in the wrong forum as this problem refers to Oracle XE (10.2).
----------------------

Hello,
i was trying to execute the sample code given in chapter 5 of Oracle XML DB User's Guide for version 10GR2 (on an Oracle XE db) and i got:

Error starting at line 1 in command:
CREATE TABLE purchaseorder_as_column (
id NUMBER,
xml_document XMLType,
UNIQUE (xml_document."XMLDATA"."Reference"))
XMLTYPE COLUMN xml_document
XMLSCHEMA "http://xmlns.oracle.com/xdb/documentation/purchaseOrder.xsd"
ELEMENT "PurchaseOrder"
VARRAY xml_document."XMLDATA"."Actions"."Action"
STORE AS TABLE action_table2
((PRIMARY KEY (NESTED_TABLE_ID, SYS_NC_ARRAY_INDEX$))
ORGANIZATION INDEX OVERFLOW)
VARRAY xml_document."XMLDATA"."LineItems"."LineItem"
STORE AS TABLE lineitem_table2
((PRIMARY KEY (NESTED_TABLE_ID, SYS_NC_ARRAY_INDEX$))
ORGANIZATION INDEX OVERFLOW)
LOB (xml_document."XMLDATA"."Notes")
STORE AS (TABLESPACE USERS ENABLE STORAGE IN ROW
STORAGE(INITIAL 4K NEXT 32K))
Error at Command Line:12 Column:32
Error report:
SQL Error: ORA-22809: nonexistent attribute
22809. 00000 - "nonexistent attribute"
*Cause: An attempt was made to access a non-existent attribute of an
object type.
*Action: Check the attribute reference to see if it is valid. Then retry
the operation.


The purchaseOrder.xsd schema document has been built by cutting and pasting the various fragments contained in the documentation and can be found at:

http://www.yocoya.com/temp/purchaseOrderOTN.xsd

The schema was registered using the following command:

BEGIN
DBMS_XMLSCHEMA.registerSchema(
SCHEMAURL => 'http://xmlns.oracle.com/xdb/documentation/purchaseOrder.xsd',
SCHEMADOC => bfilename('XMLDIR','purchaseOrder.xsd'),
CSID => nls_charset_id('AL32UTF8'),
LOCAL => TRUE,
GENTYPES => TRUE,
GENTABLES => TRUE);
END;

Can someone explain what i am doing wrong or tell if the sample code is flawed?

Thank you,
Flavio

-------------------------------------
http://www.oraclequirks.com
Comments
Locked Post
New comments cannot be posted to this locked post.
Post Details
Locked on Aug 18 2008
Added on Jul 12 2008
4 comments
2,104 views