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

Solutions on the web

via YouTrack by Unknown author, 1 year ago
Comparison method violates its general contract!
via GitHub by wilfglover
, 4 months ago
Comparison method violates its general contract!
via GitHub by rhwood
, 1 year ago
Comparison method violates its general contract!
via Stack Overflow by happy
, 2 years ago
Comparison method violates its general contract!
via Stack Overflow by math_law
, 2 years ago
Comparison method violates its general contract!
via Stack Overflow by Sahib Singh Budhiraja
, 5 months ago
Comparison method violates its general contract!
java.lang.IllegalArgumentException: Comparison method violates its general contract!
at java.util.TimSort.mergeHi(TimSort.java:899)
at java.util.TimSort.mergeAt(TimSort.java:516)
at java.util.TimSort.mergeForceCollapse(TimSort.java:457)
at java.util.TimSort.sort(TimSort.java:254)
at java.util.Arrays.sort(Arrays.java:1512)
at java.util.ArrayList.sort(ArrayList.java:1454)
at java.util.Collections.sort(Collections.java:175)
at jetbrains.buildServer.torrent.seeder.TorrentFilesDB.getSortedKeys(TorrentFilesDB.java:166)
at jetbrains.buildServer.torrent.seeder.TorrentFilesDB.flush(TorrentFilesDB.java:139)
at jetbrains.buildServer.torrent.seeder.TorrentsSeeder.flushTorrentsDB(TorrentsSeeder.java:127)
at jetbrains.buildServer.torrent.seeder.TorrentsSeeder.registerSrcAndTorrentFile(TorrentsSeeder.java:87)
at jetbrains.buildServer.torrent.ServerTorrentsDirectorySeeder.processArtifactInternal(ServerTorrentsDirectorySeeder.java:190)
at jetbrains.buildServer.torrent.ServerTorrentsDirectorySeeder.processArtifactInternal(ServerTorrentsDirectorySeeder.java:181)
at jetbrains.buildServer.torrent.ServerTorrentsDirectorySeeder$4.processBuildArtifact(ServerTorrentsDirectorySeeder.java:169)
at jetbrains.buildServer.serverSide.impl.artifacts.BuildArtifactsImpl.iterate(BuildArtifactsImpl.java:61)
at jetbrains.buildServer.serverSide.impl.artifacts.BuildArtifactsImpl.iterateArtifacts(BuildArtifactsImpl.java:52)
at jetbrains.buildServer.torrent.ServerTorrentsDirectorySeeder.announceBuildArtifacts(ServerTorrentsDirectorySeeder.java:166)
at jetbrains.buildServer.torrent.ServerTorrentsDirectorySeeder.access$300(ServerTorrentsDirectorySeeder.java:35)
at jetbrains.buildServer.torrent.ServerTorrentsDirectorySeeder$1.buildFinished(ServerTorrentsDirectorySeeder.java:73)
at sun.reflect.GeneratedMethodAccessor358.invoke(Unknown Source)
at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43)
at java.lang.reflect.Method.invoke(Method.java:498)
at jetbrains.buildServer.util.EventDispatcher.dispatch(EventDispatcher.java:120)
at jetbrains.buildServer.serverSide.ServerSideEventDispatcher.superDispatch(ServerSideEventDispatcher.java:59)
at jetbrains.buildServer.serverSide.ServerSideEventDispatcher$1.run(ServerSideEventDispatcher.java:49)
at jetbrains.buildServer.serverSide.impl.auth.SecurityContextImpl.runAs(SecurityContextImpl.java:118)
at jetbrains.buildServer.serverSide.impl.auth.SecurityContextImpl.runAsSystem(SecurityContextImpl.java:102)
at jetbrains.buildServer.serverSide.ServerSideEventDispatcher.dispatch(ServerSideEventDispatcher.java:47)
at com.sun.proxy.$Proxy19.buildFinished(Unknown Source)
at jetbrains.buildServer.serverSide.impl.RunningBuildsManagerImpl.finishBuild(RunningBuildsManagerImpl.java:226)
at jetbrains.buildServer.serverSide.impl.RunningBuildsManagerImpl.access$500(RunningBuildsManagerImpl.java:37)
at jetbrains.buildServer.serverSide.impl.RunningBuildsManagerImpl$6.run(RunningBuildsManagerImpl.java:588)
at java.util.concurrent.Executors$RunnableAdapter.call(Executors.java:511)
at java.util.concurrent.FutureTask.run(FutureTask.java:266)
at java.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1142)
at java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:617)
at java.lang.Thread.run(Thread.java:745)

Users with the same issue

Once, 1 year ago
3 times, 1 year ago
6 times, 1 year ago
Samebug visitor profile picture
Unknown user
Once, 3 months ago
Samebug visitor profile picture
Unknown user
Once, 10 months ago

Write tip

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