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

Plugins depending on Analysis Core plugin fails with NoSuchMethodError

    • Icon: Bug Bug
    • Resolution: Fixed
    • Icon: Critical Critical
    • analysis-core-plugin
    • None
    • Jenkins 1.587, Static Analysis Collector Plug-in 1.41, Warnings Plug-in 4.43

      I've just upgraded Jenkins with all plugins, and the warnings plugin throws an exception:

      java.lang.NoSuchMethodError: hudson.plugins.analysis.core.ParserResult.addAnnotations(Ljava/util/Collection;)V
      	at hudson.plugins.warnings.WarningsPublisher.parseConsoleLog(WarningsPublisher.java:405)
      	at hudson.plugins.warnings.WarningsPublisher.perform(WarningsPublisher.java:321)
      	at hudson.plugins.analysis.core.HealthAwareRecorder.perform(HealthAwareRecorder.java:319)
      	at hudson.tasks.BuildStepMonitor$2.perform(BuildStepMonitor.java:32)
      	at hudson.model.AbstractBuild$AbstractBuildExecution.perform(AbstractBuild.java:770)
      	at hudson.model.AbstractBuild$AbstractBuildExecution.performAllBuildSteps(AbstractBuild.java:734)
      	at hudson.model.Build$BuildExecution.post2(Build.java:183)
      	at hudson.model.AbstractBuild$AbstractBuildExecution.post(AbstractBuild.java:683)
      	at hudson.model.Run.execute(Run.java:1784)
      	at hudson.model.FreeStyleBuild.run(FreeStyleBuild.java:43)
      	at hudson.model.ResourceController.execute(ResourceController.java:89)
      	at hudson.model.Executor.run(Executor.java:240)

      Workaround

      Downgrade analysis-core plugin to 1.62 or an older release.

          [JENKINS-25405] Plugins depending on Analysis Core plugin fails with NoSuchMethodError

          Daniel Beck added a comment -

          Appears unrelated to Jenkins version. Just downgrade Analysis Core.

          Daniel Beck added a comment - Appears unrelated to Jenkins version. Just downgrade Analysis Core.

          Proposing fix using @WithBridgeMethods(value=void.class): https://github.com/jenkinsci/analysis-core-plugin/pull/25

          Oliver Gondža added a comment - Proposing fix using @WithBridgeMethods(value=void.class) : https://github.com/jenkinsci/analysis-core-plugin/pull/25

          Ben Cooksley added a comment -

          For those looking for an interim solution, downgrading "Static Code Analysis Plug-ins" to 1.62 appears to allow normal functionality to be restored.

          Could the maintainers of plugins which know they'll be a dependent chain please co-ordinate releases in the future?

          Ben Cooksley added a comment - For those looking for an interim solution, downgrading "Static Code Analysis Plug-ins" to 1.62 appears to allow normal functionality to be restored. Could the maintainers of plugins which know they'll be a dependent chain please co-ordinate releases in the future?

          Daniel Beck added a comment -

          It's the same author.

          It's just a simple mistake to make, because the change is compatible if it's in the same compile unit.

          Daniel Beck added a comment - It's the same author. It's just a simple mistake to make, because the change is compatible if it's in the same compile unit.

          valentino miazzo added a comment - - edited

          I fixed the issue by:
          Analysis Collector Plugin 1.41 --> 1.38
          FindBugs Plugin 4.57 --> 4.56
          PMD Plugin 3.39 --> 3.38
          Static Code Analysis Plug-ins 1.64 --> 1.62
          and then restarting Jenkins

          Jenkins ver. 1.580.1

          valentino miazzo added a comment - - edited I fixed the issue by: Analysis Collector Plugin 1.41 --> 1.38 FindBugs Plugin 4.57 --> 4.56 PMD Plugin 3.39 --> 3.38 Static Code Analysis Plug-ins 1.64 --> 1.62 and then restarting Jenkins Jenkins ver. 1.580.1

          Antoine Lorence added a comment - - edited

          Same for us, with Jenkins 1.580.1 LTS, resolved by downgrading Static Code Analysis Plug-ins to 1.62. Warning plugin was kept in 4.43 and everything is ok.

          Antoine Lorence added a comment - - edited Same for us, with Jenkins 1.580.1 LTS, resolved by downgrading Static Code Analysis Plug-ins to 1.62. Warning plugin was kept in 4.43 and everything is ok.

          Ryan Pavlik added a comment - - edited

          Also occurs here: using LTS Jenkins ver. 1.580.1, static analysis collector 1.41, static analysis util 1.64, and warnings 4.43.

          (Apologies if this isn't the right way to provide info to the community)

          Doesn't always seem to occur - seems to happen more if I've got a more complex combination of warning settings, have recently added or removed the analysis "publisher".

          In any case, downgrading the static analysis util to 1.62 worked around it for me.

          Ryan Pavlik added a comment - - edited Also occurs here: using LTS Jenkins ver. 1.580.1, static analysis collector 1.41, static analysis util 1.64, and warnings 4.43. (Apologies if this isn't the right way to provide info to the community) Doesn't always seem to occur - seems to happen more if I've got a more complex combination of warning settings, have recently added or removed the analysis "publisher". In any case, downgrading the static analysis util to 1.62 worked around it for me.

          wbauer added a comment -

          Same issue here, Jenkins 1.588, analysis-core 1.64.
          Rolling back analysis-core to 1.62 made it work again.
          Looks like the return type of method hudson.plugins.analysis.core.ParserResult.addAnnotations has changed, which breaks the depending plugins calling that method.

          wbauer added a comment - Same issue here, Jenkins 1.588, analysis-core 1.64. Rolling back analysis-core to 1.62 made it work again. Looks like the return type of method hudson.plugins.analysis.core.ParserResult.addAnnotations has changed, which breaks the depending plugins calling that method.

          Code changed in jenkins
          User: Oliver Gondža
          Path:
          pom.xml
          src/main/java/hudson/plugins/analysis/core/ParserResult.java
          http://jenkins-ci.org/commit/analysis-core-plugin/ebd4529fb53ac3b22a3baa02525c8308173ed2b7
          Log:
          [FIX JENKINS-25405] Bridge ParserResult#addAnnotations for void return type

          SCM/JIRA link daemon added a comment - Code changed in jenkins User: Oliver Gondža Path: pom.xml src/main/java/hudson/plugins/analysis/core/ParserResult.java http://jenkins-ci.org/commit/analysis-core-plugin/ebd4529fb53ac3b22a3baa02525c8308173ed2b7 Log: [FIX JENKINS-25405] Bridge ParserResult#addAnnotations for void return type

          Code changed in jenkins
          User: Ulli Hafner
          Path:
          pom.xml
          src/main/java/hudson/plugins/analysis/core/ParserResult.java
          http://jenkins-ci.org/commit/analysis-core-plugin/fa05502a6fcda1babcc939ee6e46f627b2ee1c72
          Log:
          Merge pull request #25 from olivergondza/JENKINS-25405

          [FIX JENKINS-25405] Bridge ParserResult#addAnnotations for void return type

          Compare: https://github.com/jenkinsci/analysis-core-plugin/compare/cf1f8f064ef6...fa05502a6fcd

          SCM/JIRA link daemon added a comment - Code changed in jenkins User: Ulli Hafner Path: pom.xml src/main/java/hudson/plugins/analysis/core/ParserResult.java http://jenkins-ci.org/commit/analysis-core-plugin/fa05502a6fcda1babcc939ee6e46f627b2ee1c72 Log: Merge pull request #25 from olivergondza/ JENKINS-25405 [FIX JENKINS-25405] Bridge ParserResult#addAnnotations for void return type Compare: https://github.com/jenkinsci/analysis-core-plugin/compare/cf1f8f064ef6...fa05502a6fcd

            drulli Ulli Hafner
            orgads Orgad Shaneh
            Votes:
            27 Vote for this issue
            Watchers:
            34 Start watching this issue

              Created:
              Updated:
              Resolved: