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
Was this topic helpful?
Document Information
Modified date:
10 May 2022
UID
swg21883783