SAP SLD – Comparison method violates its general contract!

Action fails when You trying to register a system in the System Landscape Directory (SLD). In the sld log You can find below error…

#23 XX/28/20XX 10:54:30.361 [SLD Data Supplier Processing] ERROR com.sap.lcr.sagent.BuilderDirector: Unexpected error during processing of supplied data.
Thrown:
java.lang.IllegalArgumentException: Comparison method violates its general contract!
at java.util.TimSort.mergeLo(TimSort.java:777)
at java.util.TimSort.mergeAt(TimSort.java:514)
at java.util.TimSort.mergeCollapse(TimSort.java:441)
at java.util.TimSort.sort(TimSort.java:245)
at java.util.Arrays.sort(Arrays.java:1512)
at java.util.ArrayList.sort(ArrayList.java:1462)
at java.util.Collections.sort(Collections.java:177)
at com.sap.lcr.sagent.specificbuilder.SupplierUtil.getSortedClone(SupplierUtil.java:781)
at com.sap.lcr.sagent.specificbuilder.SupplierUtil.getFingerprint(SupplierUtil.java:579)
at com.sap.lcr.sagent.specificbuilder.AbstractBuilder.work(AbstractBuilder.java:312)
at com.sap.lcr.sagent.specificbuilder.BCSystemBuilder.work(BCSystemBuilder.java:35)
at com.sap.lcr.sagent.BuilderDirector.performLocalWork(BuilderDirector.java:833)
at com.sap.lcr.sagent.BuilderDirector.performWork(BuilderDirector.java:664)
at com.sap.lcr.sagent.BuilderDirector.run(BuilderDirector.java:450)
at java.lang.Thread.run(Thread.java:836)

Solution

Open configtool (location: /usr/sap/<SID>/<InstanceID>/j2ee/configtool) and add parameter: “-Djava.util.Arrays.useLegacyMergeSort” with value “true“. Below more details:

Configtool

At the end restart java server and next try once again register system in SLD. Now everything should be OK.

Copyright © 2023. SAPBasisWorld.com Privacy Policy