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

Searched on Google with the first line of a JAVA stack trace?

We can recommend more relevant solutions and speed up debugging when you paste your entire stack trace with the exception message. Try a sample exception.

Recommended solutions based on your search

Samebug tips

Do you know how to solve this issue? Write a tip to help other users and build your expert profile.

Solutions on the web

via GitHub by dosumis
, 1 year ago
Comparison method violates its general contract!
via Stack Overflow by user3749123
, 6 months ago
Comparison method violates its general contract!
via GitHub by rkapsi
, 10 months ago
Comparison method violates its general contract!
via Stack Overflow by user1818410
, 1 year ago
Comparison method violates its general contract!
via Stack Overflow by Show Stopper
, 5 months ago
Comparison method violates its general contract!
via Stack Overflow by Thomas Baer
, 2 years ago
Comparison method violates its general contract!
java.lang.IllegalArgumentException: Comparison method violates its general contract!
at java.util.ComparableTimSort.mergeLo(ComparableTimSort.java:740)
at java.util.ComparableTimSort.mergeAt(ComparableTimSort.java:477)
at java.util.ComparableTimSort.mergeCollapse(ComparableTimSort.java:402)
at java.util.ComparableTimSort.sort(ComparableTimSort.java:209)
at java.util.Arrays.sort(Arrays.java:1312)
at java.util.Arrays.sort(Arrays.java:1506)
at java.util.ArrayList.sort(ArrayList.java:1454)
at java.util.Collections.sort(Collections.java:141)
at org.semanticweb.owlapi.util.CollectionFactory.sortOptionally(CollectionFactory.java:111)
at org.coode.owlapi.functionalrenderer.OWLObjectRenderer.writeAxioms(OWLObjectRenderer.java:342)
at org.coode.owlapi.functionalrenderer.OWLObjectRenderer.visit(OWLObjectRenderer.java:265)
at uk.ac.manchester.cs.owl.owlapi.OWLOntologyImpl.accept(OWLOntologyImpl.java:1516)
at org.coode.owlapi.functionalrenderer.OWLFunctionalSyntaxOntologyStorer.storeOntology(OWLFunctionalSyntaxOntologyStorer.java:90)
at org.semanticweb.owlapi.util.AbstractOWLOntologyStorer.store(AbstractOWLOntologyStorer.java:182)
at org.semanticweb.owlapi.util.AbstractOWLOntologyStorer.storeOntology(AbstractOWLOntologyStorer.java:126)
at uk.ac.manchester.cs.owl.owlapi.OWLOntologyManagerImpl.saveOntology(OWLOntologyManagerImpl.java:1001)
at owltools.io.ParserWrapper.saveOWL(ParserWrapper.java:226)
at owltools.cli.CommandRunner.runSingleIteration(CommandRunner.java:3062)
at owltools.cli.CommandRunnerBase.run(CommandRunnerBase.java:76)
at owltools.cli.CommandRunnerBase.run(CommandRunnerBase.java:68)
at owltools.cli.CommandLineInterface.main(CommandLineInterface.java:12)

Users with the same issue

Samebug visitor profile picture
Unknown user
Once, 1 year ago
Samebug visitor profile picture
Unknown user
Once, 1 month ago
Samebug visitor profile picture
Unknown user
Once, 8 months ago
Samebug visitor profile picture
Unknown user
Once, 11 months ago
Samebug visitor profile picture
Unknown user
Once, 1 year ago

Write tip

Know the solutions? Share your knowledge to help other developers to debug faster.