New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Command info: Comparison method violates its general contract! #1575
Comments
Hi Axel, I noticed, that the milestone for this issue has been changed to 5.0.0. For that reason we are forced to remain with all of our customers on Version 3.2.1, because we are responsible for the reliability of our delivered software (including database). Please don't hesitate to contact me here, if you need additional information concerning this issue. Best regards. |
I believe this is related to a change in the way Java performs sorting: http://www.oracle.com/technetwork/java/javase/compatibility-417013.html#source To circumvent this issue in the short term I added the following parameter to the flyway java command line: -Djava.util.Arrays.useLegacyMergeSort=true I suspect the reason why 3.21 works is because it's bundled with an earlier JAVA version? |
I am getting this error too, but I don't know how to apply this suggested short term fix. Sorry, a noob question: where is the "flyway java command line" ? I have flyway installed on an Ubuntu 14.04 headless server. |
Edit the file 'flyway' Add the parameters to the end of the JAVA_ARGS line |
Here an extract of the file 'flyway' to clarify: ... |
By the way, thanks to junkmanuk. @axelfontaine : |
Sorry for the brevity of my response - was on mobile - pleased it helps as much as it helped me! I'd try to submit a bug fix but I'm not a Java dev by trade and tbh the whole transitive thing confused the heck out of me! |
Worked! Thank you both! |
What version of Flyway are you using?
4.1.2
Which client are you using? (Command-line, Java API, Maven plugin, Gradle plugin, SBT plugin, ANT tasks)
Command-line
What database are you using (type & version)?
Oracle Database 12c Enterprise Edition Release 12.1.0.2.0 - 64bit Production
What operating system are you using?
Windows 7 Professional Service Pack 1
What did you do?
(Please include the content causing the issue, any relevant configuration settings, and the command you ran)
There exist several normal successful migrations in the database, which have been executed with flyway Version 3.2.1.
Now i want to proceed with some new migrations using flyway Version 4.1.2.
Before doing that I ran the command "flyway.cmd info" and receive the error message:
ERROR: java.lang.IllegalArgumentException: Comparison method violates its general contract!
Note:
To reproduce the error, please find attached a zip-file containing:
flyway_bug.zip
What did you expect to see?
The normal info-Output.
What did you see instead?
This error message:
ERROR: java.lang.IllegalArgumentException: Comparison method violates its general contract!
The text was updated successfully, but these errors were encountered: