Uploaded image for project: 'Thorntail'
  1. Thorntail
  2. THORN-1809

ManifestComparator violates Comparator contract

    Details

    • Story Points:
      10

      Description

      After upgrading to 2018.1.0 Swarm throws following Exception at startup:

      java.lang.RuntimeException: java.lang.IllegalArgumentException: Comparison method violates its general contract!
              at org.wildfly.swarm.spi.api.ClassLoading.withTCCL(ClassLoading.java:45)
              at org.wildfly.swarm.container.runtime.ServerBootstrapImpl.bootstrap(ServerBootstrapImpl.java:113)
              at org.wildfly.swarm.Swarm.start(Swarm.java:398)
              at org.wildfly.swarm.Swarm.main(Swarm.java:742)
              at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
              at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:62)
              at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43)
              at java.lang.reflect.Method.invoke(Method.java:498)
              at org.wildfly.swarm.bootstrap.MainInvoker.invoke(MainInvoker.java:53)
              at org.wildfly.swarm.bootstrap.Main.run(Main.java:132)
              at org.wildfly.swarm.bootstrap.Main.main(Main.java:85)
      Caused by: 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 org.wildfly.swarm.bootstrap.env.ApplicationEnvironment.loadFractionManifestsFromUberjar(ApplicationEnvironment.java:247)
              at org.wildfly.swarm.bootstrap.env.ApplicationEnvironment.fractionManifests(ApplicationEnvironment.java:427)
              at org.wildfly.swarm.container.runtime.ServerBootstrapImpl.logFractions(ServerBootstrapImpl.java:169)
              at org.wildfly.swarm.container.runtime.ServerBootstrapImpl.lambda$bootstrap$1(ServerBootstrapImpl.java:117)
              at org.wildfly.swarm.spi.api.ClassLoading.withTCCL(ClassLoading.java:43)
              ... 10 more
      

      I guess that this has to do with my setup using gradle without bundled dependencies and might be due to SWARM-1527, which adresses incorrectly resolved dependencies when using the gradle plugin. Chances are the comparator would not violate the contract if dependencies were resolved correctly.

        Gliffy Diagrams

          Attachments

            Issue Links

              Activity

                People

                • Assignee:
                  Unassigned
                  Reporter:
                  mzellhofer Maximilian Zellhofer
                • Votes:
                  0 Vote for this issue
                  Watchers:
                  1 Start watching this issue

                  Dates

                  • Created:
                    Updated:
                    Resolved: