Open EngErik opened 8 years ago
The error (which is extremely unclear) means that two definitions of the same class were encountered - and I'm looking at slightly newer code, but I would think in the same jar file. Does that seem right, do you have a single jar file with two definitions of org.apache.xmlbeans.xml.stream.Location?
I am facing the same issue with the spotify missing link:
Multiple entries with same key: org.apache.logging.log4j.core.util.SystemClock=DeclaredClass{className=org.apache.logging.log4j.core.util.SystemClock, parents=[org.apache.logging.log4j.core.util.Clock, java.lang.Object], methods={MethodDescriptor{returnType=void, name=<init>, parameterTypes=[]}=DeclaredMethod{descriptor=MethodDescriptor{returnType=void, name=<init>, parameterTypes=[]}, methodCalls=[CalledMethod{owner=java.lang.Object, descriptor=MethodDescriptor{returnType=void, name=<init>, parameterTypes=[]}, lineNumber=22}], fieldAccesses=[]}, MethodDescriptor{returnType=long, name=currentTimeMillis, parameterTypes=[]}=DeclaredMethod{descriptor=MethodDescriptor{returnType=long, name=currentTimeMillis, parameterTypes=[]}, methodCalls=[CalledMethod{owner=java.lang.System, descriptor=MethodDescriptor{returnType=long, name=currentTimeMillis, parameterTypes=[]}, lineNumber=30}], fieldAccesses=[]}}, fields=[]} and org.apache.logging.log4j.core.util.SystemClock=DeclaredClass{className=org.apache.logging.log4j.core.util.SystemClock, parents=[org.apache.logging.log4j.core.time.PreciseClock, org.apache.logging.log4j.core.util.Clock, java.lang.Object], methods={MethodDescriptor{returnType=void, name=<init>, parameterTypes=[]}=DeclaredMethod{descriptor=MethodDescriptor{returnType=void, name=<init>, parameterTypes=[]}, methodCalls=[CalledMethod{owner=java.lang.Object, descriptor=MethodDescriptor{returnType=void, name=<init>, parameterTypes=[]}, lineNumber=28}], fieldAccesses=[]}, MethodDescriptor{returnType=void, name=init, parameterTypes=[org.apache.logging.log4j.core.time.MutableInstant]}=DeclaredMethod{descriptor=MethodDescriptor{returnType=void, name=init, parameterTypes=[org.apache.logging.log4j.core.time.MutableInstant]}, methodCalls=[CalledMethod{owner=java.time.Clock, descriptor=MethodDescriptor{returnType=java.time.Clock, name=systemUTC, parameterTypes=[]}, lineNumber=44}, CalledMethod{owner=java.time.Instant, descriptor=MethodDescriptor{returnType=int, name=getNano, parameterTypes=[]}, lineNumber=45}, CalledMethod{owner=java.time.Clock, descriptor=MethodDescriptor{returnType=java.time.Instant, name=instant, parameterTypes=[]}, lineNumber=44}, CalledMethod{owner=org.apache.logging.log4j.core.time.MutableInstant, descriptor=MethodDescriptor{returnType=void, name=initFromEpochSecond, parameterTypes=[long, int]}, lineNumber=45}, CalledMethod{owner=java.time.Instant, descriptor=MethodDescriptor{returnType=long, name=getEpochSecond, parameterTypes=[]}, lineNumber=45}], fieldAccesses=[]}, MethodDescriptor{returnType=long, name=currentTimeMillis, parameterTypes=[]}=DeclaredMethod{descriptor=MethodDescriptor{returnType=long, name=currentTimeMillis, parameterTypes=[]}, methodCalls=[CalledMethod{owner=java.lang.System, descriptor=MethodDescriptor{returnType=long, name=currentTimeMillis, parameterTypes=[]}, lineNumber=36}], fieldAccesses=[]}}, fields=[]}
When i trying to run the plugin in my project i got this error:
[ERROR] Failed to execute goal com.spotify:missinglink-maven-plugin:0.1.1:check (default-cli) on project : Execution default-cli of goal com.spotify:missinglink-maven-plugin:0.1.1:check failed: Multiple entries with same key: org.apache.xmlbeans.xml.stream.Location=DeclaredClass{className=org.apache.xmlbeans.xml.stream.Location, parents=[java.lang.Object], methods={MethodDescriptor{returnType=java.lang.String, name=getSystemId, parameterTypes=[]}=DeclaredMethod{descriptor=MethodDescriptor{returnType=java.lang.String, name=getSystemId, parameterTypes=[]}, methodCalls=[], fieldAccesses=[]}, MethodDescriptor{returnType=int, name=getColumnNumber, parameterTypes=[]}=DeclaredMethod{descriptor=MethodDescriptor{returnType=int, name=getColumnNumber, parameterTypes=[]}, methodCalls=[], fieldAccesses=[]}, MethodDescriptor{returnType=int, name=getLineNumber, parameterTypes=[]}=DeclaredMethod{descriptor=MethodDescriptor{returnType=int, name=getLineNumber, parameterTypes=[]}, methodCalls=[], fieldAccesses=[]}, MethodDescriptor{returnType=java.lang.String, name=getPublicId, parameterTypes=[]}=DeclaredMethod{descriptor=MethodDescriptor{returnType=java.lang.String, name=getPublicId, parameterTypes=[]}, methodCalls=[], fieldAccesses=[]}}, fields=[]} and org.apache.xmlbeans.xml.stream.Location=DeclaredClass{className=org.apache.xmlbeans.xml.stream.Location, parents=[java.lang.Object], methods={MethodDescriptor{returnType=java.lang.String, name=getSystemId, parameterTypes=[]}=DeclaredMethod{descriptor=MethodDescriptor{returnType=java.lang.String, name=getSystemId, parameterTypes=[]}, methodCalls=[], fieldAccesses=[]}, MethodDescriptor{returnType=int, name=getColumnNumber, parameterTypes=[]}=DeclaredMethod{descriptor=MethodDescriptor{returnType=int, name=getColumnNumber, parameterTypes=[]}, methodCalls=[], fieldAccesses=[]}, MethodDescriptor{returnType=int, name=getLineNumber, parameterTypes=[]}=DeclaredMethod{descriptor=MethodDescriptor{returnType=int, name=getLineNumber, parameterTypes=[]}, methodCalls=[], fieldAccesses=[]}, MethodDescriptor{returnType=java.lang.String, name=getPublicId, parameterTypes=[]}=DeclaredMethod{descriptor=MethodDescriptor{returnType=java.lang.String, name=getPublicId, parameterTypes=[]}, methodCalls=[], fieldAccesses=[]}}, fields=[]} -> [Help 1] org.apache.maven.lifecycle.LifecycleExecutionException: Failed to execute goal com.spotify:missinglink-maven-plugin:0.1.1:check (default-cli) on project esight-model: Execution default-cli of goal com.spotify:missinglink-maven-plugin:0.1.1:check failed: Multiple entries with same key: org.apache.xmlbeans.xml.stream.Location=DeclaredClass{className=org.apache.xmlbeans.xml.stream.Location, parents=[java.lang.Object], methods={MethodDescriptor{returnType=java.lang.String, name=getSystemId, parameterTypes=[]}=DeclaredMethod{descriptor=MethodDescriptor{returnType=java.lang.String, name=getSystemId, parameterTypes=[]}, methodCalls=[], fieldAccesses=[]}, MethodDescriptor{returnType=int, name=getColumnNumber, parameterTypes=[]}=DeclaredMethod{descriptor=MethodDescriptor{returnType=int, name=getColumnNumber, parameterTypes=[]}, methodCalls=[], fieldAccesses=[]}, MethodDescriptor{returnType=int, name=getLineNumber, parameterTypes=[]}=DeclaredMethod{descriptor=MethodDescriptor{returnType=int, name=getLineNumber, parameterTypes=[]}, methodCalls=[], fieldAccesses=[]}, MethodDescriptor{returnType=java.lang.String, name=getPublicId, parameterTypes=[]}=DeclaredMethod{descriptor=MethodDescriptor{returnType=java.lang.String, name=getPublicId, parameterTypes=[]}, methodCalls=[], fieldAccesses=[]}}, fields=[]} and org.apache.xmlbeans.xml.stream.Location=DeclaredClass{className=org.apache.xmlbeans.xml.stream.Location, parents=[java.lang.Object], methods={MethodDescriptor{returnType=java.lang.String, name=getSystemId, parameterTypes=[]}=DeclaredMethod{descriptor=MethodDescriptor{returnType=java.lang.String, name=getSystemId, parameterTypes=[]}, methodCalls=[], fieldAccesses=[]}, MethodDescriptor{returnType=int, name=getColumnNumber, parameterTypes=[]}=DeclaredMethod{descriptor=MethodDescriptor{returnType=int, name=getColumnNumber, parameterTypes=[]}, methodCalls=[], fieldAccesses=[]}, MethodDescriptor{returnType=int, name=getLineNumber, parameterTypes=[]}=DeclaredMethod{descriptor=MethodDescriptor{returnType=int, name=getLineNumber, parameterTypes=[]}, methodCalls=[], fieldAccesses=[]}, MethodDescriptor{returnType=java.lang.String, name=getPublicId, parameterTypes=[]}=DeclaredMethod{descriptor=MethodDescriptor{returnType=java.lang.String, name=getPublicId, parameterTypes=[]}, methodCalls=[], fieldAccesses=[]}}, fields=[]} at org.apache.maven.lifecycle.internal.MojoExecutor.execute(MojoExecutor.java:225) at org.apache.maven.lifecycle.internal.MojoExecutor.execute(MojoExecutor.java:153) at org.apache.maven.lifecycle.internal.MojoExecutor.execute(MojoExecutor.java:145) at org.apache.maven.lifecycle.internal.LifecycleModuleBuilder.buildProject(LifecycleModuleBuilder.java:84) at org.apache.maven.lifecycle.internal.LifecycleModuleBuilder.buildProject(LifecycleModuleBuilder.java:59) at org.apache.maven.lifecycle.internal.LifecycleStarter.singleThreadedBuild(LifecycleStarter.java:183) at org.apache.maven.lifecycle.internal.LifecycleStarter.execute(LifecycleStarter.java:161) at org.apache.maven.DefaultMaven.doExecute(DefaultMaven.java:320) at org.apache.maven.DefaultMaven.execute(DefaultMaven.java:156) 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:62) at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43) at java.lang.reflect.Method.invoke(Method.java:497) 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: org.apache.maven.plugin.PluginExecutionException: Execution default-cli of goal com.spotify:missinglink-maven-plugin:0.1.1:check failed: Multiple entries with same key: org.apache.xmlbeans.xml.stream.Location=DeclaredClass{className=org.apache.xmlbeans.xml.stream.Location, parents=[java.lang.Object], methods={MethodDescriptor{returnType=java.lang.String, name=getSystemId, parameterTypes=[]}=DeclaredMethod{descriptor=MethodDescriptor{returnType=java.lang.String, name=getSystemId, parameterTypes=[]}, methodCalls=[], fieldAccesses=[]}, MethodDescriptor{returnType=int, name=getColumnNumber, parameterTypes=[]}=DeclaredMethod{descriptor=MethodDescriptor{returnType=int, name=getColumnNumber, parameterTypes=[]}, methodCalls=[], fieldAccesses=[]}, MethodDescriptor{returnType=int, name=getLineNumber, parameterTypes=[]}=DeclaredMethod{descriptor=MethodDescriptor{returnType=int, name=getLineNumber, parameterTypes=[]}, methodCalls=[], fieldAccesses=[]}, MethodDescriptor{returnType=java.lang.String, name=getPublicId, parameterTypes=[]}=DeclaredMethod{descriptor=MethodDescriptor{returnType=java.lang.String, name=getPublicId, parameterTypes=[]}, methodCalls=[], fieldAccesses=[]}}, fields=[]} and org.apache.xmlbeans.xml.stream.Location=DeclaredClass{className=org.apache.xmlbeans.xml.stream.Location, parents=[java.lang.Object], methods={MethodDescriptor{returnType=java.lang.String, name=getSystemId, parameterTypes=[]}=DeclaredMethod{descriptor=MethodDescriptor{returnType=java.lang.String, name=getSystemId, parameterTypes=[]}, methodCalls=[], fieldAccesses=[]}, MethodDescriptor{returnType=int, name=getColumnNumber, parameterTypes=[]}=DeclaredMethod{descriptor=MethodDescriptor{returnType=int, name=getColumnNumber, parameterTypes=[]}, methodCalls=[], fieldAccesses=[]}, MethodDescriptor{returnType=int, name=getLineNumber, parameterTypes=[]}=DeclaredMethod{descriptor=MethodDescriptor{returnType=int, name=getLineNumber, parameterTypes=[]}, methodCalls=[], fieldAccesses=[]}, MethodDescriptor{returnType=java.lang.String, name=getPublicId, parameterTypes=[]}=DeclaredMethod{descriptor=MethodDescriptor{returnType=java.lang.String, name=getPublicId, parameterTypes=[]}, methodCalls=[], fieldAccesses=[]}}, fields=[]} at org.apache.maven.plugin.DefaultBuildPluginManager.executeMojo(DefaultBuildPluginManager.java:110) at org.apache.maven.lifecycle.internal.MojoExecutor.execute(MojoExecutor.java:209) ... 19 more Caused by: java.lang.IllegalArgumentException: Multiple entries with same key: org.apache.xmlbeans.xml.stream.Location=DeclaredClass{className=org.apache.xmlbeans.xml.stream.Location, parents=[java.lang.Object], methods={MethodDescriptor{returnType=java.lang.String, name=getSystemId, parameterTypes=[]}=DeclaredMethod{descriptor=MethodDescriptor{returnType=java.lang.String, name=getSystemId, parameterTypes=[]}, methodCalls=[], fieldAccesses=[]}, MethodDescriptor{returnType=int, name=getColumnNumber, parameterTypes=[]}=DeclaredMethod{descriptor=MethodDescriptor{returnType=int, name=getColumnNumber, parameterTypes=[]}, methodCalls=[], fieldAccesses=[]}, MethodDescriptor{returnType=int, name=getLineNumber, parameterTypes=[]}=DeclaredMethod{descriptor=MethodDescriptor{returnType=int, name=getLineNumber, parameterTypes=[]}, methodCalls=[], fieldAccesses=[]}, MethodDescriptor{returnType=java.lang.String, name=getPublicId, parameterTypes=[]}=DeclaredMethod{descriptor=MethodDescriptor{returnType=java.lang.String, name=getPublicId, parameterTypes=[]}, methodCalls=[], fieldAccesses=[]}}, fields=[]} and org.apache.xmlbeans.xml.stream.Location=DeclaredClass{className=org.apache.xmlbeans.xml.stream.Location, parents=[java.lang.Object], methods={MethodDescriptor{returnType=java.lang.String, name=getSystemId, parameterTypes=[]}=DeclaredMethod{descriptor=MethodDescriptor{returnType=java.lang.String, name=getSystemId, parameterTypes=[]}, methodCalls=[], fieldAccesses=[]}, MethodDescriptor{returnType=int, name=getColumnNumber, parameterTypes=[]}=DeclaredMethod{descriptor=MethodDescriptor{returnType=int, name=getColumnNumber, parameterTypes=[]}, methodCalls=[], fieldAccesses=[]}, MethodDescriptor{returnType=int, name=getLineNumber, parameterTypes=[]}=DeclaredMethod{descriptor=MethodDescriptor{returnType=int, name=getLineNumber, parameterTypes=[]}, methodCalls=[], fieldAccesses=[]}, MethodDescriptor{returnType=java.lang.String, name=getPublicId, parameterTypes=[]}=DeclaredMethod{descriptor=MethodDescriptor{returnType=java.lang.String, name=getPublicId, parameterTypes=[]}, methodCalls=[], fieldAccesses=[]}}, fields=[]} at com.google.common.collect.ImmutableMap.checkNoConflict(ImmutableMap.java:150) at com.google.common.collect.RegularImmutableMap.checkNoConflictInBucket(RegularImmutableMap.java:104) at com.google.common.collect.RegularImmutableMap.<init>(RegularImmutableMap.java:70) at com.google.common.collect.ImmutableMap$Builder.build(ImmutableMap.java:254) at com.spotify.missinglink.ArtifactLoader.artifact(ArtifactLoader.java:99) at com.spotify.missinglink.ArtifactLoader.load(ArtifactLoader.java:75) at com.spotify.missinglink.maven.CheckMojo.lambda$mavenDepToArtifact$18(CheckMojo.java:686) at com.spotify.missinglink.maven.CheckMojo.doArtifactLoad(CheckMojo.java:693) at com.spotify.missinglink.maven.CheckMojo.mavenDepToArtifact(CheckMojo.java:686) at java.util.stream.ReferencePipeline$3$1.accept(ReferencePipeline.java:193) at java.util.stream.ReferencePipeline$2$1.accept(ReferencePipeline.java:175) at java.util.ArrayList$ArrayListSpliterator.forEachRemaining(ArrayList.java:1374) at java.util.stream.AbstractPipeline.copyInto(AbstractPipeline.java:481) at java.util.stream.AbstractPipeline.wrapAndCopyInto(AbstractPipeline.java:471) at java.util.stream.ReduceOps$ReduceOp.evaluateSequential(ReduceOps.java:708) at java.util.stream.AbstractPipeline.evaluate(AbstractPipeline.java:234) at java.util.stream.ReferencePipeline.collect(ReferencePipeline.java:499) at com.spotify.missinglink.maven.CheckMojo.constructArtifacts(CheckMojo.java:667) at com.spotify.missinglink.maven.CheckMojo.loadArtifactsAndCheckConflicts(CheckMojo.java:457) at com.spotify.missinglink.maven.CheckMojo.execute(CheckMojo.java:209) at org.apache.maven.plugin.DefaultBuildPluginManager.executeMojo(DefaultBuildPluginManager.java:101) ... 20 more
I'm trying to understand this error, but i can't. I follow the instructions posted on github project, but the error is always the same.