Problem:
Bpel via dbadapter calls a API using XA Datasource.
The DB Adapter fails with the following exception:
ORA-20001: Oracle error -2074: ORA-02074: cannot SET NLS in a distributed transaction has been detected in fnd_global.set_nls.set_parameter('NLS_LANGUAGE','AMERICAN'). has been detected in fnd_global.set_nls.
ORA-06512: at "APPS.XXSON_PLYS_AGILE_TO_EBS", line 162 ORA-06512: at line 1
Check to ensure that the API is defined in the database and that the parameters match the signature of the API.
This exception is considered not retriable, likely due to a modelling mistake.
To classify it as retriable instead add property nonRetriableErrorCodes with value "-20001" to your
deployment descriptor (i.e. weblogic-ra.xml). To auto retry a retriable fault set these composite.xml properties for
this invoke: jca.retry.interval, jca.retry.count, and jca.retry.backoff. All properties are integers. ".
The invoked JCA adapter raised a resource exception.
Please examine the above error message carefully to determine a resolution.
Solution:
1) Change the Datasource to NON XA.
2) If for some reason you are not in a position to change it to Non XA, then look for the below code in the API causing this issue and comment it.
FND_GLOBAL.APPS_INITIALIZE(xxxx,yyyy,zzz);