Enqueue'ing message and getting 21525

Discussion of open issues, suggestions and bugs regarding ADO.NET provider for Oracle
Post Reply
martyphee
Posts: 8
Joined: Fri 27 Jun 2008 19:13

Enqueue'ing message and getting 21525

Post by martyphee » Tue 22 Jul 2008 14:33

I'm trying to enqueue a message and keep getting this.

{"ORA-21525: attribute number or (collection element at index) %s violated its constraints"}

I found that it was a problem with the commodity1/2. Even though I specified no more than 2 characters it still through the error. When I changed the type to varchar2(20) it worked fine. Seems like your code is sending the wrong number of characters.

CREATE OR REPLACE TYPE ohlc_msg_type AS OBJECT (
sessionDt date,
contract varchar2(20),
xml_qry varchar2(20),
exchCode varchar2(10),
commodity1 varchar2(5),
commodity2 varchar2(5),
year1 number,
year2 number,
month1 number,
month2 number
);
/

execute DBMS_AQADM.create_queue_table( queue_table => 'ohlc_queue_tab', queue_payload_type => 'ohlc_msg_type', multiple_consumers=>true );
execute DBMS_AQADM.create_queue( queue_name => 'ohlc_queue', queue_table => 'ohlc_queue_tab');
execute DBMS_AQADM.start_queue( queue_name => 'ohlc_queue', enqueue => TRUE);


declare
subsc_t sys.aq$_agent;

begin
subsc_t := sys.aq$_agent('ohlc_listener', 'ohlc_queue', 0);
dbms_aqadm.add_subscriber(queue_name => 'ohlc_queue', subscriber => subsc_t);
end;
/

AndreyR
Devart Team
Posts: 2919
Joined: Mon 07 Jul 2008 13:16

Post by AndreyR » Thu 24 Jul 2008 16:29

Hello, Martyphee.

The problem is being investigated now. We will let you know when the solution will be found.

Regards, Andrey.

martyphee
Posts: 8
Joined: Fri 27 Jun 2008 19:13

Post by martyphee » Tue 29 Jul 2008 13:05

Any word on this? I have another queue with the same problem.

AndreyR
Devart Team
Posts: 2919
Joined: Mon 07 Jul 2008 13:16

Post by AndreyR » Tue 29 Jul 2008 13:28

We have tested the issue and found no problem in the OraDirect .NET 4.70.38 and Oracle server 10.2.0.1.0

Could you please tell us your Oracle server version and the OraDirect .NET version?

Also please provide a small test project to reproduce the issue, or some steps to get the same error.

Post Reply