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

Exception occurs while column sorting in drilled down report

SA-8840

Summary



Post migration of the IBM JVM from JAVA 6 to JAVA 7, an exception is thrown on sorting column in the detailed view drilled down of a summary view, .

Error Messages



Status fail
Message Comparison method violates its general contract!
Timestamp Fri Apr 10 09:07:46 GMT 2015
Engine Version PegaRULES 6.1 SP2 (coreBuild_060120_0161)

Log Entries
==========
Caused by:
java.lang.IllegalArgumentException: Comparison method violates its general contract!
at java.util.TimSort.mergeLo(TimSort.java:758)
at java.util.TimSort.mergeAt(TimSort.java:494)
at java.util.TimSort.mergeCollapse(TimSort.java:419)
at java.util.TimSort.sort(TimSort.java:225)
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.pega.pegarules.data.internal.access.RdbCachedRowSet.sort(RdbCachedRowSet.java:183)
at com.pega.pegarules.data.internal.access.DatabaseRowSet.sort(DatabaseRowSet.java:602)
at com.pega.pegarules.data.internal.access.VirtualPageListImpl.sort(VirtualPageListImpl.java:141)
at com.pega.pegarules.data.internal.clipboard.ClipboardPropertyImpl.sortVirtualPageList(ClipboardPropertyImpl.java:4661)
at com.pega.pegarules.data.internal.clipboard.SorterImpl.sortPageList(SorterImpl.java:160)
at com.pega.pegarules.data.internal.clipboard.SorterImpl$StaticHelper.sortPageList(SorterImpl.java:317)
at com.pega.pegarules.data.external.clipboard.Sorter.sortPageList(Sorter.java:45)
at com.pega.pegarules.session.internal.mgmt.Executable.sortPageList(Executable.java:4761)
at com.pegarules.generated.activity.ra_action_sortddcolumn_ca78a73a20f0810a43dc4b9beed11bb4.step4_circum0(ra_action_sortddcolumn_ca78a73a20f0810a43dc4b9beed11bb4.java:439)
at com.pegarules.generated.activity.ra_action_sortddcolumn_ca78a73a20f0810a43dc4b9beed11bb4.perform(ra_action_sortddcolumn_ca78a73a20f0810a43dc4b9beed11bb4.java:126)
at com.pega.pegarules.session.internal.mgmt.Executable.doActivity(Executable.java:3502)
at com.pega.pegarules.session.internal.mgmt.base.ThreadRunner.runActivitiesAlt(ThreadRunner.java:620)


Steps to Reproduce



1. Create a summary view report (Timelines by operator ). Drilled down to detailed view.
2. Create a portal and provide a link to access the report from reports tab.
3. After accessing the summary view (Timeliness by operator) click on drilled down view.
4. After sorting few of the columns, exception is displayed in the pop-up window.

Deployment Scenario:
  • Pega Version: PegaRULES 6.1 SP2 (coreBuild_060120_0161)
  •  
  • New Evergreening SIT Env with below JAVA version:
JRE 1.7.0 Linux amd64-64 Compressed References 20130421_145945 (JIT enabled, AOT enabled) J9VM - R26_Java726_SR4_FP1_2_20130421_2353_B145945 JIT - r11.b03_20130131_32403ifx4 GC - R26_Java726_SR4_FP1_2_20130421_2353_B145945_CMPRSS J9CL - 20130422_145945

Root Cause



The root cause of this problem is defect/misconfiguration in the operating environment. 

The Issue occurs due to upgrade from the JDK version from 1.6 to 1.7 at user's end.

As of Java 7, the default sort algorithm has changed from MergeSort to TimSort. TimSort is apparently more sensitive to the way the compareTo functions are implemented. If inconsistencies in the results are allowed, the following exception can be thrown:

Resolution



The Solution  is to revert you back to the old MergeSort  of JAVA SE 6.

Following JVM property is required:   -Djava.util.Arrays.useLegacyMergeSort=true.  

For more information refer to Platform Support Guide at page 10 : https://pdn.pega.com/documents/platform-support-guide

Published June 15, 2015 - 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?

Want to help us improve this content?

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
Contact us