ImportDomainSecurity throws "java.lang.IllegalArgumentException: Comparison method violates its general contract!"

ImportDomainSecurity throws "java.lang.IllegalArgumentException: Comparison method violates its general contract!"

book

Article ID: KB0086458

calendar_today

Updated On:

Products Versions
TIBCO Administrator -
Not Applicable -

Description

Resolution:
Description:
============
ImportDomainSecurity while importing users and roles in Domain throws the following error when configured with Java Runtime Environment (JRE) 1.7.
============
java.lang.IllegalArgumentException: Comparison method violates
============


Environment:
===========
TIBCO Runtime Agent 5.8.x
Java Development Kit (JDK) 1.7.x


Cause:
===========
This is JRE 1.7.0 compatibility issue with new Merge Sort algorithm implementation and API changes . File "TRA-3149" for this known compatibility issue.

Workaround:
============
If the previous behavior is desired, use the new system property, java.util.Arrays.useLegacyMergeSort, to restore the previous mergesort behavior.
As workaround on your Environment can you add following to ImportDomainSecurity.tra to resolves the issue:
-----------------------------------------------------
java.extended.properties=-Djava.util.Arrays.useLegacyMergeSort=true
-----------------------------------------------------


Reference:
-----------------------------------------------------
http://www.oracle.com/technetwork/java/javase/compatibility-417013.html#source
Area: API: Utilities
Synopsis: Updated sort behavior for Arrays and Collections may throw an IllegalArgumentException
Description: The sorting algorithm used by java.util.Arrays.sort and (indirectly) by java.util.Collections.sort has been replaced. The new sort implementation may throw an IllegalArgumentException if it detects a Comparable that violates the Comparable contract. The previous implementation silently ignored such a situation.
If the previous behavior is desired, you can use the new system property, java.util.Arrays.useLegacyMergeSort, to restore previous mergesort behavior.
Nature of Incompatibility: behavioral
RFE: 6804124
-----------------------------------------------------

Issue/Introduction

ImportDomainSecurity throws "java.lang.IllegalArgumentException: Comparison method violates its general contract!"