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

Dashboard trend graphs not displayed following plugin upgrade

    • Icon: Bug Bug
    • Resolution: Fixed
    • Icon: Minor Minor
    • None
    • Jenkins 2.10, Windows 2008 Server 64bit, Java 1.8.0_92 64bit, Dashboard View 2.9.10, Static Code Analysis 1.78

      Compiler warning trend graph portlet and open task trend graph portlet not displaying in Dashboard View following recent Jenkins/plugins updates. Jenkins logs indicated:

      java.lang.NoSuchMethodError: org.joda.time.LocalDate.compareTo(Lorg/joda/time/ReadablePartial;)I

      Most recent Dashboard View uses Joda 1.6, most recent Static Analysis uses Joda 2.1. Going in to JENKINS_HOME/plugins and removing Joda 1.6 jar from Dashboard View and copying in 2.1 jar from Static Analysis (and updating files e.g. pom.xml) resolves issues.

      Better way to clean up these dependencies?

          [JENKINS-36281] Dashboard trend graphs not displayed following plugin upgrade

          Paul Eipper added a comment - - edited

          I am not sure how to perform the "updating files e.g. pom.xml" step

          Paul Eipper added a comment - - edited I am not sure how to perform the "updating files e.g. pom.xml" step

          J K added a comment -

          Don't know if it's necessary to edit these files, or if plugins will load whatever jar is present, but with the Jenkins service stopped I edited:

          1. JENKINS_HOME\plugins\dashboard-view\WEB-INF\licenses.xml

          2. JENKINS_HOME\plugins\dashboard-view\META-INF\maven\org.jenkins-ci.plugins\dashboard-view\pom.xml

          In both, search for where joda is mentioned, and change the version listed from "1.6" to "2.1". Then restart Jenkins service.

          J K added a comment - Don't know if it's necessary to edit these files, or if plugins will load whatever jar is present, but with the Jenkins service stopped I edited: 1. JENKINS_HOME\plugins\dashboard-view\WEB-INF\licenses.xml 2. JENKINS_HOME\plugins\dashboard-view\META-INF\maven\org.jenkins-ci.plugins\dashboard-view\pom.xml In both, search for where joda is mentioned, and change the version listed from "1.6" to "2.1". Then restart Jenkins service.

          Paul Eipper added a comment -

          Thanks it worked:

          1. remove JENKINS_HOME/plugins/dashboard-view/WEB-INF/lib/joda-time-1.6.jar
          2. copy JENKINS_HOME/plugins/analysis-core/WEB-INF/lib/joda-time-2.1.jar to that folder
          3. edit the files and change the version listed from "1.6" to "2.1":
            • JENKINS_HOME/plugins/dashboard-view/WEB-INF/licenses.xml
            • JENKINS_HOME/plugins/dashboard-view/META-INF/maven/org.jenkins-ci.plugins/dashboard-view/pom.xml
          4. restart Jenkins

          Paul Eipper added a comment - Thanks it worked: remove JENKINS_HOME/plugins/dashboard-view/WEB-INF/lib/joda-time-1.6.jar copy JENKINS_HOME/plugins/analysis-core/WEB-INF/lib/joda-time-2.1.jar to that folder edit the files and change the version listed from "1.6" to "2.1": JENKINS_HOME/plugins/dashboard-view/WEB-INF/licenses.xml JENKINS_HOME/plugins/dashboard-view/META-INF/maven/org.jenkins-ci.plugins/dashboard-view/pom.xml restart Jenkins

          Hi Ulli Hafner, Have you checked whether we have to upgrade the dashboard-view? Using the workaround doesn't seem correct way to resolve the problem. Better, we should have an update of the plugin.

          Shobhit Upadhyay added a comment - Hi Ulli Hafner, Have you checked whether we have to upgrade the dashboard-view? Using the workaround doesn't seem correct way to resolve the problem. Better, we should have an update of the plugin.

          Ulli Hafner added a comment -

          No, it works if I set the dependency to joda time 1.6 in analysis-core. The fix is already ready to be released...

          Ulli Hafner added a comment - No, it works if I set the dependency to joda time 1.6 in analysis-core. The fix is already ready to be released...

          Ulli Hafner added a comment -

          Fixed in analysis-core 1.79.

          Ulli Hafner added a comment - Fixed in analysis-core 1.79.

          Code changed in jenkins
          User: Ulli Hafner
          Path:
          analysis-core
          http://jenkins-ci.org/commit/analysis-suite-plugin/814f7410d14436ec368501266280a5299b027955
          Log:
          [FIXED JENKINS-36281] Downgrade to joda-time 1.6.

          Use the same library as dashboard-view to avoid classloading problems.

          SCM/JIRA link daemon added a comment - Code changed in jenkins User: Ulli Hafner Path: analysis-core http://jenkins-ci.org/commit/analysis-suite-plugin/814f7410d14436ec368501266280a5299b027955 Log: [FIXED JENKINS-36281] Downgrade to joda-time 1.6. Use the same library as dashboard-view to avoid classloading problems.

          Code changed in jenkins
          User: Ulli Hafner
          Path:
          analysis-core.iml
          pom.xml
          http://jenkins-ci.org/commit/analysis-core-plugin/95bd089086f3979817b7ed3fad8df27bfeed389a
          Log:
          [FIXED JENKINS-36281] Downgrade to joda-time 1.6.

          Use the same library as dashboard-view to avoid classloading problems.

          SCM/JIRA link daemon added a comment - Code changed in jenkins User: Ulli Hafner Path: analysis-core.iml pom.xml http://jenkins-ci.org/commit/analysis-core-plugin/95bd089086f3979817b7ed3fad8df27bfeed389a Log: [FIXED JENKINS-36281] Downgrade to joda-time 1.6. Use the same library as dashboard-view to avoid classloading problems.

          Martin Rust added a comment -

          Hi, for me the same NoSuchMethodError is occurring again, and trend graphs are not displayed.

          After downgrading Static Analysis plugin from 1.93 to 1.92, things work again.

          Stack trace:

          java.lang.NoSuchMethodError: org.joda.time.LocalDate.compareTo(Lorg/joda/time/ReadablePartial;)I at hudson.plugins.analysis.graph.LocalDateLabel.compareTo(LocalDateLabel.java:25) at hudson.plugins.analysis.graph.LocalDateLabel.compareTo(LocalDateLabel.java:10) at java.util.TreeMap.compare(TreeMap.java:1294) at java.util.TreeMap.put(TreeMap.java:538) at java.util.TreeSet.add(TreeSet.java:255) at java.util.AbstractCollection.addAll(AbstractCollection.java:344) at java.util.TreeSet.addAll(TreeSet.java:312) at java.util.TreeSet.<init>(TreeSet.java:160) at hudson.util.DataSetBuilder.build(DataSetBuilder.java:61) at hudson.plugins.analysis.graph.CategoryBuildResultGraph.createDatasetPerDay(CategoryBuildResultGraph.java:283) at hudson.plugins.analysis.graph.CategoryBuildResultGraph.createChart(CategoryBuildResultGraph.java:184) at hudson.plugins.analysis.graph.CategoryBuildResultGraph.create(CategoryBuildResultGraph.java:61) at hudson.plugins.analysis.graph.BuildResultGraph$1.createGraph(BuildResultGraph.java:251) at hudson.util.Graph.render(Graph.java:93) at hudson.util.Graph.doMap(Graph.java:174) at java.lang.invoke.MethodHandle.invokeWithArguments(MethodHandle.java:627) at org.kohsuke.stapler.Function$MethodFunction.invoke(Function.java:343)

          Martin Rust added a comment - Hi, for me the same NoSuchMethodError is occurring again, and trend graphs are not displayed. After downgrading Static Analysis plugin from 1.93 to 1.92, things work again. Stack trace: java.lang.NoSuchMethodError: org.joda.time.LocalDate.compareTo(Lorg/joda/time/ReadablePartial;)I at hudson.plugins.analysis.graph.LocalDateLabel.compareTo(LocalDateLabel.java:25) at hudson.plugins.analysis.graph.LocalDateLabel.compareTo(LocalDateLabel.java:10) at java.util.TreeMap.compare(TreeMap.java:1294) at java.util.TreeMap.put(TreeMap.java:538) at java.util.TreeSet.add(TreeSet.java:255) at java.util.AbstractCollection.addAll(AbstractCollection.java:344) at java.util.TreeSet.addAll(TreeSet.java:312) at java.util.TreeSet.<init>(TreeSet.java:160) at hudson.util.DataSetBuilder.build(DataSetBuilder.java:61) at hudson.plugins.analysis.graph.CategoryBuildResultGraph.createDatasetPerDay(CategoryBuildResultGraph.java:283) at hudson.plugins.analysis.graph.CategoryBuildResultGraph.createChart(CategoryBuildResultGraph.java:184) at hudson.plugins.analysis.graph.CategoryBuildResultGraph.create(CategoryBuildResultGraph.java:61) at hudson.plugins.analysis.graph.BuildResultGraph$1.createGraph(BuildResultGraph.java:251) at hudson.util.Graph.render(Graph.java:93) at hudson.util.Graph.doMap(Graph.java:174) at java.lang.invoke.MethodHandle.invokeWithArguments(MethodHandle.java:627) at org.kohsuke.stapler.Function$MethodFunction.invoke(Function.java:343)

          Ben Spoor added a comment -

          This issue is also reported in JENKINS-49062

          Ben Spoor added a comment - This issue is also reported in JENKINS-49062

            drulli Ulli Hafner
            jck2 J K
            Votes:
            2 Vote for this issue
            Watchers:
            8 Start watching this issue

              Created:
              Updated:
              Resolved: