Skip to main content

Posts

Showing posts from July, 2015

IllegalArgumentException in Simulations

At times, users have reported of runtime exceptions while running a simulation that uses PRoPHET. The error signature looks like the following. Exception in thread "main" java.lang. IllegalArgumentException : Comparison method violates its general contract! at java.util. TimSort .mergeHi( Unknown Source) at java.util.TimSort.mergeAt( Unknown Source) at java.util.TimSort. mergeCollapse(Unknown Source) at java.util.TimSort.sort(Unknown Source) at java.util.Arrays.sort(Unknown Source) at java.util.ArrayList.sort( Unknown Source) at java.util.Collections.sort( Unknown Source) It may be noted that the default sorting algorithm has changed since Java 7 — rather than Merge sort, Tim sort is now used by default. However, it seems like it is possible to override the default sorting algorithm in Java using the following argument to the JVM. -Djava.util.Arrays.useLegacyMergeSort=true The execution command in the one.sh (or one.bat) file should be up