[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index] [List Home]
Re: [egit-dev] [jgit-dev] Build error on JDK 7 for mvn with jgit packaging pom

2012/1/18 Robin Stocker <robin@xxxxxxxxx>
Hi there,

Just a note to people using JDK 7 as default.

When building jgit using the following command line:

Âmvn -f org.eclipse.jgit.packaging/pom.xml clean install

The following error may occur:

Caused by: java.lang.IllegalArgumentException: Comparison method violates its general contract!
   Âat java.util.ComparableTimSort.mergeLo(ComparableTimSort.java:714)
   Âat java.util.ComparableTimSort.mergeAt(ComparableTimSort.java:451)
   Âat java.util.ComparableTimSort.mergeCollapse(ComparableTimSort.java:376)
   Âat java.util.ComparableTimSort.sort(ComparableTimSort.java:182)
   Âat java.util.ComparableTimSort.sort(ComparableTimSort.java:146)
   Âat java.util.Arrays.sort(Arrays.java:472)
   Âat org.eclipse.equinox.internal.p2.artifact.repository.MirrorSelector.hasValidMirror(MirrorSelector.java:317)
   Â...

(Full stacktrace at end of mail.)

The problem is a bug in Equinox, here's the bug report:

Âhttps://bugs.eclipse.org/bugs/show_bug.cgi?id=317785

It's fixed, but jgit probably uses an older version of it via Tycho.

this should be fixed byÂhttps://git.eclipse.org/r/#/c/5596/ updating
the JGit build to use the latest Tycho version.Â

Though, I didn't test that yet.
Â
A work-around is to use JDK 6 for building or invoke mvn with the following
system property set:

Â_JAVA_OPTIONS=-Djava.util.Arrays.useLegacyMergeSort=true mvn ...

Should a note about this be added to the contributor guide?

Regards,
ÂRobin Stocker


Here's the full stack trace:


[ERROR] Internal error: java.lang.IllegalArgumentException: Comparison method violates its general contract! -> [Help 1]
org.apache.maven.InternalErrorException: Internal error: java.lang.IllegalArgumentException: Comparison method violates its general contract!
   Âat org.apache.maven.DefaultMaven.execute(DefaultMaven.java:170)
   Âat org.apache.maven.cli.MavenCli.execute(MavenCli.java:537)
   Âat org.apache.maven.cli.MavenCli.doMain(MavenCli.java:196)
   Âat org.apache.maven.cli.MavenCli.main(MavenCli.java:141)
   Âat sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
   Âat sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:57)
   Âat sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43)
   Âat java.lang.reflect.Method.invoke(Method.java:601)
   Âat org.codehaus.plexus.classworlds.launcher.Launcher.launchEnhanced(Launcher.java:290)
   Âat org.codehaus.plexus.classworlds.launcher.Launcher.launch(Launcher.java:230)
   Âat org.codehaus.plexus.classworlds.launcher.Launcher.mainWithExitCode(Launcher.java:409)
   Âat org.codehaus.plexus.classworlds.launcher.Launcher.main(Launcher.java:352)
Caused by: java.lang.IllegalArgumentException: Comparison method violates its general contract!
   Âat java.util.ComparableTimSort.mergeLo(ComparableTimSort.java:714)
   Âat java.util.ComparableTimSort.mergeAt(ComparableTimSort.java:451)
   Âat java.util.ComparableTimSort.mergeCollapse(ComparableTimSort.java:376)
   Âat java.util.ComparableTimSort.sort(ComparableTimSort.java:182)
   Âat java.util.ComparableTimSort.sort(ComparableTimSort.java:146)
   Âat java.util.Arrays.sort(Arrays.java:472)
   Âat org.eclipse.equinox.internal.p2.artifact.repository.MirrorSelector.hasValidMirror(MirrorSelector.java:317)
   Âat org.eclipse.equinox.internal.p2.artifact.repository.simple.SimpleArtifactRepository.downloadArtifact(SimpleArtifactRepository.java:517)
   Âat org.eclipse.equinox.internal.p2.artifact.repository.simple.SimpleArtifactRepository.getArtifact(SimpleArtifactRepository.java:576)
   Âat org.eclipse.equinox.internal.p2.artifact.repository.MirrorRequest.getArtifact(MirrorRequest.java:248)
   Âat org.eclipse.equinox.internal.p2.artifact.repository.MirrorRequest.transferSingle(MirrorRequest.java:223)
   Âat org.eclipse.equinox.internal.p2.artifact.repository.MirrorRequest.transfer(MirrorRequest.java:179)
   Âat org.eclipse.equinox.internal.p2.artifact.repository.MirrorRequest.perform(MirrorRequest.java:115)
   Âat org.eclipse.tycho.p2.maven.repository.MavenMirrorRequest.perform(MavenMirrorRequest.java:71)
   Âat org.eclipse.equinox.internal.p2.artifact.repository.simple.SimpleArtifactRepository.getArtifact(SimpleArtifactRepository.java:565)
   Âat org.eclipse.equinox.internal.p2.artifact.repository.simple.SimpleArtifactRepository.getArtifacts(SimpleArtifactRepository.java:616)
   Âat org.eclipse.equinox.internal.p2.artifact.repository.CompositeArtifactRepository.getArtifacts(CompositeArtifactRepository.java:305)
   Âat org.eclipse.equinox.internal.p2.artifact.repository.CompositeArtifactRepository.getArtifacts(CompositeArtifactRepository.java:305)
   Âat org.eclipse.equinox.internal.p2.artifact.repository.CompositeArtifactRepository.getArtifacts(CompositeArtifactRepository.java:305)
   Âat org.eclipse.tycho.p2.impl.resolver.P2ResolverImpl.resolveProject(P2ResolverImpl.java:338)
   Âat org.eclipse.tycho.p2.impl.resolver.P2ResolverImpl.resolveProject(P2ResolverImpl.java:293)
   Âat org.eclipse.tycho.p2.facade.P2TargetPlatformResolver.doResolvePlatform(P2TargetPlatformResolver.java:389)
   Âat org.eclipse.tycho.p2.facade.P2TargetPlatformResolver.resolvePlatform(P2TargetPlatformResolver.java:150)
   Âat org.eclipse.tycho.core.resolver.DefaultTychoDependencyResolver.resolveProject(DefaultTychoDependencyResolver.java:90)
   Âat org.eclipse.tycho.core.maven.TychoMavenLifecycleParticipant.afterProjectsRead(TychoMavenLifecycleParticipant.java:91)
   Âat org.apache.maven.DefaultMaven.doExecute(DefaultMaven.java:275)
   Âat org.apache.maven.DefaultMaven.execute(DefaultMaven.java:158)
   Â... 11 more
[ERROR]
[ERROR] To see the full stack trace of the errors, re-run Maven with the -e switch.
[ERROR] Re-run Maven using the -X switch to enable full debug logging.
[ERROR]
[ERROR] For more information about the errors and possible solutions, please read the following articles:
[ERROR] [Help 1] http://cwiki.apache.org/confluence/display/MAVEN/InternalErrorException
_______________________________________________
jgit-dev mailing list
jgit-dev@xxxxxxxxxxx
https://dev.eclipse.org/mailman/listinfo/jgit-dev



--
Matthias