0

In my scenario I'm executing oracle store procedure from MS BizTalk orchestration via WCF-Custom adapter (oracleDBBinding). This procedure in negative scenario throwing custom exception (pl/sql RAISE_APPLICATION_ERROR).

If BizTalk Send port is configure UseAmbientTransactions = False (this mean that transaction is not elevated in to MSDTC) I'm getting

A message sent to adapter "WCF-Custom" on send port "MySendPort" with URI "oracledb://myoracledb/" is suspended. Error details: Microsoft.ServiceModel.Channels.Common.TargetSystemException: ORA-20901: Deal: 26252741.0.0 has already been processed

If BizTalk Send port is configure UseAmbientTransactions = True (this mean that transaction elevated in to MSDTC) I'm getting

A message sent to adapter "WCF-Custom" on send port "MySendPort" with URI "oracledb://myoracledb/" is suspended. Error details: Microsoft.ServiceModel.Channels.Common.TargetSystemException: ORA-20901: Message 20901 not found; product=RDBMS; facility=ORA ---> Oracle.DataAccess.Client.OracleException: ORA-20901: MySendPort; product=RDBMS; facility=ORA

So as you may see when I enable ambient transaction on send port the exception message is lost. The error number is returned but message is substitute with string Message XXX not fount. This happens only when i'm dealing with custom exceptions raided on oracle side, exceptions like wrong username and password are retrieved correctly.

I'm wondering if it's wrong configuration of oracle client + OracleMTSRecoveryService + MSDTC or it's a bug in oracle client

To put this in context I'm migrating my solution from BizTalk 2009 on windows 2008 (physical box) to BizTalk 2013R2 on windows server 2012R2 (virtual box). On on old estate (BizTalk2009) propagation of errors works as expected with Ambient Transactions enabled. The issue which I'm experiencing is on new estate BizTalk 2013R2 where i have new OS new Oracle Client and new BizTalk version. So i guess that ether I missed something in configuration / permission or I'm dealing with a bug in Oracle Client / WCF Oracle Adapter

My environment: Operating System: Windows 2012R2 Oracle client: 12c (12.1.0) both versions 32 and 64 bit BizTalk version: 2013R2 OracleMTSRecoveryService: Installed on 64 bit oracle client

Piotr
  • 41
  • 1
  • 5

2 Answers2

0

Because you are raising an application error that causes the transaction to roll back and then BizTalk will retry and will eventually get the Message not found error (as the response would be discarded on rollback).

If it is a business exception you should not be raising it as an application exception, but rather pass back a response message containing the state, e.g. Processed=OK/ERROR and a ERROR node containing the business failure.

You then process that response message in BizTalk.

Dijkgraaf
  • 11,049
  • 17
  • 42
  • 54
0

I know this is an old thread, however I found that setting the system environment variable ORAMTS_SESS_REGISTERUCB to false resolves this.

I dont fully understand why, as performing a google search only returns a single result when searching for the environment variable - ORAMTS_SESS_REGISTERUCB.

It might have to do with architecture types, as I found this to be introduced when installing both ODAC_x86 and ODAC_x64 tools with the Oracle Services For Microsoft Transaction Server.

Tim Diekmann
  • 7,755
  • 11
  • 41
  • 69
Krptodr
  • 139
  • 13