java.lang.IllegalArgumentException: Multiple entries with the same key[connection]

MuleSoft JIRA | Pablo Cabrera | 5 months ago
  1. 0

    When building an extension that has 2 or more connection providers with no XML annotation the error shown is useless since it doesn't tell you what were the error is, nor how to solve it. The error should tell you the name of the classes that generated the conflict and suggest to use the @org.mule.runtime.extension.api.annotation.Alias annotation. {code:java} [ERROR] diagnostic: error: Multiple entries with the same key[connection] java.lang.IllegalArgumentException: Multiple entries with the same key[connection] at org.mule.runtime.extension.api.introspection.AbstractComplexModel.toMap(AbstractComplexModel.java:132) at org.mule.runtime.extension.api.introspection.AbstractComplexModel.<init>(AbstractComplexModel.java:48) at org.mule.runtime.extension.api.introspection.ImmutableExtensionModel.<init>(ImmutableExtensionModel.java:58) at org.mule.runtime.extension.api.introspection.ImmutableRuntimeExtensionModel.<init>(ImmutableRuntimeExtensionModel.java:60) at org.mule.runtime.module.extension.internal.introspection.DefaultExtensionFactory$FactoryDelegate.toExtension(DefaultExtensionFactory.java:148) at org.mule.runtime.module.extension.internal.introspection.DefaultExtensionFactory$FactoryDelegate.access$100(DefaultExtensionFactory.java:130) at org.mule.runtime.module.extension.internal.introspection.DefaultExtensionFactory.createFrom(DefaultExtensionFactory.java:124) at org.mule.runtime.module.extension.internal.resources.ExtensionResourcesGeneratorAnnotationProcessor.parseExtension(ExtensionResourcesGeneratorAnnotationProcessor.java:107) at org.mule.runtime.module.extension.internal.resources.ExtensionResourcesGeneratorAnnotationProcessor.lambda$null$0(ExtensionResourcesGeneratorAnnotationProcessor.java:82) at org.mule.runtime.core.util.ClassUtils.lambda$withContextClassLoader$10(ClassUtils.java:1240) at org.mule.runtime.core.util.ClassUtils.withContextClassLoader(ClassUtils.java:1219) at org.mule.runtime.core.util.ClassUtils.withContextClassLoader(ClassUtils.java:1239) at org.mule.runtime.module.extension.internal.resources.ExtensionResourcesGeneratorAnnotationProcessor.lambda$process$1(ExtensionResourcesGeneratorAnnotationProcessor.java:81) at java.util.Optional.ifPresent(Optional.java:159) at org.mule.runtime.module.extension.internal.resources.ExtensionResourcesGeneratorAnnotationProcessor.process(ExtensionResourcesGeneratorAnnotationProcessor.java:79) at com.sun.tools.javac.processing.JavacProcessingEnvironment.callProcessor(JavacProcessingEnvironment.java:794) at com.sun.tools.javac.processing.JavacProcessingEnvironment.discoverAndRunProcs(JavacProcessingEnvironment.java:705) at com.sun.tools.javac.processing.JavacProcessingEnvironment.access$1800(JavacProcessingEnvironment.java:91) at com.sun.tools.javac.processing.JavacProcessingEnvironment$Round.run(JavacProcessingEnvironment.java:1035) at com.sun.tools.javac.processing.JavacProcessingEnvironment.doProcessing(JavacProcessingEnvironment.java:1176) at com.sun.tools.javac.main.JavaCompiler.processAnnotations(JavaCompiler.java:1170) at com.sun.tools.javac.main.JavaCompiler.compile(JavaCompiler.java:856) at com.sun.tools.javac.main.Main.compile(Main.java:523) at com.sun.tools.javac.api.JavacTaskImpl.doCall(JavacTaskImpl.java:129) at com.sun.tools.javac.api.JavacTaskImpl.call(JavacTaskImpl.java:138) at org.bsc.maven.plugin.processor.AbstractAnnotationProcessorMojo.executeWithExceptionsHandled(AbstractAnnotationProcessorMojo.java:545) at org.bsc.maven.plugin.processor.AbstractAnnotationProcessorMojo.execute(AbstractAnnotationProcessorMojo.java:285) at org.apache.maven.plugin.DefaultBuildPluginManager.executeMojo(DefaultBuildPluginManager.java:134) at org.apache.maven.lifecycle.internal.MojoExecutor.execute(MojoExecutor.java:208) 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:116) at org.apache.maven.lifecycle.internal.LifecycleModuleBuilder.buildProject(LifecycleModuleBuilder.java:80) at org.apache.maven.lifecycle.internal.builder.singlethreaded.SingleThreadedBuilder.build(SingleThreadedBuilder.java:51) at org.apache.maven.lifecycle.internal.LifecycleStarter.execute(LifecycleStarter.java:128) at org.apache.maven.DefaultMaven.doExecute(DefaultMaven.java:307) at org.apache.maven.DefaultMaven.doExecute(DefaultMaven.java:193) at org.apache.maven.DefaultMaven.execute(DefaultMaven.java:106) at org.apache.maven.cli.MavenCli.execute(MavenCli.java:862) at org.apache.maven.cli.MavenCli.doMain(MavenCli.java:286) at org.apache.maven.cli.MavenCli.main(MavenCli.java:197) 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:289) at org.codehaus.plexus.classworlds.launcher.Launcher.launch(Launcher.java:229) at org.codehaus.plexus.classworlds.launcher.Launcher.mainWithExitCode(Launcher.java:415) at org.codehaus.plexus.classworlds.launcher.Launcher.main(Launcher.java:356) {code}

    MuleSoft JIRA | 5 months ago | Pablo Cabrera
    java.lang.IllegalArgumentException: Multiple entries with the same key[connection]
  2. 0

    When building an extension that has 2 or more connection providers with no XML annotation the error shown is useless since it doesn't tell you what were the error is, nor how to solve it. The error should tell you the name of the classes that generated the conflict and suggest to use the @org.mule.runtime.extension.api.annotation.Alias annotation. {code:java} [ERROR] diagnostic: error: Multiple entries with the same key[connection] java.lang.IllegalArgumentException: Multiple entries with the same key[connection] at org.mule.runtime.extension.api.introspection.AbstractComplexModel.toMap(AbstractComplexModel.java:132) at org.mule.runtime.extension.api.introspection.AbstractComplexModel.<init>(AbstractComplexModel.java:48) at org.mule.runtime.extension.api.introspection.ImmutableExtensionModel.<init>(ImmutableExtensionModel.java:58) at org.mule.runtime.extension.api.introspection.ImmutableRuntimeExtensionModel.<init>(ImmutableRuntimeExtensionModel.java:60) at org.mule.runtime.module.extension.internal.introspection.DefaultExtensionFactory$FactoryDelegate.toExtension(DefaultExtensionFactory.java:148) at org.mule.runtime.module.extension.internal.introspection.DefaultExtensionFactory$FactoryDelegate.access$100(DefaultExtensionFactory.java:130) at org.mule.runtime.module.extension.internal.introspection.DefaultExtensionFactory.createFrom(DefaultExtensionFactory.java:124) at org.mule.runtime.module.extension.internal.resources.ExtensionResourcesGeneratorAnnotationProcessor.parseExtension(ExtensionResourcesGeneratorAnnotationProcessor.java:107) at org.mule.runtime.module.extension.internal.resources.ExtensionResourcesGeneratorAnnotationProcessor.lambda$null$0(ExtensionResourcesGeneratorAnnotationProcessor.java:82) at org.mule.runtime.core.util.ClassUtils.lambda$withContextClassLoader$10(ClassUtils.java:1240) at org.mule.runtime.core.util.ClassUtils.withContextClassLoader(ClassUtils.java:1219) at org.mule.runtime.core.util.ClassUtils.withContextClassLoader(ClassUtils.java:1239) at org.mule.runtime.module.extension.internal.resources.ExtensionResourcesGeneratorAnnotationProcessor.lambda$process$1(ExtensionResourcesGeneratorAnnotationProcessor.java:81) at java.util.Optional.ifPresent(Optional.java:159) at org.mule.runtime.module.extension.internal.resources.ExtensionResourcesGeneratorAnnotationProcessor.process(ExtensionResourcesGeneratorAnnotationProcessor.java:79) at com.sun.tools.javac.processing.JavacProcessingEnvironment.callProcessor(JavacProcessingEnvironment.java:794) at com.sun.tools.javac.processing.JavacProcessingEnvironment.discoverAndRunProcs(JavacProcessingEnvironment.java:705) at com.sun.tools.javac.processing.JavacProcessingEnvironment.access$1800(JavacProcessingEnvironment.java:91) at com.sun.tools.javac.processing.JavacProcessingEnvironment$Round.run(JavacProcessingEnvironment.java:1035) at com.sun.tools.javac.processing.JavacProcessingEnvironment.doProcessing(JavacProcessingEnvironment.java:1176) at com.sun.tools.javac.main.JavaCompiler.processAnnotations(JavaCompiler.java:1170) at com.sun.tools.javac.main.JavaCompiler.compile(JavaCompiler.java:856) at com.sun.tools.javac.main.Main.compile(Main.java:523) at com.sun.tools.javac.api.JavacTaskImpl.doCall(JavacTaskImpl.java:129) at com.sun.tools.javac.api.JavacTaskImpl.call(JavacTaskImpl.java:138) at org.bsc.maven.plugin.processor.AbstractAnnotationProcessorMojo.executeWithExceptionsHandled(AbstractAnnotationProcessorMojo.java:545) at org.bsc.maven.plugin.processor.AbstractAnnotationProcessorMojo.execute(AbstractAnnotationProcessorMojo.java:285) at org.apache.maven.plugin.DefaultBuildPluginManager.executeMojo(DefaultBuildPluginManager.java:134) at org.apache.maven.lifecycle.internal.MojoExecutor.execute(MojoExecutor.java:208) 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:116) at org.apache.maven.lifecycle.internal.LifecycleModuleBuilder.buildProject(LifecycleModuleBuilder.java:80) at org.apache.maven.lifecycle.internal.builder.singlethreaded.SingleThreadedBuilder.build(SingleThreadedBuilder.java:51) at org.apache.maven.lifecycle.internal.LifecycleStarter.execute(LifecycleStarter.java:128) at org.apache.maven.DefaultMaven.doExecute(DefaultMaven.java:307) at org.apache.maven.DefaultMaven.doExecute(DefaultMaven.java:193) at org.apache.maven.DefaultMaven.execute(DefaultMaven.java:106) at org.apache.maven.cli.MavenCli.execute(MavenCli.java:862) at org.apache.maven.cli.MavenCli.doMain(MavenCli.java:286) at org.apache.maven.cli.MavenCli.main(MavenCli.java:197) 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:289) at org.codehaus.plexus.classworlds.launcher.Launcher.launch(Launcher.java:229) at org.codehaus.plexus.classworlds.launcher.Launcher.mainWithExitCode(Launcher.java:415) at org.codehaus.plexus.classworlds.launcher.Launcher.main(Launcher.java:356) {code}

    MuleSoft JIRA | 5 months ago | Pablo Cabrera
    java.lang.IllegalArgumentException: Multiple entries with the same key[connection]
  3. 0

    Schema parsing error when using datastax Java driver 3.0.2

    GitHub | 4 months ago | mjsaber
    java.lang.IllegalArgumentException: Multiple entries with same key: class=LeveledCompactionStrategy and class=LeveledCompactionStrategy
  4. Speed up your debug routine!

    Automated exception search integrated into your IDE

  5. 0

    Does not work with 6.1

    GitHub | 2 months ago | leoleovich
    java.lang.IllegalStateException: Unable to load component class org.sonar.server.rule.RuleDefinitionsLoader
  6. 0

    Exception during planning with duplicate columns in order by clause

    GitHub | 2 years ago | martint
    java.lang.IllegalArgumentException: Multiple entries with same key: x_2=ASC_NULLS_LAST and x_2=ASC_NULLS_LAST

    Not finding the right solution?
    Take a tour to get the most out of Samebug.

    Tired of useless tips?

    Automated exception search integrated into your IDE

    Root Cause Analysis

    1. java.lang.IllegalArgumentException

      Multiple entries with the same key[connection]

      at org.mule.runtime.extension.api.introspection.AbstractComplexModel.toMap()
    2. org.mule.runtime
      ExtensionResourcesGeneratorAnnotationProcessor.lambda$process$1
      1. org.mule.runtime.extension.api.introspection.AbstractComplexModel.toMap(AbstractComplexModel.java:132)
      2. org.mule.runtime.extension.api.introspection.AbstractComplexModel.<init>(AbstractComplexModel.java:48)
      3. org.mule.runtime.extension.api.introspection.ImmutableExtensionModel.<init>(ImmutableExtensionModel.java:58)
      4. org.mule.runtime.extension.api.introspection.ImmutableRuntimeExtensionModel.<init>(ImmutableRuntimeExtensionModel.java:60)
      5. org.mule.runtime.module.extension.internal.introspection.DefaultExtensionFactory$FactoryDelegate.toExtension(DefaultExtensionFactory.java:148)
      6. org.mule.runtime.module.extension.internal.introspection.DefaultExtensionFactory$FactoryDelegate.access$100(DefaultExtensionFactory.java:130)
      7. org.mule.runtime.module.extension.internal.introspection.DefaultExtensionFactory.createFrom(DefaultExtensionFactory.java:124)
      8. org.mule.runtime.module.extension.internal.resources.ExtensionResourcesGeneratorAnnotationProcessor.parseExtension(ExtensionResourcesGeneratorAnnotationProcessor.java:107)
      9. org.mule.runtime.module.extension.internal.resources.ExtensionResourcesGeneratorAnnotationProcessor.lambda$null$0(ExtensionResourcesGeneratorAnnotationProcessor.java:82)
      10. org.mule.runtime.core.util.ClassUtils.lambda$withContextClassLoader$10(ClassUtils.java:1240)
      11. org.mule.runtime.core.util.ClassUtils.withContextClassLoader(ClassUtils.java:1219)
      12. org.mule.runtime.core.util.ClassUtils.withContextClassLoader(ClassUtils.java:1239)
      13. org.mule.runtime.module.extension.internal.resources.ExtensionResourcesGeneratorAnnotationProcessor.lambda$process$1(ExtensionResourcesGeneratorAnnotationProcessor.java:81)
      13 frames
    3. Java RT
      Optional.ifPresent
      1. java.util.Optional.ifPresent(Optional.java:159)
      1 frame
    4. org.mule.runtime
      ExtensionResourcesGeneratorAnnotationProcessor.process
      1. org.mule.runtime.module.extension.internal.resources.ExtensionResourcesGeneratorAnnotationProcessor.process(ExtensionResourcesGeneratorAnnotationProcessor.java:79)
      1 frame
    5. Java Tools
      JavacTaskImpl.call
      1. com.sun.tools.javac.processing.JavacProcessingEnvironment.callProcessor(JavacProcessingEnvironment.java:794)
      2. com.sun.tools.javac.processing.JavacProcessingEnvironment.discoverAndRunProcs(JavacProcessingEnvironment.java:705)
      3. com.sun.tools.javac.processing.JavacProcessingEnvironment.access$1800(JavacProcessingEnvironment.java:91)
      4. com.sun.tools.javac.processing.JavacProcessingEnvironment$Round.run(JavacProcessingEnvironment.java:1035)
      5. com.sun.tools.javac.processing.JavacProcessingEnvironment.doProcessing(JavacProcessingEnvironment.java:1176)
      6. com.sun.tools.javac.main.JavaCompiler.processAnnotations(JavaCompiler.java:1170)
      7. com.sun.tools.javac.main.JavaCompiler.compile(JavaCompiler.java:856)
      8. com.sun.tools.javac.main.Main.compile(Main.java:523)
      9. com.sun.tools.javac.api.JavacTaskImpl.doCall(JavacTaskImpl.java:129)
      10. com.sun.tools.javac.api.JavacTaskImpl.call(JavacTaskImpl.java:138)
      10 frames
    6. org.bsc.maven
      AbstractAnnotationProcessorMojo.execute
      1. org.bsc.maven.plugin.processor.AbstractAnnotationProcessorMojo.executeWithExceptionsHandled(AbstractAnnotationProcessorMojo.java:545)
      2. org.bsc.maven.plugin.processor.AbstractAnnotationProcessorMojo.execute(AbstractAnnotationProcessorMojo.java:285)
      2 frames
    7. Maven Plugin
      DefaultBuildPluginManager.executeMojo
      1. org.apache.maven.plugin.DefaultBuildPluginManager.executeMojo(DefaultBuildPluginManager.java:134)
      1 frame
    8. Maven Core
      DefaultMaven.execute
      1. org.apache.maven.lifecycle.internal.MojoExecutor.execute(MojoExecutor.java:208)
      2. org.apache.maven.lifecycle.internal.MojoExecutor.execute(MojoExecutor.java:153)
      3. org.apache.maven.lifecycle.internal.MojoExecutor.execute(MojoExecutor.java:145)
      4. org.apache.maven.lifecycle.internal.LifecycleModuleBuilder.buildProject(LifecycleModuleBuilder.java:116)
      5. org.apache.maven.lifecycle.internal.LifecycleModuleBuilder.buildProject(LifecycleModuleBuilder.java:80)
      6. org.apache.maven.lifecycle.internal.builder.singlethreaded.SingleThreadedBuilder.build(SingleThreadedBuilder.java:51)
      7. org.apache.maven.lifecycle.internal.LifecycleStarter.execute(LifecycleStarter.java:128)
      8. org.apache.maven.DefaultMaven.doExecute(DefaultMaven.java:307)
      9. org.apache.maven.DefaultMaven.doExecute(DefaultMaven.java:193)
      10. org.apache.maven.DefaultMaven.execute(DefaultMaven.java:106)
      10 frames
    9. M3 Interceptor
      MavenCli.main
      1. org.apache.maven.cli.MavenCli.execute(MavenCli.java:862)
      2. org.apache.maven.cli.MavenCli.doMain(MavenCli.java:286)
      3. org.apache.maven.cli.MavenCli.main(MavenCli.java:197)
      3 frames
    10. Java RT
      Method.invoke
      1. sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
      2. sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:62)
      3. sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43)
      4. java.lang.reflect.Method.invoke(Method.java:497)
      4 frames
    11. Plexus
      Launcher.main
      1. org.codehaus.plexus.classworlds.launcher.Launcher.launchEnhanced(Launcher.java:289)
      2. org.codehaus.plexus.classworlds.launcher.Launcher.launch(Launcher.java:229)
      3. org.codehaus.plexus.classworlds.launcher.Launcher.mainWithExitCode(Launcher.java:415)
      4. org.codehaus.plexus.classworlds.launcher.Launcher.main(Launcher.java:356)
      4 frames