IBM Support

paymentCollection agent fails with java.lang.IllegalArgumentException

Troubleshooting


Problem

Attempt to run paymentCollection agent fails with the error java.lang.IllegalArgumentException in IBM Sterling Order Management.

Symptom

The paymentCollection agent fails with the below error:

Caused by: java.lang.IllegalArgumentException: Comparison method
violates its general contract!
       at java.util.TimSort.mergeHi(TimSort.java:879)
       at java.util.TimSort.mergeAt(TimSort.java:496)
       at java.util.TimSort.mergeForceCollapse(TimSort.java:437)
       at java.util.TimSort.sort(TimSort.java:234)
       at java.util.TimSort.sort(TimSort.java:184)
       at java.util.Arrays.sort(Arrays.java:670)
       at java.util.Collections.sort(Collections.java:228)
       at com.yantra.omp.business.payment.YFSRefundManager.
reduceOpenAuthorization(YFSRefundManager.java:635)
       at com.yantra.omp.business.payment.YFSRefundManager.
reduceOpenAuthorizations(YFSRefundManager.java:627)
       at com.yantra.omp.business.payment.YFSRefundManager.
handleNegativeAuthAmount(YFSRefundManager.java:619)
       at com.yantra.omp.business.payment.YFSRequestCollection.
handleNegativeAuth(YFSRequestCollection.java:689)
       at com.yantra.omp.business.payment.YFSRequestCollection.
requestCollection(YFSRequestCollection.java:373)
       at com.yantra.omp.business.payment.YFSRequestCollection.
requestCollection(YFSRequestCollection.java:219)

Cause

The latest Java version changes on the comparator algorithm.

Resolving The Problem

Include the system property as java.util.Arrays.useLegacyMergeSort=true

This property can be set as an environment variable.

Related Information

[{"Product":{"code":"SS6PEW","label":"IBM Sterling Order Management"},"Business Unit":{"code":"BU048","label":"IBM Software"},"Component":"Distributed Order Management","Platform":[{"code":"PF002","label":"AIX"},{"code":"PF010","label":"HP-UX"},{"code":"PF016","label":"Linux"},{"code":"PF027","label":"Solaris"},{"code":"PF033","label":"Windows"}],"Version":"9.2.1;9.2","Edition":"","Line of Business":{"code":"LOB59","label":"Sustainability Software"}},{"Product":{"code":"SS6PEW","label":"IBM Sterling Order Management"},"Business Unit":{"code":"BU048","label":"IBM Software"},"Component":" ","Platform":[{"code":"PF010","label":"HP-UX"},{"code":"PF016","label":"Linux"},{"code":"PF027","label":"Solaris"},{"code":"PF033","label":"Windows"}],"Version":"9.4;9.3","Edition":"","Line of Business":{"code":"LOB59","label":"Sustainability Software"}}]

Document Information

Modified date:
10 May 2022

UID

swg21883783