Uploaded image for project: 'Jenkins Artifactory Plug-in'
  1. Jenkins Artifactory Plug-in
  2. HAP-489

Build failure due to multiple SLF4J bindings

    Details

    • Type: Bug
    • Status: Resolved
    • Priority: Blocker
    • Resolution: Fixed
    • Affects Version/s: 2.2.2
    • Fix Version/s: 2.2.3
    • Component/s: None
    • Labels:
      None
    • Environment:

      Jenkins 1.564
      Jenkins Artifactory Plugin 2.2.2
      No other plugins (except for those bundled with Jenkins)
      Artifactory 3.2.0

      Description

      Set up:
      I created a new Maven build and chose the Deploy artifacts to Artifactory post-build action. The workspace contains only a pom.xml with the groudId, artifactId and version elements.

      Result:
      The builds fail with the following console output.

      • If the artifactory post-build action is deleted, the builds are successful again.
      • If the artifactory plugin is downgraded to 2.2.1, the builds are successful again.

      Console Output:

      Started by user anonymous
      Building in workspace /home/stevengbrown/.jenkins/workspace/artifactory
      Parsing POMs
      [artifactory] $ java -cp /home/stevengbrown/.jenkins/plugins/maven-plugin/WEB-INF/lib/maven3-agent-1.5.jar:/usr/share/maven/boot/plexus-classworlds-2.x.jar org.jvnet.hudson.maven3.agent.Maven3Main /usr/share/maven /home/stevengbrown/.jenkins/war/WEB-INF/lib/remoting-2.41.jar /home/stevengbrown/.jenkins/plugins/maven-plugin/WEB-INF/lib/maven3-interceptor-1.5.jar /home/stevengbrown/.jenkins/plugins/maven-plugin/WEB-INF/lib/maven3-interceptor-commons-1.5.jar 44944
      <===[JENKINS REMOTING CAPACITY]===>channel started
      SLF4J: Class path contains multiple SLF4J bindings.
      SLF4J: Found binding in [jar:file:/home/stevengbrown/.jenkins/cache/artifactory-plugin/2.2.2/slf4j-jdk14-1.6.2.jar!/org/slf4j/impl/StaticLoggerBinder.class]
      SLF4J: Found binding in [file:/tmp/jenkins-remoting6994418843090034949/org/slf4j/impl/StaticLoggerBinder.class]
      SLF4J: See http://www.slf4j.org/codes.html#multiple_bindings for an explanation.
      Failed to instantiate SLF4J LoggerFactory
      Reported exception:
      java.lang.NoClassDefFoundError: org/slf4j/spi/LoggerFactoryBinder
      	at java.lang.ClassLoader.defineClass1(Native Method)
      	at java.lang.ClassLoader.defineClass(ClassLoader.java:800)
      	at java.security.SecureClassLoader.defineClass(SecureClassLoader.java:142)
      	at java.net.URLClassLoader.defineClass(URLClassLoader.java:449)
      	at java.net.URLClassLoader.access$100(URLClassLoader.java:71)
      	at java.net.URLClassLoader$1.run(URLClassLoader.java:361)
      	at java.net.URLClassLoader$1.run(URLClassLoader.java:355)
      	at java.security.AccessController.doPrivileged(Native Method)
      	at java.net.URLClassLoader.findClass(URLClassLoader.java:354)
      	at org.codehaus.plexus.classworlds.realm.ClassRealm.loadClassFromSelf(ClassRealm.java:386)
      	at org.codehaus.plexus.classworlds.strategy.SelfFirstStrategy.loadClass(SelfFirstStrategy.java:42)
      	at org.codehaus.plexus.classworlds.realm.ClassRealm.loadClass(ClassRealm.java:244)
      	at org.codehaus.plexus.classworlds.realm.ClassRealm.loadClass(ClassRealm.java:230)
      	at org.codehaus.plexus.classworlds.realm.ClassRealm.loadClassFromParent(ClassRealm.java:405)
      	at org.codehaus.plexus.classworlds.strategy.SelfFirstStrategy.loadClass(SelfFirstStrategy.java:46)
      	at org.codehaus.plexus.classworlds.realm.ClassRealm.loadClass(ClassRealm.java:244)
      	at java.lang.ClassLoader.loadClass(ClassLoader.java:412)
      	at java.lang.ClassLoader.loadClass(ClassLoader.java:358)
      	at org.slf4j.LoggerFactory.bind(LoggerFactory.java:129)
      	at org.slf4j.LoggerFactory.performInitialization(LoggerFactory.java:108)
      	at org.slf4j.LoggerFactory.getILoggerFactory(LoggerFactory.java:302)
      	at org.slf4j.LoggerFactory.getLogger(LoggerFactory.java:276)
      	at org.slf4j.LoggerFactory.getLogger(LoggerFactory.java:288)
      	at hudson.maven.Maven3Builder$MavenExecutionListener.<init>(Maven3Builder.java:352)
      	at hudson.maven.Maven3Builder.call(Maven3Builder.java:114)
      	at hudson.maven.Maven3Builder.call(Maven3Builder.java:69)
      	at hudson.remoting.UserRequest.perform(UserRequest.java:118)
      	at hudson.remoting.UserRequest.perform(UserRequest.java:48)
      	at hudson.remoting.Request$2.run(Request.java:328)
      	at hudson.remoting.InterceptingExecutorService$1.call(InterceptingExecutorService.java:72)
      	at java.util.concurrent.FutureTask.run(FutureTask.java:262)
      	at java.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1145)
      	at java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:615)
      	at java.lang.Thread.run(Thread.java:744)
      Caused by: java.lang.ClassNotFoundException: org.slf4j.spi.LoggerFactoryBinder
      	at org.codehaus.plexus.classworlds.strategy.SelfFirstStrategy.loadClass(SelfFirstStrategy.java:50)
      	at org.codehaus.plexus.classworlds.realm.ClassRealm.loadClass(ClassRealm.java:244)
      	at org.codehaus.plexus.classworlds.realm.ClassRealm.loadClass(ClassRealm.java:230)
      	... 34 more
      channel stopped
      ERROR: Failed to parse POMs
      java.io.IOException: Remote call on Channel to Maven [java, -cp, /home/stevengbrown/.jenkins/plugins/maven-plugin/WEB-INF/lib/maven3-agent-1.5.jar:/usr/share/maven/boot/plexus-classworlds-2.x.jar, org.jvnet.hudson.maven3.agent.Maven3Main, /usr/share/maven, /home/stevengbrown/.jenkins/war/WEB-INF/lib/remoting-2.41.jar, /home/stevengbrown/.jenkins/plugins/maven-plugin/WEB-INF/lib/maven3-interceptor-1.5.jar, /home/stevengbrown/.jenkins/plugins/maven-plugin/WEB-INF/lib/maven3-interceptor-commons-1.5.jar, 44944] failed
      	at hudson.remoting.Channel.call(Channel.java:748)
      	at hudson.maven.ProcessCache$MavenProcess.call(ProcessCache.java:160)
      	at hudson.maven.MavenModuleSetBuild$MavenModuleSetBuildExecution.doRun(MavenModuleSetBuild.java:843)
      	at hudson.model.AbstractBuild$AbstractBuildExecution.run(AbstractBuild.java:518)
      	at hudson.model.Run.execute(Run.java:1706)
      	at hudson.maven.MavenModuleSetBuild.run(MavenModuleSetBuild.java:529)
      	at hudson.model.ResourceController.execute(ResourceController.java:88)
      	at hudson.model.Executor.run(Executor.java:231)
      Caused by: java.lang.NoClassDefFoundError: org/slf4j/spi/LoggerFactoryBinder
      	at java.lang.ClassLoader.defineClass1(Native Method)
      	at java.lang.ClassLoader.defineClass(ClassLoader.java:800)
      	at java.security.SecureClassLoader.defineClass(SecureClassLoader.java:142)
      	at java.net.URLClassLoader.defineClass(URLClassLoader.java:449)
      	at java.net.URLClassLoader.access$100(URLClassLoader.java:71)
      	at java.net.URLClassLoader$1.run(URLClassLoader.java:361)
      	at java.net.URLClassLoader$1.run(URLClassLoader.java:355)
      	at java.security.AccessController.doPrivileged(Native Method)
      	at java.net.URLClassLoader.findClass(URLClassLoader.java:354)
      	at org.codehaus.plexus.classworlds.realm.ClassRealm.loadClassFromSelf(ClassRealm.java:386)
      	at org.codehaus.plexus.classworlds.strategy.SelfFirstStrategy.loadClass(SelfFirstStrategy.java:42)
      	at org.codehaus.plexus.classworlds.realm.ClassRealm.loadClass(ClassRealm.java:244)
      	at org.codehaus.plexus.classworlds.realm.ClassRealm.loadClass(ClassRealm.java:230)
      	at org.codehaus.plexus.classworlds.realm.ClassRealm.loadClassFromParent(ClassRealm.java:405)
      	at org.codehaus.plexus.classworlds.strategy.SelfFirstStrategy.loadClass(SelfFirstStrategy.java:46)
      	at org.codehaus.plexus.classworlds.realm.ClassRealm.loadClass(ClassRealm.java:244)
      	at java.lang.ClassLoader.loadClass(ClassLoader.java:412)
      	at java.lang.ClassLoader.loadClass(ClassLoader.java:358)
      	at org.slf4j.LoggerFactory.bind(LoggerFactory.java:129)
      	at org.slf4j.LoggerFactory.performInitialization(LoggerFactory.java:108)
      	at org.slf4j.LoggerFactory.getILoggerFactory(LoggerFactory.java:302)
      	at org.slf4j.LoggerFactory.getLogger(LoggerFactory.java:276)
      	at org.slf4j.LoggerFactory.getLogger(LoggerFactory.java:288)
      	at hudson.maven.Maven3Builder$MavenExecutionListener.<init>(Maven3Builder.java:352)
      	at hudson.maven.Maven3Builder.call(Maven3Builder.java:114)
      	at hudson.maven.Maven3Builder.call(Maven3Builder.java:69)
      	at hudson.remoting.UserRequest.perform(UserRequest.java:118)
      	at hudson.remoting.UserRequest.perform(UserRequest.java:48)
      	at hudson.remoting.Request$2.run(Request.java:328)
      	at hudson.remoting.InterceptingExecutorService$1.call(InterceptingExecutorService.java:72)
      	at java.util.concurrent.FutureTask.run(FutureTask.java:262)
      	at java.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1145)
      	at java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:615)
      	at java.lang.Thread.run(Thread.java:744)
      Caused by: java.lang.ClassNotFoundException: org.slf4j.spi.LoggerFactoryBinder
      	at org.codehaus.plexus.classworlds.strategy.SelfFirstStrategy.loadClass(SelfFirstStrategy.java:50)
      	at org.codehaus.plexus.classworlds.realm.ClassRealm.loadClass(ClassRealm.java:244)
      	at org.codehaus.plexus.classworlds.realm.ClassRealm.loadClass(ClassRealm.java:230)
      	... 34 more
      Finished: FAILURE
      

        Attachments

          Activity

          Hide
          liorha Lior Hasson added a comment -

          Sorry for that, apparently we added the SLF4 Package to our plugin by mistake, following the changes in the last release.
          Until our next release (suppose to be in the following month), there is workaround for this problem:

          Deleting the problematic Jar (slf4j-jdk14-1.6.2.jar), you can find him under %JENKINS_HOME%/cache/artifactory-plugin/2.2.2,
          or in the remote slave under jenkins-slave/cache/artifactory-plugin/2.2.2

          Show
          liorha Lior Hasson added a comment - Sorry for that, apparently we added the SLF4 Package to our plugin by mistake, following the changes in the last release. Until our next release (suppose to be in the following month), there is workaround for this problem: Deleting the problematic Jar (slf4j-jdk14-1.6.2.jar), you can find him under %JENKINS_HOME%/cache/artifactory-plugin/2.2.2, or in the remote slave under jenkins-slave/cache/artifactory-plugin/2.2.2
          Hide
          StevenGBrown Steven Brown added a comment -

          Confirmed this is fixed in version 2.2.3, thanks.

          Show
          StevenGBrown Steven Brown added a comment - Confirmed this is fixed in version 2.2.3, thanks.

            People

            • Assignee:
              liorha Lior Hasson
              Reporter:
              StevenGBrown Steven Brown
            • Votes:
              2 Vote for this issue
              Watchers:
              5 Start watching this issue

              Dates

              • Created:
                Updated:
                Resolved: