Task #2167
closedRemove "useLegacyMergeSort=true" from Tomcat unit configuration
100%
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
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?
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.
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.
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).
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 withError 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 withError 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.
- 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.
- 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.
- 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.
Updated by Radek Tomiška almost 4 years ago
Awesome! I agree, this known issue can be removed, good job.
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
Updated by Radek Tomiška almost 4 years ago
- Status changed from Resolved to In Progress
- % Done changed from 0 to 70
I found the note about flyway forgotten on two places:
https://wiki.czechidm.com/devel/documentation/known_issues
https://github.com/bcvsolutions/CzechIdMng/tree/develop/Realization/backend#known-issues
Updated by Luděk Urban almost 4 years ago
- Status changed from In Progress to Resolved
- % Done changed from 70 to 100
I removed Flayway issue from know issues
https://wiki.czechidm.com/devel/documentation/application_configuration/dev/backend#configure_environment_properties
https://wiki.czechidm.com/devel/documentation/known_issues
https://github.com/bcvsolutions/CzechIdMng/tree/develop/Realization/backend#known-issues
Changed and merged to develop
Changed in all devel documentation. -> Resolved
Updated by Radek Tomiška almost 4 years ago
- Related to Task #1013: Application startup fails due to Flyway bug added
Updated by Radek Tomiška almost 4 years ago
- Status changed from Resolved to Closed