ODP.NET Throws Wrong Exception Message With Transactions
Last updated on DECEMBER 01, 2015
Applies to:Oracle Data Provider for .NET - Version 188.8.131.52 and later
Microsoft Windows (32-bit)
Microsoft Windows x64 (64-bit)
It is observed that, .NET application using ODP.NET driver doesn't receive the error raised by RAISE_APPLICATION_ERROR in stored procedure.
Instead, it throws Oracle internal error message: ORA-20002: Message 20002 not found; product=RDBMS; facility=ORA.
This issue is identified when a local transaction is promoted to a distributed transaction (by opening a second database connection within the transaction scope).
The problem is start occurring from ODP.NET 184.108.40.206.1 onwards.
The issue can be reproduced using the sample code below :
Database Script :
Note - Complete source code is attached for the issue (SourceCode.txt)
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