CSC Cloning/returns Failing with Connection time out

There is bug that has been introduced in ATG 11 pertaining to CSC Clone order. If we try to clone order which has coupons associated with it, It will fail to copy most of the times.

When Performing returns/Copy order we generally perform Cloning of the Order in CSC and Work on the Cloned order. When doing this operation it generally takes more time and it fails if it was not able to fetch the details in Specific time frame.

Below is the error that is been Seen in the logs.

Error Tue Nov 29 16:29:59 EST 2016 1480454999909 /atg/dynamo/servlet/pipeline/RequestScopeManager/RequestScope-103429/atg/commerce/custsvc/returns/StartReturnExchangeProcess Caused by (#5):java.lang.RuntimeException: CONTAINER:atg.repository.RepositoryException; SOURCE:java.sql.SQLException: Unexpected exception while enlisting XAConnection java.sql.SQLException: XA error: XAResource.XAER_NOTA start() failed on resource 'SwitchB': XAER_NOTA : The XID is not valid 
Error Tue Nov 29 16:29:59 EST 2016 1480454999909 /atg/dynamo/servlet/pipeline/RequestScopeManager/RequestScope-103429/atg/commerce/custsvc/returns/StartReturnExchangeProcess oracle.jdbc.xa.OracleXAException 
Error Tue Nov 29 16:29:59 EST 2016 1480454999909 /atg/dynamo/servlet/pipeline/RequestScopeManager/RequestScope-103429/atg/commerce/custsvc/returns/StartReturnExchangeProcess at oracle.jdbc.xa.OracleXAResource.checkError(OracleXAResource.java:1110) 

Error Tue Nov 29 16:29:59 EST 2016 1480454999909 /atg/dynamo/servlet/pipeline/RequestScopeManager/RequestScope-103429/atg/commerce/custsvc/returns/StartReturnExchangeProcess at oracle.jdbc.xa.client.OracleXAResource.start(OracleXAResource.java:240)

The above error Occurs when we are trying to Interact with Multiple Datasources. In our case it will be ProductionDS and SwitchBDS.

We all know that the Order is present in ProductionDS not in the CatalogSchema so when we try to clone the order then we will try to interact with single DataSource. But there is External repository references like PriceLists, pricingModels which often Point to external repositories like Catalog repositories which requires External Database interaction.

This action may take long time to retrieve the results in a single transaction and throws this exception.

This external interactions are been removed from cloning in earlier versions of ATG but was not done in ATG11.

Solution:
In CSC config path add below properties.
/atg/commerce/custsvc/returns/CloneReturnWorkingOrder 

excludedOrderProperties=\ 
itemPriceInfo=priceList,\ 
pricingAdjustment=coupon|pricingModel 

This Bug is Specifically in ATG 11.X and this is fixed in Earlier versions of ATG. 

 

Comments

Popular posts from this blog

ATG Database Tables

ATG BCC Users Roles

Resetting the Dynamo Admin password