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

swarm 1.10 incompatibility with findbugs 4.51

    XMLWordPrintable

Details

    Description

      The version of Apache Commons Codec included with swarm-client-1.10-jar-with-dependencies.jar is to old for findbugs 4.51. This results in the the following:

      12:10:13 [FINDBUGS] Collecting findbugs analysis files...
      12:10:18 ERROR: Publisher hudson.plugins.findbugs.FindBugsPublisher aborted due to exception
      12:10:18 java.io.IOException: remote file operation failed: /var/lib/jenkins/workspace/SwtWidgets at hudson.remoting.Channel@68077427:daily-build
      12:10:18 	at hudson.FilePath.act(FilePath.java:910)
      12:10:18 	at hudson.FilePath.act(FilePath.java:887)
      12:10:18 	at hudson.plugins.findbugs.FindBugsPublisher.perform(FindBugsPublisher.java:161)
      12:10:18 	at hudson.plugins.analysis.core.HealthAwarePublisher.perform(HealthAwarePublisher.java:144)
      12:10:18 	at hudson.plugins.analysis.core.HealthAwareRecorder.perform(HealthAwareRecorder.java:333)
      12:10:18 	at hudson.tasks.BuildStepMonitor$1.perform(BuildStepMonitor.java:20)
      12:10:18 	at hudson.model.AbstractBuild$AbstractBuildExecution.perform(AbstractBuild.java:785)
      12:10:18 	at hudson.model.AbstractBuild$AbstractBuildExecution.performAllBuildSteps(AbstractBuild.java:757)
      12:10:18 	at hudson.model.Build$BuildExecution.post2(Build.java:183)
      12:10:18 	at hudson.model.AbstractBuild$AbstractBuildExecution.post(AbstractBuild.java:706)
      12:10:18 	at hudson.model.Run.execute(Run.java:1703)
      12:10:18 	at hudson.model.FreeStyleBuild.run(FreeStyleBuild.java:46)
      12:10:18 	at hudson.model.ResourceController.execute(ResourceController.java:88)
      12:10:18 	at hudson.model.Executor.run(Executor.java:231)
      12:10:18 Caused by: java.io.IOException: Remote call on daily-build failed
      12:10:18 	at hudson.remoting.Channel.call(Channel.java:731)
      12:10:18 	at hudson.FilePath.act(FilePath.java:903)
      12:10:18 	... 13 more
      12:10:18 Caused by: java.lang.NoSuchMethodError: org.apache.commons.codec.binary.Hex.encodeHexString([B)Ljava/lang/String;
      12:10:18 	at hudson.plugins.findbugs.parser.HexishString.toString(HexishString.java:58)
      12:10:18 	at hudson.plugins.findbugs.parser.HexishString.hashCode(HexishString.java:69)
      12:10:18 	at hudson.plugins.findbugs.parser.Bug.hashCode(Bug.java:328)
      12:10:18 	at java.util.HashMap.hash(HashMap.java:366)
      12:10:18 	at java.util.HashMap.put(HashMap.java:496)
      12:10:18 	at java.util.HashSet.add(HashSet.java:217)
      12:10:18 	at hudson.plugins.analysis.core.ParserResult.addAnnotation(ParserResult.java:229)
      12:10:18 	at hudson.plugins.analysis.core.ParserResult.addAnnotations(ParserResult.java:242)
      12:10:18 	at hudson.plugins.analysis.core.FilesParser.parseFile(FilesParser.java:307)
      12:10:18 	at hudson.plugins.analysis.core.FilesParser.parseFiles(FilesParser.java:264)
      12:10:18 	at hudson.plugins.analysis.core.FilesParser.parserCollectionOfFiles(FilesParser.java:215)
      12:10:18 	at hudson.plugins.analysis.core.FilesParser.invoke(FilesParser.java:184)
      12:10:18 	at hudson.plugins.analysis.core.FilesParser.invoke(FilesParser.java:31)
      12:10:18 	at hudson.FilePath$FileCallableWrapper.call(FilePath.java:2461)
      12:10:18 	at hudson.remoting.UserRequest.perform(UserRequest.java:118)
      12:10:18 	at hudson.remoting.UserRequest.perform(UserRequest.java:48)
      12:10:18 	at hudson.remoting.Request$2.run(Request.java:326)
      12:10:18 	at hudson.remoting.InterceptingExecutorService$1.call(InterceptingExecutorService.java:72)
      12:10:18 	at java.util.concurrent.FutureTask.run(FutureTask.java:262)
      12:10:18 	at java.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1145)
      12:10:18 	at java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:615)
      12:10:18 	at hudson.remoting.Engine$1$1.run(Engine.java:63)
      12:10:18 	at java.lang.Thread.run(Thread.java:744)
      

      Unpacking swarm-client-1.10-jar-with-dependencies.jar and replacing everything under org/apache/commons/codec with the 1.9 version of Apache Commons Codec fixed the problem.

      Here is the dependency tree of the swarm plugin:

      [INFO] org.jenkins-ci.plugins:swarm-client:jar:1.11-SNAPSHOT
      [INFO] +- args4j:args4j:jar:2.0.21:compile
      [INFO] +- org.jenkins-ci.main:remoting:jar:2.32:compile
      [INFO] |  +- org.apache.ant:ant:jar:1.8.3:compile
      [INFO] |  |  \- org.apache.ant:ant-launcher:jar:1.8.3:compile
      [INFO] |  \- org.jenkins-ci:constant-pool-scanner:jar:1.2:compile
      [INFO] +- commons-httpclient:commons-httpclient:jar:3.1:compile
      [INFO] |  +- commons-logging:commons-logging:jar:1.0.4:compile
      [INFO] |  \- commons-codec:commons-codec:jar:1.2:compile
      

      Attachments

        Activity

          drulli Ulli Hafner added a comment - - edited

          The library should be updated in the swarm plugin. Interested in providing a pull request?

          drulli Ulli Hafner added a comment - - edited The library should be updated in the swarm plugin. Interested in providing a pull request?
          markewaite Mark Waite added a comment - - edited

          I submitted a pull request to update the Jenkins dependency from 1.424 to 1.480.3. That update was enough to fix the problem I had seen. The problem I had seen seemed to match the error message reported in this bug, though it was with something other than findbugs.

          My pull request is https://github.com/jenkinsci/swarm-plugin/pull/8

          A pull request is already outstanding which offers to update the Apache commons codec. That may be the better pull request (since I'm not sure which is more valuable, retaining swarm plugin compatibility with 18 month old versions of Jenkins, or keeping the POM file as simple as possible).

          https://github.com/jenkinsci/swarm-plugin/pull/7

          markewaite Mark Waite added a comment - - edited I submitted a pull request to update the Jenkins dependency from 1.424 to 1.480.3. That update was enough to fix the problem I had seen. The problem I had seen seemed to match the error message reported in this bug, though it was with something other than findbugs. My pull request is https://github.com/jenkinsci/swarm-plugin/pull/8 A pull request is already outstanding which offers to update the Apache commons codec. That may be the better pull request (since I'm not sure which is more valuable, retaining swarm plugin compatibility with 18 month old versions of Jenkins, or keeping the POM file as simple as possible). https://github.com/jenkinsci/swarm-plugin/pull/7
          markewaite Mark Waite added a comment -

          Pull requests which are candidates to fix this include:

          https://github.com/jenkinsci/swarm-plugin/pull/8

          https://github.com/jenkinsci/swarm-plugin/pull/7

          If either of those are acceptable, they should resolve this problem.

          markewaite Mark Waite added a comment - Pull requests which are candidates to fix this include: https://github.com/jenkinsci/swarm-plugin/pull/8 https://github.com/jenkinsci/swarm-plugin/pull/7 If either of those are acceptable, they should resolve this problem.

          Code changed in jenkins
          User: Mark Waite
          Path:
          pom.xml
          http://jenkins-ci.org/commit/swarm-plugin/45f9af6fbd972b8ede2e986578a77b258e7eb0c2
          Log:
          [Fixed JENKINS-21155] Update Swarm plugin to use Jenkins 1.480.3

          The older dependency on Jenkins 1.424 does not include the latest
          versions of the Apache commons httpclient, so it fails on some
          remote procedures with codec related messages.

          scm_issue_link SCM/JIRA link daemon added a comment - Code changed in jenkins User: Mark Waite Path: pom.xml http://jenkins-ci.org/commit/swarm-plugin/45f9af6fbd972b8ede2e986578a77b258e7eb0c2 Log: [Fixed JENKINS-21155] Update Swarm plugin to use Jenkins 1.480.3 The older dependency on Jenkins 1.424 does not include the latest versions of the Apache commons httpclient, so it fails on some remote procedures with codec related messages.

          Code changed in jenkins
          User: Ulli Hafner
          Path:
          pom.xml
          http://jenkins-ci.org/commit/swarm-plugin/7e956a1f1439fe49b2d9af62d0d9585fcb390a0f
          Log:
          Merge pull request #8 from MarkEWaite/JENKINS-21155-update-jenkins-dependency

          [Fixed JENKINS-21155] Update Swarm plugin to use Jenkins 1.480.3

          Compare: https://github.com/jenkinsci/swarm-plugin/compare/533549455dd5...7e956a1f1439

          scm_issue_link SCM/JIRA link daemon added a comment - Code changed in jenkins User: Ulli Hafner Path: pom.xml http://jenkins-ci.org/commit/swarm-plugin/7e956a1f1439fe49b2d9af62d0d9585fcb390a0f Log: Merge pull request #8 from MarkEWaite/ JENKINS-21155 -update-jenkins-dependency [Fixed JENKINS-21155] Update Swarm plugin to use Jenkins 1.480.3 Compare: https://github.com/jenkinsci/swarm-plugin/compare/533549455dd5...7e956a1f1439
          markewaite Mark Waite added a comment -

          Confirmed fixed

          markewaite Mark Waite added a comment - Confirmed fixed
          markewaite Mark Waite added a comment -

          I was wrong. I just had a colleague start a a fresh swarm client and received a stack trace which seems to indicate that pull request 7 (which explicitly inserted httpclient into the pom) is needed rather than simply updating the dependency to Jenkins 1.480.3.

          Sorry for my mistake. I am confident that I tested to confirm the problem existed, then compiled the prototype of 1.11, then confirmed that the prototype fixed the problem, and yet the problem is apparently still there in at least one form.

          markewaite Mark Waite added a comment - I was wrong. I just had a colleague start a a fresh swarm client and received a stack trace which seems to indicate that pull request 7 (which explicitly inserted httpclient into the pom) is needed rather than simply updating the dependency to Jenkins 1.480.3. Sorry for my mistake. I am confident that I tested to confirm the problem existed, then compiled the prototype of 1.11, then confirmed that the prototype fixed the problem, and yet the problem is apparently still there in at least one form.
          drulli Ulli Hafner added a comment -

          I think I fixed that in 1.12? Can you please upgrade and check?

          drulli Ulli Hafner added a comment - I think I fixed that in 1.12? Can you please upgrade and check?
          markewaite Mark Waite added a comment -

          There is no 1.12 on the distribution site, nor are there any commits for 1.12 on GitHub.

          Maybe you meant 1.11, which is the current version and is showing the problem on the test machine which I was using?

          markewaite Mark Waite added a comment - There is no 1.12 on the distribution site, nor are there any commits for 1.12 on GitHub. Maybe you meant 1.11, which is the current version and is showing the problem on the test machine which I was using?
          drulli Ulli Hafner added a comment -

          Hmm, seems that I forgot to commit before I made the 1.12 release

          Release 1.13 is on its way...

          drulli Ulli Hafner added a comment - Hmm, seems that I forgot to commit before I made the 1.12 release Release 1.13 is on its way...
          drulli Ulli Hafner added a comment -

          Ok, the release is published.

          Seems to be a bug in our release process: after making a release Maven seems not to update the git repository anymore.

          drulli Ulli Hafner added a comment - Ok, the release is published. Seems to be a bug in our release process: after making a release Maven seems not to update the git repository anymore.
          markewaite Mark Waite added a comment -

          There may be more cases where the release process is not working as hoped.

          http://maven.jenkins-ci.org/content/repositories/releases/org/jenkins-ci/plugins/swarm-client/ only includes releases through 1.11.

          markewaite Mark Waite added a comment - There may be more cases where the release process is not working as hoped. http://maven.jenkins-ci.org/content/repositories/releases/org/jenkins-ci/plugins/swarm-client/ only includes releases through 1.11.
          drulli Ulli Hafner added a comment -

          Ah, seems that I released SNAPSHOTS: http://maven.jenkins-ci.org/content/repositories/snapshots/org/jenkins-ci/plugins/swarm-client/

          Don't know what is wrong here, need to check that next week... Sorry for the delay.

          drulli Ulli Hafner added a comment - Ah, seems that I released SNAPSHOTS: http://maven.jenkins-ci.org/content/repositories/snapshots/org/jenkins-ci/plugins/swarm-client/ Don't know what is wrong here, need to check that next week... Sorry for the delay.
          drulli Ulli Hafner added a comment -

          So, now release 1.15 is available. Seems that I hit http://jira.codehaus.org/browse/MRELEASE-812

          drulli Ulli Hafner added a comment - So, now release 1.15 is available. Seems that I hit http://jira.codehaus.org/browse/MRELEASE-812
          markewaite Mark Waite added a comment -

          Confirmed fixed with swarm-plugin 1.15

          markewaite Mark Waite added a comment - Confirmed fixed with swarm-plugin 1.15

          People

            drulli Ulli Hafner
            samberoz Sam Beroz
            Votes:
            0 Vote for this issue
            Watchers:
            4 Start watching this issue

            Dates

              Created:
              Updated:
              Resolved: