Uploaded image for project: 'Jenkins'
  1. Jenkins
  2. JENKINS-24149

LogConfigurationException due to conflicting commons-logging versions

    XMLWordPrintable

    Details

    • Type: Bug
    • Status: Closed (View Workflow)
    • Priority: Critical
    • Resolution: Fixed
    • Component/s: swarm-plugin
    • Labels:
      None
    • Environment:
      LTS 1.565.1
    • Similar Issues:

      Description

      We run a Maven type job using Jenkins version 1.565.1.
      When building on master, the job builds fine.
      When using a swarm client, the job fails with the following error shown in the console log:

      ...
      	at org.kohsuke.stapler.Stapler.<clinit>(Stapler.java:1062)
      	... 51 more
      Caused by: org.apache.commons.logging.LogConfigurationException: org.apache.commons.logging.LogConfigurationException: Invalid class loader hierarchy.  You have more than one version of 'org.apache.commons.logging.Log' visible, which is not allowed. (Caused by org.apache.commons.logging.LogConfigurationException: Invalid class loader hierarchy.  You have more than one version of 'org.apache.commons.logging.Log' visible, which is not allowed.)
      	at org.apache.commons.logging.impl.LogFactoryImpl.getLogConstructor(LogFactoryImpl.java:397)
      	at org.apache.commons.logging.impl.LogFactoryImpl.newInstance(LogFactoryImpl.java:529)
      	... 56 more
      Caused by: org.apache.commons.logging.LogConfigurationException: Invalid class loader hierarchy.  You have more than one version of 'org.apache.commons.logging.Log' visible, which is not allowed.
      	at org.apache.commons.logging.impl.LogFactoryImpl.getLogConstructor(LogFactoryImpl.java:385)
      	... 57 more
      channel stopped
      

        Attachments

          Activity

          Hide
          dawidmalina Dawid Malinowski added a comment -

          Gustavo Lucena Dalmaso Your patch works for me. I already created pull request https://github.com/jenkinsci/swarm-plugin/pull/24.

          Show
          dawidmalina Dawid Malinowski added a comment - Gustavo Lucena Dalmaso Your patch works for me. I already created pull request https://github.com/jenkinsci/swarm-plugin/pull/24 .
          Hide
          scm_issue_link SCM/JIRA link daemon added a comment -

          Code changed in jenkins
          User: Dawid Malinowski
          Path:
          client/pom.xml
          http://jenkins-ci.org/commit/swarm-plugin/849e550491366260cc7f8e6b831c7a51155f6982
          Log:
          JENKINS-24149 - LogConfigurationException due to conflicting commons-logging versions

          Show
          scm_issue_link SCM/JIRA link daemon added a comment - Code changed in jenkins User: Dawid Malinowski Path: client/pom.xml http://jenkins-ci.org/commit/swarm-plugin/849e550491366260cc7f8e6b831c7a51155f6982 Log: JENKINS-24149 - LogConfigurationException due to conflicting commons-logging versions
          Hide
          scm_issue_link SCM/JIRA link daemon added a comment -

          Code changed in jenkins
          User: Peter Jönsson
          Path:
          client/pom.xml
          http://jenkins-ci.org/commit/swarm-plugin/6aaf9453d44a46db3600485cbaba73288c4c960e
          Log:
          Merge pull request #24 from oberthur/master

          JENKINS-24149 - LogConfigurationException

          Compare: https://github.com/jenkinsci/swarm-plugin/compare/704dd97a434b...6aaf9453d44a

          Show
          scm_issue_link SCM/JIRA link daemon added a comment - Code changed in jenkins User: Peter Jönsson Path: client/pom.xml http://jenkins-ci.org/commit/swarm-plugin/6aaf9453d44a46db3600485cbaba73288c4c960e Log: Merge pull request #24 from oberthur/master JENKINS-24149 - LogConfigurationException Compare: https://github.com/jenkinsci/swarm-plugin/compare/704dd97a434b...6aaf9453d44a
          Hide
          mindjiver Peter Jönsson added a comment -

          Released in swarm-plugin-1.23

          Show
          mindjiver Peter Jönsson added a comment - Released in swarm-plugin-1.23
          Hide
          dalvizu Dan Alvizu added a comment -

          I had a different stacktrace for this issue, if it helps anyone else diagnose the issue. Upgrading to 1.23 fixed the issue.

          My stacktrace occured trying to run a FileCallable on the remote slave:

          java.io.IOException: remote file operation failed: [...]: java.io.InvalidClassException: org.apache.commons.logging.LogConfigurationException; local class incompatible: stream classdesc serialVersionUID = 1571584275865309127, local class serialVersionUID = 8486587136871052495
          	at hudson.FilePath.act(FilePath.java:985)
          	at hudson.FilePath.act(FilePath.java:967)
          	at com.[my_publisher]perform([...my_publisher...].java:105)
          	at hudson.tasks.BuildStepMonitor$1.perform(BuildStepMonitor.java:20)
          	at hudson.model.AbstractBuild$AbstractBuildExecution.perform(AbstractBuild.java:776)
          	at hudson.model.AbstractBuild$AbstractBuildExecution.performAllBuildSteps(AbstractBuild.java:723)
          	at hudson.model.Build$BuildExecution.post2(Build.java:183)
          	at hudson.model.AbstractBuild$AbstractBuildExecution.post(AbstractBuild.java:670)
          	at hudson.model.Run.execute(Run.java:1763)
          	at hudson.model.FreeStyleBuild.run(FreeStyleBuild.java:43)
          	at hudson.model.ResourceController.execute(ResourceController.java:98)
          	at hudson.model.Executor.run(Executor.java:381)
          Caused by: java.io.InvalidClassException: org.apache.commons.logging.LogConfigurationException; local class incompatible: stream classdesc serialVersionUID = 1571584275865309127, local class serialVersionUID = 8486587136871052495
          	at java.io.ObjectStreamClass.initNonProxy(ObjectStreamClass.java:617)
          	at java.io.ObjectInputStream.readNonProxyDesc(ObjectInputStream.java:1622)
          	at java.io.ObjectInputStream.readClassDesc(ObjectInputStream.java:1517)
          	at java.io.ObjectInputStream.readOrdinaryObject(ObjectInputStream.java:1771)
          	at java.io.ObjectInputStream.readObject0(ObjectInputStream.java:1350)
          	at java.io.ObjectInputStream.defaultReadFields(ObjectInputStream.java:1990)
          	at java.io.ObjectInputStream.readSerialData(ObjectInputStream.java:1915)
          	at java.io.ObjectInputStream.readOrdinaryObject(ObjectInputStream.java:1798)
          	at java.io.ObjectInputStream.readObject0(ObjectInputStream.java:1350)
          	at java.io.ObjectInputStream.readObject(ObjectInputStream.java:370)
          	at hudson.remoting.UserRequest.deserialize(UserRequest.java:185)
          	at hudson.remoting.UserResponse.retrieve(UserRequest.java:218)
          	at hudson.remoting.Channel.call(Channel.java:753)
          	at hudson.FilePath.act(FilePath.java:978)
          
          Show
          dalvizu Dan Alvizu added a comment - I had a different stacktrace for this issue, if it helps anyone else diagnose the issue. Upgrading to 1.23 fixed the issue. My stacktrace occured trying to run a FileCallable on the remote slave: java.io.IOException: remote file operation failed: [...]: java.io.InvalidClassException: org.apache.commons.logging.LogConfigurationException; local class incompatible: stream classdesc serialVersionUID = 1571584275865309127, local class serialVersionUID = 8486587136871052495 at hudson.FilePath.act(FilePath.java:985) at hudson.FilePath.act(FilePath.java:967) at com.[my_publisher]perform([...my_publisher...].java:105) at hudson.tasks.BuildStepMonitor$1.perform(BuildStepMonitor.java:20) at hudson.model.AbstractBuild$AbstractBuildExecution.perform(AbstractBuild.java:776) at hudson.model.AbstractBuild$AbstractBuildExecution.performAllBuildSteps(AbstractBuild.java:723) at hudson.model.Build$BuildExecution.post2(Build.java:183) at hudson.model.AbstractBuild$AbstractBuildExecution.post(AbstractBuild.java:670) at hudson.model.Run.execute(Run.java:1763) at hudson.model.FreeStyleBuild.run(FreeStyleBuild.java:43) at hudson.model.ResourceController.execute(ResourceController.java:98) at hudson.model.Executor.run(Executor.java:381) Caused by: java.io.InvalidClassException: org.apache.commons.logging.LogConfigurationException; local class incompatible: stream classdesc serialVersionUID = 1571584275865309127, local class serialVersionUID = 8486587136871052495 at java.io.ObjectStreamClass.initNonProxy(ObjectStreamClass.java:617) at java.io.ObjectInputStream.readNonProxyDesc(ObjectInputStream.java:1622) at java.io.ObjectInputStream.readClassDesc(ObjectInputStream.java:1517) at java.io.ObjectInputStream.readOrdinaryObject(ObjectInputStream.java:1771) at java.io.ObjectInputStream.readObject0(ObjectInputStream.java:1350) at java.io.ObjectInputStream.defaultReadFields(ObjectInputStream.java:1990) at java.io.ObjectInputStream.readSerialData(ObjectInputStream.java:1915) at java.io.ObjectInputStream.readOrdinaryObject(ObjectInputStream.java:1798) at java.io.ObjectInputStream.readObject0(ObjectInputStream.java:1350) at java.io.ObjectInputStream.readObject(ObjectInputStream.java:370) at hudson.remoting.UserRequest.deserialize(UserRequest.java:185) at hudson.remoting.UserResponse.retrieve(UserRequest.java:218) at hudson.remoting.Channel.call(Channel.java:753) at hudson.FilePath.act(FilePath.java:978)

            People

            • Assignee:
              mindjiver Peter Jönsson
              Reporter:
              rkok Rene Kok
            • Votes:
              0 Vote for this issue
              Watchers:
              9 Start watching this issue

              Dates

              • Created:
                Updated:
                Resolved: