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

TrendGraph Returns 500 NoClassDefFoundError org/joda/time/LocalDate

      GET job/Main/warnings2/trendGraph/png

      Status Code: 500
      Exception: java.lang.NoClassDefFoundError: org/joda/time/LocalDate
      Stacktrace:

      javax.servlet.ServletException: java.lang.NoClassDefFoundError: org/joda/time/LocalDate
      at org.kohsuke.stapler.Stapler.tryInvoke(Stapler.java:615)
      at org.kohsuke.stapler.Stapler.invoke(Stapler.java:658)
      at org.kohsuke.stapler.MetaClass$4.doDispatch(MetaClass.java:203)
      at org.kohsuke.stapler.NameBasedDispatcher.dispatch(NameBasedDispatcher.java:53)
      at org.kohsuke.stapler.Stapler.tryInvoke(Stapler.java:573)
      at org.kohsuke.stapler.Stapler.invoke(Stapler.java:658)
      at org.kohsuke.stapler.MetaClass$12.dispatch(MetaClass.java:384)
      at org.kohsuke.stapler.Stapler.tryInvoke(Stapler.java:573)
      at org.kohsuke.stapler.Stapler.invoke(Stapler.java:658)
      at org.kohsuke.stapler.MetaClass$6.doDispatch(MetaClass.java:241)
      at org.kohsuke.stapler.NameBasedDispatcher.dispatch(NameBasedDispatcher.java:53)
      at org.kohsuke.stapler.Stapler.tryInvoke(Stapler.java:573)
      at org.kohsuke.stapler.Stapler.invoke(Stapler.java:658)
      at org.kohsuke.stapler.Stapler.invoke(Stapler.java:487)
      at org.kohsuke.stapler.Stapler.service(Stapler.java:164)
      at javax.servlet.http.HttpServlet.service(HttpServlet.java:45)
      at winstone.ServletConfiguration.execute(ServletConfiguration.java:248)
      at winstone.RequestDispatcher.forward(RequestDispatcher.java:333)
      at winstone.RequestDispatcher.doFilter(RequestDispatcher.java:376)
      at hudson.util.PluginServletFilter$1.doFilter(PluginServletFilter.java:95)
      at hudson.plugins.greenballs.GreenBallFilter.doFilter(GreenBallFilter.java:58)
      at hudson.util.PluginServletFilter$1.doFilter(PluginServletFilter.java:98)
      at hudson.util.PluginServletFilter.doFilter(PluginServletFilter.java:87)
      at winstone.FilterConfiguration.execute(FilterConfiguration.java:194)
      at winstone.RequestDispatcher.doFilter(RequestDispatcher.java:366)
      at hudson.security.csrf.CrumbFilter.doFilter(CrumbFilter.java:47)
      at winstone.FilterConfiguration.execute(FilterConfiguration.java:194)
      at winstone.RequestDispatcher.doFilter(RequestDispatcher.java:366)
      at hudson.security.ChainedServletFilter$1.doFilter(ChainedServletFilter.java:84)
      at hudson.security.UnwrapSecurityExceptionFilter.doFilter(UnwrapSecurityExceptionFilter.java:51)
      at hudson.security.ChainedServletFilter$1.doFilter(ChainedServletFilter.java:87)
      at org.acegisecurity.ui.ExceptionTranslationFilter.doFilter(ExceptionTranslationFilter.java:124)
      at hudson.security.ChainedServletFilter$1.doFilter(ChainedServletFilter.java:87)
      at org.acegisecurity.providers.anonymous.AnonymousProcessingFilter.doFilter(AnonymousProcessingFilter.java:125)
      at hudson.security.ChainedServletFilter$1.doFilter(ChainedServletFilter.java:87)
      at org.acegisecurity.ui.rememberme.RememberMeProcessingFilter.doFilter(RememberMeProcessingFilter.java:142)
      at hudson.security.ChainedServletFilter$1.doFilter(ChainedServletFilter.java:87)
      at org.acegisecurity.ui.AbstractProcessingFilter.doFilter(AbstractProcessingFilter.java:271)
      at hudson.security.ChainedServletFilter$1.doFilter(ChainedServletFilter.java:87)
      at org.acegisecurity.ui.basicauth.BasicProcessingFilter.doFilter(BasicProcessingFilter.java:174)
      at hudson.security.ChainedServletFilter$1.doFilter(ChainedServletFilter.java:87)
      at jenkins.security.ApiTokenFilter.doFilter(ApiTokenFilter.java:64)
      at hudson.security.ChainedServletFilter$1.doFilter(ChainedServletFilter.java:87)
      at org.acegisecurity.context.HttpSessionContextIntegrationFilter.doFilter(HttpSessionContextIntegrationFilter.java:249)
      at hudson.security.HttpSessionContextIntegrationFilter2.doFilter(HttpSessionContextIntegrationFilter2.java:66)
      at hudson.security.ChainedServletFilter$1.doFilter(ChainedServletFilter.java:87)
      at hudson.security.ChainedServletFilter.doFilter(ChainedServletFilter.java:76)
      at hudson.security.HudsonFilter.doFilter(HudsonFilter.java:164)
      at winstone.FilterConfiguration.execute(FilterConfiguration.java:194)
      at winstone.RequestDispatcher.doFilter(RequestDispatcher.java:366)
      at org.kohsuke.stapler.compression.CompressionFilter.doFilter(CompressionFilter.java:50)
      at winstone.FilterConfiguration.execute(FilterConfiguration.java:194)
      at winstone.RequestDispatcher.doFilter(RequestDispatcher.java:366)
      at hudson.util.CharacterEncodingFilter.doFilter(CharacterEncodingFilter.java:81)
      at winstone.FilterConfiguration.execute(FilterConfiguration.java:194)
      at winstone.RequestDispatcher.doFilter(RequestDispatcher.java:366)
      at winstone.RequestDispatcher.forward(RequestDispatcher.java:331)
      at winstone.RequestHandlerThread.processRequest(RequestHandlerThread.java:227)
      at winstone.RequestHandlerThread.run(RequestHandlerThread.java:150)
      at java.util.concurrent.Executors$RunnableAdapter.call(Unknown Source)
      at java.util.concurrent.FutureTask$Sync.innerRun(Unknown Source)
      at java.util.concurrent.FutureTask.run(Unknown Source)
      at winstone.BoundedExecutorService$1.run(BoundedExecutorService.java:77)
      at java.util.concurrent.ThreadPoolExecutor$Worker.runTask(Unknown Source)
      at java.util.concurrent.ThreadPoolExecutor$Worker.run(Unknown Source)
      at java.lang.Thread.run(Unknown Source)
      Caused by: java.lang.NoClassDefFoundError: org/joda/time/LocalDate
      at hudson.plugins.analysis.graph.CategoryBuildResultGraph.createMultiSeriesPerDay(CategoryBuildResultGraph.java:346)
      at hudson.plugins.analysis.graph.CategoryBuildResultGraph.averageByDate(CategoryBuildResultGraph.java:294)
      at hudson.plugins.analysis.graph.CategoryBuildResultGraph.createChart(CategoryBuildResultGraph.java:186)
      at hudson.plugins.analysis.graph.CategoryBuildResultGraph.create(CategoryBuildResultGraph.java:64)
      at hudson.plugins.analysis.graph.BuildResultGraph$1.createGraph(BuildResultGraph.java:225)
      at hudson.util.Graph.render(Graph.java:87)
      at hudson.util.Graph.doPng(Graph.java:98)
      at sun.reflect.GeneratedMethodAccessor529.invoke(Unknown Source)
      at sun.reflect.DelegatingMethodAccessorImpl.invoke(Unknown Source)
      at java.lang.reflect.Method.invoke(Unknown Source)
      at org.kohsuke.stapler.Function$InstanceFunction.invoke(Function.java:288)
      at org.kohsuke.stapler.Function.bindAndInvoke(Function.java:151)
      at org.kohsuke.stapler.Function.bindAndInvokeAndServeResponse(Function.java:90)
      at org.kohsuke.stapler.MetaClass$1.doDispatch(MetaClass.java:111)
      at org.kohsuke.stapler.NameBasedDispatcher.dispatch(NameBasedDispatcher.java:53)
      at org.kohsuke.stapler.Stapler.tryInvoke(Stapler.java:573)
      ... 65 more

          [JENKINS-17062] TrendGraph Returns 500 NoClassDefFoundError org/joda/time/LocalDate

          Casey McGinty created issue -

          Casey McGinty added a comment -

          I think this is caused by having old job builds in the history when the plugin was not enabled. After enough subsequent builds pushed the olds ones off of the server, the trend graph came back. It looks like the plugin should be updated, to not assume all of the tracking data exists for every current build in the project.

          Casey McGinty added a comment - I think this is caused by having old job builds in the history when the plugin was not enabled. After enough subsequent builds pushed the olds ones off of the server, the trend graph came back. It looks like the plugin should be updated, to not assume all of the tracking data exists for every current build in the project.

          Seems it is not. I just had exactly same stack trace on warnings plugin trend graph image (except line numbers, but this I believe due to different Jenkins/plugins versions), and the plugin was enabled already for quite a long time, showing the trend graph correctly.

          • Jenkins - 1.540 (on linux)
          • warnings - 4.38
          • analysis-collector - 1.38

          The problem was solved by entering trend graph configuration and pressing "Save" there (without any changes to the configuration).

          Konstantin Korotkov added a comment - Seems it is not. I just had exactly same stack trace on warnings plugin trend graph image (except line numbers, but this I believe due to different Jenkins/plugins versions), and the plugin was enabled already for quite a long time, showing the trend graph correctly. Jenkins - 1.540 (on linux) warnings - 4.38 analysis-collector - 1.38 The problem was solved by entering trend graph configuration and pressing "Save" there (without any changes to the configuration).

          It is caused by the hostname mismatch. In the main jenkins configuration I have "http://jenkinshost.mydomain.tld:8080/" as Jenkins URL, but since I'm in the same domain, I accessed UI using just "http://jenkinshost:8080/". In this case trend graph image URL is "http://jenkinshost:8080/job/myjob/warnings14/trendGraph/png" and it causes error 500. When I enter configuration and press save there, I'm redirected to "http://jenkinshost.mydomain.tld:8080/", and image is shown correctly.

          Konstantin Korotkov added a comment - It is caused by the hostname mismatch. In the main jenkins configuration I have "http://jenkinshost.mydomain.tld:8080/" as Jenkins URL, but since I'm in the same domain, I accessed UI using just "http://jenkinshost:8080/". In this case trend graph image URL is "http://jenkinshost:8080/job/myjob/warnings14/trendGraph/png" and it causes error 500. When I enter configuration and press save there, I'm redirected to "http://jenkinshost.mydomain.tld:8080/", and image is shown correctly.

          Oleg Nenashev added a comment -

          Fixed components

          Oleg Nenashev added a comment - Fixed components
          Oleg Nenashev made changes -
          Component/s New: analysis-core [ 15709 ]
          Component/s New: warnings [ 15513 ]
          Component/s Original: plugin [ 15491 ]
          Assignee New: Ulli Hafner [ drulli ]

          Martin Rust added a comment -

          To me it seems this is caused by the Static Code Analysis Plugin depending on Joda-time, without the plugin actually including Joda-time.

          From my experience there are two workarounds:

          • either disable "Aggregate per day" in your trend graph config
          • or install the dashboard-view plugin, which brings along Joda-time (Thanks to Ulli Hafner for that one).

          Martin Rust added a comment - To me it seems this is caused by the Static Code Analysis Plugin depending on Joda-time, without the plugin actually including Joda-time. From my experience there are two workarounds: either disable "Aggregate per day" in your trend graph config or install the dashboard-view plugin, which brings along Joda-time (Thanks to Ulli Hafner for that one).

          Code changed in jenkins
          User: Ulli Hafner
          Path:
          pom.xml
          http://jenkins-ci.org/commit/analysis-core-plugin/fc27890b7d3a5ab8bb1a282514f11022313e8a20
          Log:
          [FIXED JENKINS-17062] Added transitive dependency of optional plugin.

          SCM/JIRA link daemon added a comment - Code changed in jenkins User: Ulli Hafner Path: pom.xml http://jenkins-ci.org/commit/analysis-core-plugin/fc27890b7d3a5ab8bb1a282514f11022313e8a20 Log: [FIXED JENKINS-17062] Added transitive dependency of optional plugin.
          SCM/JIRA link daemon made changes -
          Resolution New: Fixed [ 1 ]
          Status Original: Open [ 1 ] New: Resolved [ 5 ]

          Code changed in jenkins
          User: Ulli Hafner
          Path:
          analysis-core
          http://jenkins-ci.org/commit/analysis-suite-plugin/ccc098d14ddfc6acc6d1ddc0eb8b68a7eba99d02
          Log:
          [FIXED JENKINS-17062] Added transitive dependency of optional plugin.

          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/ccc098d14ddfc6acc6d1ddc0eb8b68a7eba99d02 Log: [FIXED JENKINS-17062] Added transitive dependency of optional plugin.

            drulli Ulli Hafner
            cmcginty Casey McGinty
            Votes:
            2 Vote for this issue
            Watchers:
            6 Start watching this issue

              Created:
              Updated:
              Resolved: