Commonjava / betterdep-maven-plugin

A better alternative to maven-dependency-plugin
4 stars 2 forks source link

Stackoverflow error running on PME repository #7

Open rnc opened 9 years ago

rnc commented 9 years ago

Running on PME (as a test) SHA 9420bc5aab27be4aab78d79b8a4209b7e49170c2 with the command

mvn -Dmaven.repo.local=/tmp/foo2 org.commonjava.maven.plugins:betterdep-maven-plugin:0.8:list

gives me

Exception in thread "main" java.lang.StackOverflowError
        at java.util.regex.Pattern$CharProperty.match(Pattern.java:3776)
        at java.util.regex.Pattern$GroupHead.match(Pattern.java:4658)
        at java.util.regex.Pattern$Branch.match(Pattern.java:4602)
        at java.util.regex.Pattern$Branch.match(Pattern.java:4602)
        at java.util.regex.Pattern$Branch.match(Pattern.java:4602)
        at java.util.regex.Pattern$BranchConn.match(Pattern.java:4568)
        at java.util.regex.Pattern$GroupTail.match(Pattern.java:4717)
        at java.util.regex.Pattern$Curly.match0(Pattern.java:4279)
        at java.util.regex.Pattern$Curly.match(Pattern.java:4234)
        at java.util.regex.Pattern$GroupHead.match(Pattern.java:4658)
        at java.util.regex.Pattern$Branch.match(Pattern.java:4604)
        at java.util.regex.Pattern$Branch.match(Pattern.java:4602)
        at java.util.regex.Pattern$BmpCharProperty.match(Pattern.java:3798)
        at java.util.regex.Pattern$Start.match(Pattern.java:3461)
        at java.util.regex.Matcher.search(Matcher.java:1248)
        at java.util.regex.Matcher.find(Matcher.java:664)
        at java.util.Formatter.parse(Formatter.java:2549)
        at java.util.Formatter.format(Formatter.java:2501)
        at java.util.Formatter.format(Formatter.java:2455)
        at java.lang.String.format(String.java:2940)
        at org.commonjava.maven.atlas.ident.ref.ArtifactRef.toString(ArtifactRef.java:153)
        at java.lang.String.valueOf(String.java:2994)
        at java.lang.StringBuilder.append(StringBuilder.java:131)
        at org.commonjava.maven.plugins.betterdep.impl.BetterDepRelationshipPrinter.printProjectVersionRef(BetterDepRelationshipPrinter.java:127)
        at org.commonjava.maven.plugins.betterdep.impl.BetterDepRelationshipPrinter.print(BetterDepRelationshipPrinter.java:103)
        at org.commonjava.maven.atlas.graph.traverse.print.ListPrinter.printLinks(ListPrinter.java:117)
        at org.commonjava.maven.atlas.graph.traverse.print.ListPrinter.printLinks(ListPrinter.java:141)
rnc commented 8 years ago

No longer get a stackoverflow error.

However we now get

INFO] ------------------------------------------------------------------------
[ERROR] Failed to execute goal org.commonjava.maven.plugins:betterdep-maven-plugin:0.9-SNAPSHOT:list (default-cli) on project apiman: Execution default-cli of goal org.commonjava.maven.plugins:betterdep-maven-plugin:0.9-SNAPSHOT:list failed: Comparison method violates its general contract! -> [Help 1]
[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/PluginExecutionException
[INFO] Shutting down graph...
Exception in thread "Thread-13" java.lang.NoClassDefFoundError: org/apache/lucene/search/ConstantScoreQuery$ConstantWeight

I have also seen

Exception in thread "Thread-13" java.lang.NoClassDefFoundError: org/neo4j/kernel/AvailabilityGuard$3
        at org.neo4j.kernel.AvailabilityGuard.shutdown(AvailabilityGuard.java:136)
        at org.neo4j.kernel.InternalAbstractGraphDatabase.shutdown(InternalAbstractGraphDatabase.java:697)
        at org.commonjava.maven.atlas.graph.spi.neo4j.FileNeo4JGraphConnection.close(FileNeo4JGraphConnection.java:1064)
        at org.commonjava.maven.atlas.graph.spi.neo4j.FileNeo4JGraphConnection.run(FileNeo4JGraphConnection.java:1095)
        at java.lang.Thread.run(Thread.java:745)
Caused by: java.lang.ClassNotFoundException: org.neo4j.kernel.AvailabilityGuard$3
        at org.codehaus.plexus.classworlds.strategy.SelfFirstStrategy.loadClass(SelfFirstStrategy.java:50)
        at org.codehaus.plexus.classworlds.realm.ClassRealm.unsynchronizedLoadClass(ClassRealm.java:271)
        at org.codehaus.plexus.classworlds.realm.ClassRealm.loadClass(ClassRealm.java:247)
        at org.codehaus.plexus.classworlds.realm.ClassRealm.loadClass(ClassRealm.java:239)
        ... 5 more
jdcasey commented 8 years ago

I'd guess the new error is just preventing the stack overflow. It looks like we're missing part of neo4j in the classpath, though I'm not sure how that happened (yet).