java.lang.LinkageError: loader (instance of org/mule/module/launcher/MuleSharedDomainClassLoader): attempted duplicate class definition for name: "org/mule/module/launcher/artifact/DefaultResourceReleaser"

MuleSoft JIRA | Santiago Ramirez | 2 years ago
  1. 0

    Whenever attempting to redeploy a domain, either by replacing the file in the domains folder with the same one or through a plugin that directly calls the deployment service, redeployment fails and all subsequent attempts to redeploy show a classloading issue {quote} ERROR 2015-05-26 10:10:59,083 [Mule.app.deployer.monitor.1.thread.1] org.mule.module.launcher.DefaultArtifactDeployer: Unable to cleanly dispose artifact 'mule-example-domain'. Restart Mule if you get errors redeploying this artifact java.lang.LinkageError: loader (instance of org/mule/module/launcher/MuleSharedDomainClassLoader): attempted duplicate class definition for name: "org/mule/module/launcher/artifact/DefaultResourceReleaser" at java.lang.ClassLoader.defineClass1(Native Method) ~[?:1.8.0_25] at java.lang.ClassLoader.defineClass(ClassLoader.java:760) ~[?:1.8.0_25] at java.lang.ClassLoader.defineClass(ClassLoader.java:642) ~[?:1.8.0_25] at org.mule.module.launcher.artifact.AbstractArtifactClassLoader.createResourceReleaserInstance(AbstractArtifactClassLoader.java:94) ~[mule-module-launcher-3.6.2.jar:3.6.2] at org.mule.module.launcher.artifact.AbstractArtifactClassLoader.dispose(AbstractArtifactClassLoader.java:73) ~[mule-module-launcher-3.6.2.jar:3.6.2] at org.mule.module.launcher.domain.MuleDomainClassLoaderRepository$1.dispose(MuleDomainClassLoaderRepository.java:100) ~[mule-module-launcher-3.6.2.jar:3.6.2] at org.mule.module.launcher.domain.DefaultMuleDomain.dispose(DefaultMuleDomain.java:300) ~[mule-module-launcher-3.6.2.jar:3.6.2] at org.mule.module.launcher.domain.DomainWrapper.dispose(DomainWrapper.java:53) ~[mule-module-launcher-3.6.2.jar:3.6.2] at org.mule.module.launcher.DefaultArtifactDeployer.tryToDisposeArtifact(DefaultArtifactDeployer.java:65) ~[mule-module-launcher-3.6.2.jar:3.6.2] at org.mule.module.launcher.DefaultArtifactDeployer.undeploy(DefaultArtifactDeployer.java:47) ~[mule-module-launcher-3.6.2.jar:3.6.2] at org.mule.module.launcher.DefaultArchiveDeployer.guardedUndeploy(DefaultArchiveDeployer.java:475) ~[mule-module-launcher-3.6.2.jar:3.6.2] at org.mule.module.launcher.DefaultArchiveDeployer.undeploy(DefaultArchiveDeployer.java:417) ~[mule-module-launcher-3.6.2.jar:3.6.2] at org.mule.module.launcher.DefaultArchiveDeployer.undeployArtifact(DefaultArchiveDeployer.java:120) ~[mule-module-launcher-3.6.2.jar:3.6.2] at org.mule.module.launcher.DefaultArchiveDeployer.deployPackagedArtifact(DefaultArchiveDeployer.java:253) ~[mule-module-launcher-3.6.2.jar:3.6.2] at org.mule.module.launcher.DefaultArchiveDeployer.deployPackagedArtifact(DefaultArchiveDeployer.java:78) ~[mule-module-launcher-3.6.2.jar:3.6.2] at org.mule.module.launcher.DomainArchiveDeployer.deployPackagedArtifact(DomainArchiveDeployer.java:52) ~[mule-module-launcher-3.6.2.jar:3.6.2] at org.mule.module.launcher.DomainArchiveDeployer.deployPackagedArtifact(DomainArchiveDeployer.java:32) ~[mule-module-launcher-3.6.2.jar:3.6.2] at org.mule.module.launcher.DeploymentDirectoryWatcher.deployPackedDomains(DeploymentDirectoryWatcher.java:482) ~[mule-module-launcher-3.6.2.jar:3.6.2] at org.mule.module.launcher.DeploymentDirectoryWatcher.run(DeploymentDirectoryWatcher.java:338) ~[mule-module-launcher-3.6.2.jar:3.6.2] at java.util.concurrent.Executors$RunnableAdapter.call(Executors.java:511) ~[?:1.8.0_25] at java.util.concurrent.FutureTask.runAndReset(FutureTask.java:308) ~[?:1.8.0_25] at java.util.concurrent.ScheduledThreadPoolExecutor$ScheduledFutureTask.access$301(ScheduledThreadPoolExecutor.java:180) ~[?:1.8.0_25] at java.util.concurrent.ScheduledThreadPoolExecutor$ScheduledFutureTask.run(ScheduledThreadPoolExecutor.java:294) ~[?:1.8.0_25] at java.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1142) [?:1.8.0_25] at java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:617) [?:1.8.0_25] at java.lang.Thread.run(Thread.java:745) [?:1.8.0_25] {quote}

    MuleSoft JIRA | 2 years ago | Santiago Ramirez
    java.lang.LinkageError: loader (instance of org/mule/module/launcher/MuleSharedDomainClassLoader): attempted duplicate class definition for name: "org/mule/module/launcher/artifact/DefaultResourceReleaser"
  2. 0

    Whenever attempting to redeploy a domain, either by replacing the file in the domains folder with the same one or through a plugin that directly calls the deployment service, redeployment fails and all subsequent attempts to redeploy show a classloading issue {quote} ERROR 2015-05-26 10:10:59,083 [Mule.app.deployer.monitor.1.thread.1] org.mule.module.launcher.DefaultArtifactDeployer: Unable to cleanly dispose artifact 'mule-example-domain'. Restart Mule if you get errors redeploying this artifact java.lang.LinkageError: loader (instance of org/mule/module/launcher/MuleSharedDomainClassLoader): attempted duplicate class definition for name: "org/mule/module/launcher/artifact/DefaultResourceReleaser" at java.lang.ClassLoader.defineClass1(Native Method) ~[?:1.8.0_25] at java.lang.ClassLoader.defineClass(ClassLoader.java:760) ~[?:1.8.0_25] at java.lang.ClassLoader.defineClass(ClassLoader.java:642) ~[?:1.8.0_25] at org.mule.module.launcher.artifact.AbstractArtifactClassLoader.createResourceReleaserInstance(AbstractArtifactClassLoader.java:94) ~[mule-module-launcher-3.6.2.jar:3.6.2] at org.mule.module.launcher.artifact.AbstractArtifactClassLoader.dispose(AbstractArtifactClassLoader.java:73) ~[mule-module-launcher-3.6.2.jar:3.6.2] at org.mule.module.launcher.domain.MuleDomainClassLoaderRepository$1.dispose(MuleDomainClassLoaderRepository.java:100) ~[mule-module-launcher-3.6.2.jar:3.6.2] at org.mule.module.launcher.domain.DefaultMuleDomain.dispose(DefaultMuleDomain.java:300) ~[mule-module-launcher-3.6.2.jar:3.6.2] at org.mule.module.launcher.domain.DomainWrapper.dispose(DomainWrapper.java:53) ~[mule-module-launcher-3.6.2.jar:3.6.2] at org.mule.module.launcher.DefaultArtifactDeployer.tryToDisposeArtifact(DefaultArtifactDeployer.java:65) ~[mule-module-launcher-3.6.2.jar:3.6.2] at org.mule.module.launcher.DefaultArtifactDeployer.undeploy(DefaultArtifactDeployer.java:47) ~[mule-module-launcher-3.6.2.jar:3.6.2] at org.mule.module.launcher.DefaultArchiveDeployer.guardedUndeploy(DefaultArchiveDeployer.java:475) ~[mule-module-launcher-3.6.2.jar:3.6.2] at org.mule.module.launcher.DefaultArchiveDeployer.undeploy(DefaultArchiveDeployer.java:417) ~[mule-module-launcher-3.6.2.jar:3.6.2] at org.mule.module.launcher.DefaultArchiveDeployer.undeployArtifact(DefaultArchiveDeployer.java:120) ~[mule-module-launcher-3.6.2.jar:3.6.2] at org.mule.module.launcher.DefaultArchiveDeployer.deployPackagedArtifact(DefaultArchiveDeployer.java:253) ~[mule-module-launcher-3.6.2.jar:3.6.2] at org.mule.module.launcher.DefaultArchiveDeployer.deployPackagedArtifact(DefaultArchiveDeployer.java:78) ~[mule-module-launcher-3.6.2.jar:3.6.2] at org.mule.module.launcher.DomainArchiveDeployer.deployPackagedArtifact(DomainArchiveDeployer.java:52) ~[mule-module-launcher-3.6.2.jar:3.6.2] at org.mule.module.launcher.DomainArchiveDeployer.deployPackagedArtifact(DomainArchiveDeployer.java:32) ~[mule-module-launcher-3.6.2.jar:3.6.2] at org.mule.module.launcher.DeploymentDirectoryWatcher.deployPackedDomains(DeploymentDirectoryWatcher.java:482) ~[mule-module-launcher-3.6.2.jar:3.6.2] at org.mule.module.launcher.DeploymentDirectoryWatcher.run(DeploymentDirectoryWatcher.java:338) ~[mule-module-launcher-3.6.2.jar:3.6.2] at java.util.concurrent.Executors$RunnableAdapter.call(Executors.java:511) ~[?:1.8.0_25] at java.util.concurrent.FutureTask.runAndReset(FutureTask.java:308) ~[?:1.8.0_25] at java.util.concurrent.ScheduledThreadPoolExecutor$ScheduledFutureTask.access$301(ScheduledThreadPoolExecutor.java:180) ~[?:1.8.0_25] at java.util.concurrent.ScheduledThreadPoolExecutor$ScheduledFutureTask.run(ScheduledThreadPoolExecutor.java:294) ~[?:1.8.0_25] at java.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1142) [?:1.8.0_25] at java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:617) [?:1.8.0_25] at java.lang.Thread.run(Thread.java:745) [?:1.8.0_25] {quote}

    MuleSoft JIRA | 2 years ago | Santiago Ramirez
    java.lang.LinkageError: loader (instance of org/mule/module/launcher/MuleSharedDomainClassLoader): attempted duplicate class definition for name: "org/mule/module/launcher/artifact/DefaultResourceReleaser"
  3. 0

    PhantomJettyClassLoader loads bridge classes multiple times

    GitHub | 2 years ago | gzm0
    java.lang.LinkageError: loader (instance of scala/scalajs/sbtplugin/env/phantomjs/PhantomJettyClassLoader): attempted duplicate class definition for name: "scala/scalajs/sbtplugin/env/phantomjs/JettyWebsocketManager"
  4. Speed up your debug routine!

    Automated exception search integrated into your IDE

  5. 0

    Error while mocking with powermock

    Stack Overflow | 2 years ago
    java.lang.ExceptionInInitializerError

    19 unregistered visitors
    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.LinkageError

      loader (instance of org/mule/module/launcher/MuleSharedDomainClassLoader): attempted duplicate class definition for name: "org/mule/module/launcher/artifact/DefaultResourceReleaser"

      at java.lang.ClassLoader.defineClass1()
    2. Java RT
      ClassLoader.defineClass
      1. java.lang.ClassLoader.defineClass1(Native Method)[?:1.8.0_25]
      2. java.lang.ClassLoader.defineClass(ClassLoader.java:760)[?:1.8.0_25]
      3. java.lang.ClassLoader.defineClass(ClassLoader.java:642)[?:1.8.0_25]
      3 frames
    3. Mule 3 Launcher
      DeploymentDirectoryWatcher.run
      1. org.mule.module.launcher.artifact.AbstractArtifactClassLoader.createResourceReleaserInstance(AbstractArtifactClassLoader.java:94)[mule-module-launcher-3.6.2.jar:3.6.2]
      2. org.mule.module.launcher.artifact.AbstractArtifactClassLoader.dispose(AbstractArtifactClassLoader.java:73)[mule-module-launcher-3.6.2.jar:3.6.2]
      3. org.mule.module.launcher.domain.MuleDomainClassLoaderRepository$1.dispose(MuleDomainClassLoaderRepository.java:100)[mule-module-launcher-3.6.2.jar:3.6.2]
      4. org.mule.module.launcher.domain.DefaultMuleDomain.dispose(DefaultMuleDomain.java:300)[mule-module-launcher-3.6.2.jar:3.6.2]
      5. org.mule.module.launcher.domain.DomainWrapper.dispose(DomainWrapper.java:53)[mule-module-launcher-3.6.2.jar:3.6.2]
      6. org.mule.module.launcher.DefaultArtifactDeployer.tryToDisposeArtifact(DefaultArtifactDeployer.java:65)[mule-module-launcher-3.6.2.jar:3.6.2]
      7. org.mule.module.launcher.DefaultArtifactDeployer.undeploy(DefaultArtifactDeployer.java:47)[mule-module-launcher-3.6.2.jar:3.6.2]
      8. org.mule.module.launcher.DefaultArchiveDeployer.guardedUndeploy(DefaultArchiveDeployer.java:475)[mule-module-launcher-3.6.2.jar:3.6.2]
      9. org.mule.module.launcher.DefaultArchiveDeployer.undeploy(DefaultArchiveDeployer.java:417)[mule-module-launcher-3.6.2.jar:3.6.2]
      10. org.mule.module.launcher.DefaultArchiveDeployer.undeployArtifact(DefaultArchiveDeployer.java:120)[mule-module-launcher-3.6.2.jar:3.6.2]
      11. org.mule.module.launcher.DefaultArchiveDeployer.deployPackagedArtifact(DefaultArchiveDeployer.java:253)[mule-module-launcher-3.6.2.jar:3.6.2]
      12. org.mule.module.launcher.DefaultArchiveDeployer.deployPackagedArtifact(DefaultArchiveDeployer.java:78)[mule-module-launcher-3.6.2.jar:3.6.2]
      13. org.mule.module.launcher.DomainArchiveDeployer.deployPackagedArtifact(DomainArchiveDeployer.java:52)[mule-module-launcher-3.6.2.jar:3.6.2]
      14. org.mule.module.launcher.DomainArchiveDeployer.deployPackagedArtifact(DomainArchiveDeployer.java:32)[mule-module-launcher-3.6.2.jar:3.6.2]
      15. org.mule.module.launcher.DeploymentDirectoryWatcher.deployPackedDomains(DeploymentDirectoryWatcher.java:482)[mule-module-launcher-3.6.2.jar:3.6.2]
      16. org.mule.module.launcher.DeploymentDirectoryWatcher.run(DeploymentDirectoryWatcher.java:338)[mule-module-launcher-3.6.2.jar:3.6.2]
      16 frames
    4. Java RT
      Thread.run
      1. java.util.concurrent.Executors$RunnableAdapter.call(Executors.java:511)[?:1.8.0_25]
      2. java.util.concurrent.FutureTask.runAndReset(FutureTask.java:308)[?:1.8.0_25]
      3. java.util.concurrent.ScheduledThreadPoolExecutor$ScheduledFutureTask.access$301(ScheduledThreadPoolExecutor.java:180)[?:1.8.0_25]
      4. java.util.concurrent.ScheduledThreadPoolExecutor$ScheduledFutureTask.run(ScheduledThreadPoolExecutor.java:294)[?:1.8.0_25]
      5. java.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1142)[?:1.8.0_25]
      6. java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:617)[?:1.8.0_25]
      7. java.lang.Thread.run(Thread.java:745)[?:1.8.0_25]
      7 frames