ORA-03115 error when creating OracleObject with XMLType

Discussion of open issues, suggestions and bugs regarding ADO.NET provider for Oracle
Post Reply
ChrisBAtHPS
Posts: 1
Joined: Fri 21 Nov 2008 16:15

ORA-03115 error when creating OracleObject with XMLType

Post by ChrisBAtHPS » Fri 21 Nov 2008 16:23

I'm trying to create a UDT that contains an XMLType, which I understand Oracle supports. I am able to implement the "Simple Example of Point-to-Point Message" sample provided in your documentation. When I change the message type to use an XMLType field, the line to create the OracleObject fails with a ORA-03115 error. I'm using Oracle Client 10g Express Edition to connect to an Oracle 10g XE database. Can you tell me what I'm missing? Thanks.


// Create a connection. The AQ types are not supported in Direct mode, so we disable it in the connection string.
OracleConnection oracleConnection = new OracleConnection("User Id=system;Password=manager;Server=ora;Direct=False;");
oracleConnection.Open();

// Create a user-defined type to use in the queues. All queue messages will be structured as this UDT.
OracleCommand oracleCommand = new OracleCommand("CREATE OR REPLACE TYPE message AS OBJECT (BatchID NUMBER(15), MsgBody XMLType);", oracleConnection);
oracleCommand.ExecuteNonQuery();

// Create a new queue table with name "QUEUE_TABLE_MESSAGE". This table will store all messages of this queue.
OracleQueueTable oracleQueueTable = new OracleQueueTable("QUEUE_TABLE_MESSAGE", oracleConnection);

// Specify type of the messages in the queue. This is the UDT we created before.
oracleQueueTable.Options.PayloadTypeName = "message";

// Create the table "QUEUE_TABLE_MESSAGE" at the database.
oracleQueueTable.CreateQueueTable();

// Create a new queue administration object and bind it to the "QUEUE_TABLE_MESSAGE" table.
// This object will control the queue lifecycle. The queue name is set to "MESSAGE_QUEUE".
OracleQueueAdmin oracleQueueAdmin = new OracleQueueAdmin("MESSAGE_QUEUE", "QUEUE_TABLE_MESSAGE", oracleConnection);

// Create the queue itself in the associated table "QUEUE_TABLE_MESSAGE".
oracleQueueAdmin.CreateQueue();

// Start the queue. From now on it is ready to work.
oracleQueueAdmin.StartQueue();

// Create an object that sends messages to the queue named "MESSAGE_QUEUE".
OracleQueue oracleEnqueueQueue = new OracleQueue("MESSAGE_QUEUE", oracleConnection);

// Create an object that represents the queue message
OracleObject mes = new OracleObject("message", oracleConnection);
mes["nickname"] = oracleConnection .UserId;
mes["mestext"] = "Hello, world!";

Shalex
Site Admin
Posts: 9543
Joined: Thu 14 Aug 2008 12:44

Post by Shalex » Mon 24 Nov 2008 16:20

The OracleQueue component is implemented using the sys.dbms_aq package of Oracle. The OracleQueue capabilities are limited by the capabilities of this package. Probably, the usage of XMLTYPE is not allowed. Refer to the documentation on the package.

Post Reply