Project

General

Profile

Actions

Task #2167

closed

Remove "useLegacyMergeSort=true" from Tomcat unit configuration

Added by Luděk Urban about 4 years ago. Updated almost 4 years ago.

Status:
Closed
Priority:
Normal
Assignee:
Luděk Urban
Category:
Database
Target version:
Start date:
03/31/2020
Due date:
% Done:

100%

Estimated time:
Owner:

Description

In IdM installation tutorial there is added "-Djava.util.Arrays.useLegacyMergeSort=true" into environment variable.
Without this configuration IDM failed to start because of Flyway bug.

  • Test if this configurations is still needed and remove it when is not.

Related issues

Related to IdStory Identity Manager - Task #1013: Application startup fails due to Flyway bugClosedRadek Tomiška03/06/2018

Actions
Actions #1

Updated by Ondřej Kopr about 4 years ago

Beware that this flyway issue can appear randomly. For example application without this configuration works perfectly and after I deployed new version of my module the application doesn't start because:

Comparison method violates its general contract!

Why you want remove this configuration option?

Actions #2

Updated by Luděk Urban about 4 years ago

@kopro In IdM 10 flyway go upgraded. As a part of creating new IdM installation tutorial I want check if this bug still happening.

Actions #3

Updated by Vít Švanda about 4 years ago

As @kopro wrote, this error occurred very randomly, so your testing (without error) may not confirm that the error no longer occurs.

Actions #4

Updated by Radek Tomiška about 4 years ago

  • Category set to Database

As @kopro wrote, so is needed to reproduce this issue reliably (repetitively) - e.g. by upgrade from 9.4 -> 9.7.x (issue occurs every time) and then try to 9.4 -> 10.x (without issue occurs).

Actions #6

Updated by Luděk Urban almost 4 years ago

I tested upgrading idm from v 9.4.0.
Before every test I droped database and clear /idm directory in webapps. After v 9.4.0 started I created a test user.
Tomcat didn't start with "-Djava.util.Arrays.useLegacyMergeSort=true".

  • test1
    9.4.0 -> 9.7.16 Fail
    9.7.16 -> 10.2.0 success
    After successful deploy of 9.4.0 I try deploy v. 9.7.16. It fails with
    Error creating bean with name 'flywayCore' defined in class path resource [eu/bcvsolutions/idm/core/config/flyway/CoreFlywayConfig.class]: 
    Initialization of bean failed; nested exception is java.lang.IllegalArgumentException: Comparison method violates its general contract!
    

    Then I try deploy v. 10.2.0 and it was successful.
  • test2 - tested 4x times
    9.4.0 -> 9.7.16 Fail
    9.7.16 -> 10.3.1 success
    After successful deploy of 9.4.0 I try deploy v. 9.7.16. It fails with
    Error creating bean with name 'flywayCore' defined in class path resource [eu/bcvsolutions/idm/core/config/flyway/CoreFlywayConfig.class]: 
    Initialization of bean failed; nested exception is java.lang.IllegalArgumentException: Comparison method violates its general contract!
    

    Then I try deploy newest version of IdM - 10.3.1 and it was successful.
  1. test3
    -> 9.7.16 success
    I try deploy v 9.7.16 to be sure that 9.7.x will ever deploy on my test. And it was successful.
  1. test4
    9.4.0 -> 10.3.1 success
    After successful deploy of 9.4.0 I try deploy directly v. 10.3.1 and it was successful.
  1. test5
    9.4.0 -> 9.7.16 success
    To check everything I tried deploy with legacy merge sort option in tomcat.
    After successful deploy of 9.4.0 I try deploy v. 9.7.16. it was successful.

-------
It looks like that in new flyway was issue with flywayCore fixed.

Actions #7

Updated by Radek Tomiška almost 4 years ago

Awesome! I agree, this known issue can be removed, good job.

Actions #8

Updated by Luděk Urban almost 4 years ago

  • Status changed from New to Resolved

In windows IdM installation tutorial and in prepared IdM installation tutorial for centos8 I removed

-Djava.util.Arrays.useLegacyMergeSort=true

Everything is finished - ticket is resolved

Actions #9

Updated by Radek Tomiška almost 4 years ago

  • Target version set to 10.4.0
Actions #10

Updated by Radek Tomiška almost 4 years ago

  • Status changed from Resolved to In Progress
  • % Done changed from 0 to 70
Actions #11

Updated by Luděk Urban almost 4 years ago

  • Status changed from In Progress to Resolved
  • % Done changed from 70 to 100
Actions #12

Updated by Radek Tomiška almost 4 years ago

  • Related to Task #1013: Application startup fails due to Flyway bug added
Actions #13

Updated by Radek Tomiška almost 4 years ago

  • Status changed from Resolved to Closed
Actions

Also available in: Atom PDF