Skip to main content

This content has been archived and is no longer being updated. Links may not function; however, this content may be relevant to outdated versions of the product.

Support Article

XAException encountered during prepare phase for transaction

SA-43350

Summary



When a message is added in the JMS queue, the below error displays and the listener stops. The environment runs Pega 7.2.2 on Websphere 8.5.5 and Java 7.


Error Messages



0000083d RegisteredRes E WTRN0063E: An illegal attempt to commit a one phase capable resource with existing two phase capable resources has occurred.
0000083d RegisteredRes E WTRN0086I: XAException encountered during prepare phase for transaction 0000015E2A04E43200000001274869BCC1E21E55DD0C37E3A51F9E3FA79BC180D7C4E02D0000015E2A04E43200000001274869BCC1E21E55DD0C37E3A51F9E3FA79BC180D7C4E02D00000001. Local resources follow.
0000083d JTAResourceBa I WTRN0089I: LocalTransactionWrapper@:ab896637 localTransaction:com.ibm.ws.rsadapter.spi.WSRdbSpiLocalTransactionImpl@147b94c0 enlisted:trueHas Tran Rolled Back = false registeredForSynctruemcWrapper.hashcode()1137983592: Vote: none.
0000083d JTAResourceBa I WTRN0089I: com.ibm.mq.connector.xa.XARWrapper@b6cf57d6: Vote: commit.
0000083d SibMessage W [:] CWSJY0003W: MQJCA4018: MessageEndpoint afterDelivery() call failed with: 'afterDelivery failure'.


Steps to Reproduce

  1. Set up a JMS MDB Listener.
  2. Attempt to have it pick a message on the queue.


Root Cause



An issue in the custom application code or rules where two resources are participating in the Global Transaction, one being XA-enabled and other LocalTransaction.

Resolution



Perform the following two local-changes.

Resolution 1: Enable Last Participant Support (LPS) so that a single one-phase commit resource is used with any number of two-phase commit resources in the same global transaction.

Set the ACCEPT_HEURISTIC_HAZARD custom property to true in the Integrated Solutions Console and then restart the application server.

To enable server-wide LPS, perform the below steps:

1. Open the Integrated Solutions Console.
2. Click Servers > Server Types > WebSphere application servers and the server name. The properties page for the application server opens.
3. Under Container Settings, expand Container Services and click Transaction Service. The properties page for the transaction service opens.
4. Under Additional Properties, click Custom properties.
5. On the Custom Properties page, click New and type ACCEPT_HEURISTIC_HAZARD as the Name and TRUE as the Value.
6. Click Apply and Save directly to the master configuration.
7. Restart the application server.

Resolution 2: Set transaction-type to Bean in ejb-jar.xml

<message-driven id="MessageDriven_PricingRequestListener">
<description>Message Driven Bean for JMS Listener PricingRequestListener</description>
<ejb-name>PricingRequestListener</ejb-name>
<ejb-class>com.pega.pegarules.internal.etier.mdb.PRJMSListenerBoot</ejb-class>
<transaction-type>Container</transaction-type>


Use <transaction-type>Bean</transaction-type> and set UseCMT to "false".

The UseCMT environment entry lets PRPC know which engine to pick and transaction-type is for the application server.


Published October 19, 2017 - Updated October 8, 2020

Was this useful?

0% found this useful

Have a question? Get answers now.

Visit the Collaboration Center to ask questions, engage in discussions, share ideas, and help others.

Did you find this content helpful?

We'd prefer it if you saw us at our best.

Pega Community has detected you are using a browser which may prevent you from experiencing the site as intended. To improve your experience, please update your browser.

Close Deprecation Notice