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

Could not initialize class org.jfree.chart.JFreeChart

    Details

    • Type: Bug
    • Status: Reopened (View Workflow)
    • Priority: Minor
    • Resolution: Unresolved
    • Component/s: core
    • Labels:
      None
    • Environment:
      Debian Testing
      Jenkins 2.19.2
      Java 1.8.0_111
    • Similar Issues:

      Description

      All graphs in Jenkins (eg. /buildTimeGraph/png) result in this error: "javax.servlet.ServletException: java.lang.NoClassDefFoundError: Could not initialize class org.jfree.chart.JFreeChart"

      JENKINS-21839 looked similar, but I've confirmed that -Djava.awt.headless=true is already being passed to the Java process.

      Full stack trace:

      javax.servlet.ServletException: java.lang.NoClassDefFoundError: Could not initialize class org.jfree.chart.JFreeChart
      	at org.kohsuke.stapler.Stapler.tryInvoke(Stapler.java:796)
      	at org.kohsuke.stapler.Stapler.invoke(Stapler.java:876)
      	at org.kohsuke.stapler.MetaClass$3.doDispatch(MetaClass.java:196)
      	at org.kohsuke.stapler.NameBasedDispatcher.dispatch(NameBasedDispatcher.java:58)
      	at org.kohsuke.stapler.Stapler.tryInvoke(Stapler.java:746)
      	at org.kohsuke.stapler.Stapler.invoke(Stapler.java:876)
      	at org.kohsuke.stapler.MetaClass$5.doDispatch(MetaClass.java:233)
      	at org.kohsuke.stapler.NameBasedDispatcher.dispatch(NameBasedDispatcher.java:58)
      	at org.kohsuke.stapler.Stapler.tryInvoke(Stapler.java:746)
      	at org.kohsuke.stapler.Stapler.invoke(Stapler.java:876)
      	at org.kohsuke.stapler.MetaClass$5.doDispatch(MetaClass.java:233)
      	at org.kohsuke.stapler.NameBasedDispatcher.dispatch(NameBasedDispatcher.java:58)
      	at org.kohsuke.stapler.Stapler.tryInvoke(Stapler.java:746)
      	at org.kohsuke.stapler.Stapler.invoke(Stapler.java:876)
      	at org.kohsuke.stapler.Stapler.invoke(Stapler.java:649)
      	at org.kohsuke.stapler.Stapler.service(Stapler.java:238)
      	at javax.servlet.http.HttpServlet.service(HttpServlet.java:790)
      	at org.eclipse.jetty.servlet.ServletHolder.handle(ServletHolder.java:812)
      	at org.eclipse.jetty.servlet.ServletHandler$CachedChain.doFilter(ServletHandler.java:1669)
      	at hudson.util.PluginServletFilter$1.doFilter(PluginServletFilter.java:135)
      	at hudson.plugins.greenballs.GreenBallFilter.doFilter(GreenBallFilter.java:59)
      	at hudson.util.PluginServletFilter$1.doFilter(PluginServletFilter.java:132)
      	at hudson.util.PluginServletFilter.doFilter(PluginServletFilter.java:126)
      	at org.eclipse.jetty.servlet.ServletHandler$CachedChain.doFilter(ServletHandler.java:1652)
      	at hudson.security.csrf.CrumbFilter.doFilter(CrumbFilter.java:86)
      	at org.eclipse.jetty.servlet.ServletHandler$CachedChain.doFilter(ServletHandler.java:1652)
      	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 jenkins.security.ExceptionTranslationFilter.doFilter(ExceptionTranslationFilter.java:117)
      	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 jenkins.security.BasicHeaderProcessor.doFilter(BasicHeaderProcessor.java:93)
      	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:67)
      	at hudson.security.ChainedServletFilter$1.doFilter(ChainedServletFilter.java:87)
      	at hudson.security.ChainedServletFilter.doFilter(ChainedServletFilter.java:76)
      	at hudson.security.HudsonFilter.doFilter(HudsonFilter.java:171)
      	at org.eclipse.jetty.servlet.ServletHandler$CachedChain.doFilter(ServletHandler.java:1652)
      	at org.kohsuke.stapler.compression.CompressionFilter.doFilter(CompressionFilter.java:49)
      	at org.eclipse.jetty.servlet.ServletHandler$CachedChain.doFilter(ServletHandler.java:1652)
      	at hudson.util.CharacterEncodingFilter.doFilter(CharacterEncodingFilter.java:82)
      	at org.eclipse.jetty.servlet.ServletHandler$CachedChain.doFilter(ServletHandler.java:1652)
      	at org.kohsuke.stapler.DiagnosticThreadNameFilter.doFilter(DiagnosticThreadNameFilter.java:30)
      	at org.eclipse.jetty.servlet.ServletHandler$CachedChain.doFilter(ServletHandler.java:1652)
      	at org.eclipse.jetty.servlet.ServletHandler.doHandle(ServletHandler.java:585)
      	at org.eclipse.jetty.server.handler.ScopedHandler.handle(ScopedHandler.java:143)
      	at org.eclipse.jetty.security.SecurityHandler.handle(SecurityHandler.java:553)
      	at org.eclipse.jetty.server.session.SessionHandler.doHandle(SessionHandler.java:223)
      	at org.eclipse.jetty.server.handler.ContextHandler.doHandle(ContextHandler.java:1127)
      	at org.eclipse.jetty.servlet.ServletHandler.doScope(ServletHandler.java:515)
      	at org.eclipse.jetty.server.session.SessionHandler.doScope(SessionHandler.java:185)
      	at org.eclipse.jetty.server.handler.ContextHandler.doScope(ContextHandler.java:1061)
      	at org.eclipse.jetty.server.handler.ScopedHandler.handle(ScopedHandler.java:141)
      	at org.eclipse.jetty.server.handler.HandlerWrapper.handle(HandlerWrapper.java:97)
      	at org.eclipse.jetty.server.Server.handle(Server.java:499)
      	at org.eclipse.jetty.server.HttpChannel.handle(HttpChannel.java:311)
      	at org.eclipse.jetty.server.HttpConnection.onFillable(HttpConnection.java:257)
      	at org.eclipse.jetty.io.AbstractConnection$2.run(AbstractConnection.java:544)
      	at winstone.BoundedExecutorService$1.run(BoundedExecutorService.java:77)
      	at java.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1142)
      	at java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:617)
      	at java.lang.Thread.run(Thread.java:745)
      Caused by: java.lang.NoClassDefFoundError: Could not initialize class org.jfree.chart.JFreeChart
      	at org.jfree.chart.ChartFactory.createStackedAreaChart(ChartFactory.java:1124)
      	at hudson.model.Job$3.createGraph(Job.java:1402)
      	at hudson.util.Graph.render(Graph.java:93)
      	at hudson.util.Graph.doPng(Graph.java:120)
      	at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
      	at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:62)
      	at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43)
      	at java.lang.reflect.Method.invoke(Method.java:498)
      	at org.kohsuke.stapler.Function$InstanceFunction.invoke(Function.java:324)
      	at org.kohsuke.stapler.Function.bindAndInvoke(Function.java:167)
      	at org.kohsuke.stapler.Function.bindAndInvokeAndServeResponse(Function.java:100)
      	at org.kohsuke.stapler.MetaClass$1.doDispatch(MetaClass.java:124)
      	at org.kohsuke.stapler.NameBasedDispatcher.dispatch(NameBasedDispatcher.java:58)
      	at org.kohsuke.stapler.Stapler.tryInvoke(Stapler.java:746)
      	... 68 more
      

        Attachments

          Activity

          Hide
          oleg_nenashev Oleg Nenashev added a comment -

          Please provide a full startup log for your instance

          Show
          oleg_nenashev Oleg Nenashev added a comment - Please provide a full startup log for your instance
          Hide
          daniel15 Daniel Lo Nigro added a comment -

          Oleg Nenashev - This is the log at /var/log/jenkins/jenkins.log:

          Running from: /usr/share/jenkins/jenkins.war
          Nov 10, 2016 1:39:37 PM Main deleteWinstoneTempContents
          WARNING: Failed to delete the temporary Winstone file /tmp/winstone/jenkins.war
          Nov 10, 2016 1:39:38 PM org.eclipse.jetty.util.log.JavaUtilLog info
          INFO: Logging initialized @1137ms
          Nov 10, 2016 1:39:38 PM winstone.Logger logInternal
          INFO: Beginning extraction from war file
          Nov 10, 2016 1:39:38 PM org.eclipse.jetty.util.log.JavaUtilLog warn
          WARNING: Empty contextPath
          Nov 10, 2016 1:39:38 PM org.eclipse.jetty.util.log.JavaUtilLog info
          INFO: jetty-9.2.z-SNAPSHOT
          Nov 10, 2016 1:39:39 PM org.eclipse.jetty.util.log.JavaUtilLog info
          INFO: NO JSP Support for /, did not find org.eclipse.jetty.jsp.JettyJspServlet
          Jenkins home directory: /var/lib/jenkins found at: EnvVars.masterEnvVars.get("JENKINS_HOME")
          Nov 10, 2016 1:39:40 PM org.eclipse.jetty.util.log.JavaUtilLog info
          INFO: Started w.@1530c739{/,file:/var/cache/jenkins/war/,AVAILABLE}{/var/cache/jenkins/war}
          Nov 10, 2016 1:39:40 PM org.eclipse.jetty.util.log.JavaUtilLog info
          INFO: Started ServerConnector@7161d8d1{HTTP/1.1}{0.0.0.0:8080}
          Nov 10, 2016 1:39:40 PM org.eclipse.jetty.util.log.JavaUtilLog info
          INFO: Started @3644ms
          Nov 10, 2016 1:39:40 PM winstone.Logger logInternal
          INFO: Winstone Servlet Engine v2.0 running: controlPort=disabled
          Nov 10, 2016 1:39:41 PM jenkins.InitReactorRunner$1 onAttained
          INFO: Started initialization
          Nov 10, 2016 1:39:41 PM jenkins.InitReactorRunner$1 onAttained
          INFO: Listed all plugins
          Nov 10, 2016 1:39:41 PM jenkins.bouncycastle.api.SecurityProviderInitializer addSecurityProvider
          INFO: Initializing Bouncy Castle security provider.
          Nov 10, 2016 1:39:42 PM jenkins.bouncycastle.api.SecurityProviderInitializer addSecurityProvider
          INFO: Bouncy Castle security provider initialized.
          Nov 10, 2016 1:39:53 PM jenkins.InitReactorRunner$1 onAttained
          INFO: Prepared all plugins
          Nov 10, 2016 1:39:54 PM hudson.ExtensionFinder$GuiceFinder$FaultTolerantScope$1 error
          INFO: Failed to instantiate optional component hudson.plugins.build_timeout.operations.AbortAndRestartOperation$DescriptorImpl; skipping
          Nov 10, 2016 1:39:55 PM jenkins.InitReactorRunner$1 onAttained
          INFO: Started all plugins
          Nov 10, 2016 1:39:56 PM jenkins.InitReactorRunner$1 onAttained
          INFO: Augmented all extensions
          Nov 10, 2016 1:39:56 PM jenkins.InitReactorRunner$1 onAttained
          INFO: Loaded all jobs
          Nov 10, 2016 1:39:57 PM org.jenkinsci.main.modules.sshd.SSHD start
          INFO: Started SSHD at port 43529
          Nov 10, 2016 1:39:57 PM jenkins.InitReactorRunner$1 onAttained
          INFO: Completed initialization
          Nov 10, 2016 1:39:57 PM hudson.model.AsyncPeriodicWork$1 run
          INFO: Started Download metadata
          Nov 10, 2016 1:39:57 PM hudson.model.AsyncPeriodicWork$1 run
          INFO: Finished Download metadata. 8 ms
          Nov 10, 2016 1:39:58 PM org.springframework.context.support.AbstractApplicationContext prepareRefresh
          INFO: Refreshing org.springframework.web.context.support.StaticWebApplicationContext@37895331: display name [Root WebApplicationContext]; startup date [Thu Nov 10 13:39:58 PST 2016]; root of context hierarchy
          Nov 10, 2016 1:39:58 PM org.springframework.context.support.AbstractApplicationContext obtainFreshBeanFactory
          INFO: Bean factory for application context [org.springframework.web.context.support.StaticWebApplicationContext@37895331]: org.springframework.beans.factory.support.DefaultListableBeanFactory@4c7ef20c
          Nov 10, 2016 1:39:58 PM org.springframework.beans.factory.support.DefaultListableBeanFactory preInstantiateSingletons
          INFO: Pre-instantiating singletons in org.springframework.beans.factory.support.DefaultListableBeanFactory@4c7ef20c: defining beans [filter,legacy]; root of factory hierarchy
          Nov 10, 2016 1:39:58 PM hudson.WebAppMain$3 run
          INFO: Jenkins is fully up and running
          

          While investigating, I did notice a different error in the logs too (didn't see this one in the UI):

          Nov 10, 2016 1:42:27 PM org.eclipse.jetty.util.log.JavaUtilLog warn
          WARNING: Error while serving https://build.dan.cx/job/test/buildTimeGraph/png
          java.lang.reflect.InvocationTargetException
                  at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
                  at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:62)
                  at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43)
                  at java.lang.reflect.Method.invoke(Method.java:498)
                  at org.kohsuke.stapler.Function$InstanceFunction.invoke(Function.java:324)
                  at org.kohsuke.stapler.Function.bindAndInvoke(Function.java:167)
                  at org.kohsuke.stapler.Function.bindAndInvokeAndServeResponse(Function.java:100)
                  at org.kohsuke.stapler.MetaClass$1.doDispatch(MetaClass.java:124)
                  at org.kohsuke.stapler.NameBasedDispatcher.dispatch(NameBasedDispatcher.java:58)
                  at org.kohsuke.stapler.Stapler.tryInvoke(Stapler.java:746)
                  at org.kohsuke.stapler.Stapler.invoke(Stapler.java:876)
                  at org.kohsuke.stapler.MetaClass$3.doDispatch(MetaClass.java:196)
                  at org.kohsuke.stapler.NameBasedDispatcher.dispatch(NameBasedDispatcher.java:58)
                  at org.kohsuke.stapler.Stapler.tryInvoke(Stapler.java:746)
                  at org.kohsuke.stapler.Stapler.invoke(Stapler.java:876)
                  at org.kohsuke.stapler.MetaClass$5.doDispatch(MetaClass.java:233)
                  at org.kohsuke.stapler.NameBasedDispatcher.dispatch(NameBasedDispatcher.java:58)
                  at org.kohsuke.stapler.Stapler.tryInvoke(Stapler.java:746)
                  at org.kohsuke.stapler.Stapler.invoke(Stapler.java:876)
                  at org.kohsuke.stapler.MetaClass$5.doDispatch(MetaClass.java:233)
                  at org.kohsuke.stapler.NameBasedDispatcher.dispatch(NameBasedDispatcher.java:58)
                  at org.kohsuke.stapler.Stapler.tryInvoke(Stapler.java:746)
                  at org.kohsuke.stapler.Stapler.invoke(Stapler.java:876)
                  at org.kohsuke.stapler.Stapler.invoke(Stapler.java:649)
                  at org.kohsuke.stapler.Stapler.service(Stapler.java:238)
                  at javax.servlet.http.HttpServlet.service(HttpServlet.java:790)
                  at org.eclipse.jetty.servlet.ServletHolder.handle(ServletHolder.java:812)
                  at org.eclipse.jetty.servlet.ServletHandler$CachedChain.doFilter(ServletHandler.java:1669)
                  at hudson.util.PluginServletFilter$1.doFilter(PluginServletFilter.java:135)
                  at hudson.plugins.greenballs.GreenBallFilter.doFilter(GreenBallFilter.java:59)
                  at hudson.util.PluginServletFilter$1.doFilter(PluginServletFilter.java:132)
                  at hudson.util.PluginServletFilter.doFilter(PluginServletFilter.java:126)
                  at org.eclipse.jetty.servlet.ServletHandler$CachedChain.doFilter(ServletHandler.java:1652)
                  at hudson.security.csrf.CrumbFilter.doFilter(CrumbFilter.java:86)
                  at org.eclipse.jetty.servlet.ServletHandler$CachedChain.doFilter(ServletHandler.java:1652)
                  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 jenkins.security.ExceptionTranslationFilter.doFilter(ExceptionTranslationFilter.java:117)
                  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:135)
                  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 jenkins.security.BasicHeaderProcessor.doFilter(BasicHeaderProcessor.java:93)
                  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:67)
                  at hudson.security.ChainedServletFilter$1.doFilter(ChainedServletFilter.java:87)
                  at hudson.security.ChainedServletFilter.doFilter(ChainedServletFilter.java:76)
                  at hudson.security.HudsonFilter.doFilter(HudsonFilter.java:171)
                  at org.eclipse.jetty.servlet.ServletHandler$CachedChain.doFilter(ServletHandler.java:1652)
                  at org.kohsuke.stapler.compression.CompressionFilter.doFilter(CompressionFilter.java:49)
                  at org.eclipse.jetty.servlet.ServletHandler$CachedChain.doFilter(ServletHandler.java:1652)
                  at hudson.util.CharacterEncodingFilter.doFilter(CharacterEncodingFilter.java:82)
                  at org.eclipse.jetty.servlet.ServletHandler$CachedChain.doFilter(ServletHandler.java:1652)
                  at org.kohsuke.stapler.DiagnosticThreadNameFilter.doFilter(DiagnosticThreadNameFilter.java:30)
                  at org.eclipse.jetty.servlet.ServletHandler$CachedChain.doFilter(ServletHandler.java:1652)
                  at org.eclipse.jetty.servlet.ServletHandler.doHandle(ServletHandler.java:585)
                  at org.eclipse.jetty.server.handler.ScopedHandler.handle(ScopedHandler.java:143)
                  at org.eclipse.jetty.security.SecurityHandler.handle(SecurityHandler.java:553)
                  at org.eclipse.jetty.server.session.SessionHandler.doHandle(SessionHandler.java:223)
                  at org.eclipse.jetty.server.handler.ContextHandler.doHandle(ContextHandler.java:1127)
                  at org.eclipse.jetty.servlet.ServletHandler.doScope(ServletHandler.java:515)
                  at org.eclipse.jetty.server.session.SessionHandler.doScope(SessionHandler.java:185)
                  at org.eclipse.jetty.server.handler.ContextHandler.doScope(ContextHandler.java:1061)
                  at org.eclipse.jetty.server.handler.ScopedHandler.handle(ScopedHandler.java:141)
                  at org.eclipse.jetty.server.handler.HandlerWrapper.handle(HandlerWrapper.java:97)
                  at org.eclipse.jetty.server.Server.handle(Server.java:499)
                  at org.eclipse.jetty.server.HttpChannel.handle(HttpChannel.java:311)
                  at org.eclipse.jetty.server.HttpConnection.onFillable(HttpConnection.java:257)
                  at org.eclipse.jetty.io.AbstractConnection$2.run(AbstractConnection.java:544)
                  at winstone.BoundedExecutorService$1.run(BoundedExecutorService.java:77)
                  at java.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1142)
                  at java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:617)
                  at java.lang.Thread.run(Thread.java:745)
          Caused by: java.awt.AWTError: Assistive Technology not found: org.GNOME.Accessibility.AtkWrapper
                  at java.awt.Toolkit.loadAssistiveTechnologies(Toolkit.java:807)
                  at java.awt.Toolkit.getDefaultToolkit(Toolkit.java:886)
                  at sun.swing.SwingUtilities2.getSystemMnemonicKeyMask(SwingUtilities2.java:2020)
                  at javax.swing.plaf.basic.BasicLookAndFeel.initComponentDefaults(BasicLookAndFeel.java:1158)
                  at javax.swing.plaf.metal.MetalLookAndFeel.initComponentDefaults(MetalLookAndFeel.java:431)
                  at javax.swing.plaf.basic.BasicLookAndFeel.getDefaults(BasicLookAndFeel.java:148)
                  at javax.swing.plaf.metal.MetalLookAndFeel.getDefaults(MetalLookAndFeel.java:1577)
                  at javax.swing.UIManager.setLookAndFeel(UIManager.java:539)
                  at javax.swing.UIManager.setLookAndFeel(UIManager.java:579)
                  at javax.swing.UIManager.initializeDefaultLAF(UIManager.java:1349)
                  at javax.swing.UIManager.initialize(UIManager.java:1459)
                  at javax.swing.UIManager.maybeInitialize(UIManager.java:1426)
                  at javax.swing.UIManager.getDefaults(UIManager.java:659)
                  at javax.swing.UIManager.getColor(UIManager.java:701)
                  at org.jfree.chart.JFreeChart.<clinit>(JFreeChart.java:252)
                  at org.jfree.chart.ChartFactory.createStackedAreaChart(ChartFactory.java:1124)
                  at hudson.model.Job$3.createGraph(Job.java:1402)
                  at hudson.util.Graph.render(Graph.java:93)
                  at hudson.util.Graph.doPng(Graph.java:120)
                  ... 78 more
          

          I searched around a bit and found this AskUbuntu post: https://askubuntu.com/questions/695560/assistive-technology-not-found-error-while-building-aprof-plot, which suggested editing /etc/java-8-openjdk/accessibility.properties and commenting out the assistive_technologies line. I did that and it worked fine!

          I think the Jenkins documentation should be updated, or some defaults need to be tweaked or something. Currently I can replicate this issue out-of-the-box on Debian by creating a brand new server and installing the Jenkins Debian package. All the graphs fail without this tweak.

          Thanks.

          Show
          daniel15 Daniel Lo Nigro added a comment - Oleg Nenashev - This is the log at /var/log/jenkins/jenkins.log: Running from: /usr/share/jenkins/jenkins.war Nov 10, 2016 1:39:37 PM Main deleteWinstoneTempContents WARNING: Failed to delete the temporary Winstone file /tmp/winstone/jenkins.war Nov 10, 2016 1:39:38 PM org.eclipse.jetty.util.log.JavaUtilLog info INFO: Logging initialized @1137ms Nov 10, 2016 1:39:38 PM winstone.Logger logInternal INFO: Beginning extraction from war file Nov 10, 2016 1:39:38 PM org.eclipse.jetty.util.log.JavaUtilLog warn WARNING: Empty contextPath Nov 10, 2016 1:39:38 PM org.eclipse.jetty.util.log.JavaUtilLog info INFO: jetty-9.2.z-SNAPSHOT Nov 10, 2016 1:39:39 PM org.eclipse.jetty.util.log.JavaUtilLog info INFO: NO JSP Support for /, did not find org.eclipse.jetty.jsp.JettyJspServlet Jenkins home directory: / var /lib/jenkins found at: EnvVars.masterEnvVars.get( "JENKINS_HOME" ) Nov 10, 2016 1:39:40 PM org.eclipse.jetty.util.log.JavaUtilLog info INFO: Started w.@1530c739{/,file:/ var /cache/jenkins/war/,AVAILABLE}{/ var /cache/jenkins/war} Nov 10, 2016 1:39:40 PM org.eclipse.jetty.util.log.JavaUtilLog info INFO: Started ServerConnector@7161d8d1{HTTP/1.1}{0.0.0.0:8080} Nov 10, 2016 1:39:40 PM org.eclipse.jetty.util.log.JavaUtilLog info INFO: Started @3644ms Nov 10, 2016 1:39:40 PM winstone.Logger logInternal INFO: Winstone Servlet Engine v2.0 running: controlPort=disabled Nov 10, 2016 1:39:41 PM jenkins.InitReactorRunner$1 onAttained INFO: Started initialization Nov 10, 2016 1:39:41 PM jenkins.InitReactorRunner$1 onAttained INFO: Listed all plugins Nov 10, 2016 1:39:41 PM jenkins.bouncycastle.api.SecurityProviderInitializer addSecurityProvider INFO: Initializing Bouncy Castle security provider. Nov 10, 2016 1:39:42 PM jenkins.bouncycastle.api.SecurityProviderInitializer addSecurityProvider INFO: Bouncy Castle security provider initialized. Nov 10, 2016 1:39:53 PM jenkins.InitReactorRunner$1 onAttained INFO: Prepared all plugins Nov 10, 2016 1:39:54 PM hudson.ExtensionFinder$GuiceFinder$FaultTolerantScope$1 error INFO: Failed to instantiate optional component hudson.plugins.build_timeout.operations.AbortAndRestartOperation$DescriptorImpl; skipping Nov 10, 2016 1:39:55 PM jenkins.InitReactorRunner$1 onAttained INFO: Started all plugins Nov 10, 2016 1:39:56 PM jenkins.InitReactorRunner$1 onAttained INFO: Augmented all extensions Nov 10, 2016 1:39:56 PM jenkins.InitReactorRunner$1 onAttained INFO: Loaded all jobs Nov 10, 2016 1:39:57 PM org.jenkinsci.main.modules.sshd.SSHD start INFO: Started SSHD at port 43529 Nov 10, 2016 1:39:57 PM jenkins.InitReactorRunner$1 onAttained INFO: Completed initialization Nov 10, 2016 1:39:57 PM hudson.model.AsyncPeriodicWork$1 run INFO: Started Download metadata Nov 10, 2016 1:39:57 PM hudson.model.AsyncPeriodicWork$1 run INFO: Finished Download metadata. 8 ms Nov 10, 2016 1:39:58 PM org.springframework.context.support.AbstractApplicationContext prepareRefresh INFO: Refreshing org.springframework.web.context.support.StaticWebApplicationContext@37895331: display name [Root WebApplicationContext]; startup date [Thu Nov 10 13:39:58 PST 2016]; root of context hierarchy Nov 10, 2016 1:39:58 PM org.springframework.context.support.AbstractApplicationContext obtainFreshBeanFactory INFO: Bean factory for application context [org.springframework.web.context.support.StaticWebApplicationContext@37895331]: org.springframework.beans.factory.support.DefaultListableBeanFactory@4c7ef20c Nov 10, 2016 1:39:58 PM org.springframework.beans.factory.support.DefaultListableBeanFactory preInstantiateSingletons INFO: Pre-instantiating singletons in org.springframework.beans.factory.support.DefaultListableBeanFactory@4c7ef20c: defining beans [filter,legacy]; root of factory hierarchy Nov 10, 2016 1:39:58 PM hudson.WebAppMain$3 run INFO: Jenkins is fully up and running While investigating, I did notice a different error in the logs too (didn't see this one in the UI): Nov 10, 2016 1:42:27 PM org.eclipse.jetty.util.log.JavaUtilLog warn WARNING: Error while serving https: //build.dan.cx/job/test/buildTimeGraph/png java.lang.reflect.InvocationTargetException at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method) at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:62) at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43) at java.lang.reflect.Method.invoke(Method.java:498) at org.kohsuke.stapler.Function$InstanceFunction.invoke(Function.java:324) at org.kohsuke.stapler.Function.bindAndInvoke(Function.java:167) at org.kohsuke.stapler.Function.bindAndInvokeAndServeResponse(Function.java:100) at org.kohsuke.stapler.MetaClass$1.doDispatch(MetaClass.java:124) at org.kohsuke.stapler.NameBasedDispatcher.dispatch(NameBasedDispatcher.java:58) at org.kohsuke.stapler.Stapler.tryInvoke(Stapler.java:746) at org.kohsuke.stapler.Stapler.invoke(Stapler.java:876) at org.kohsuke.stapler.MetaClass$3.doDispatch(MetaClass.java:196) at org.kohsuke.stapler.NameBasedDispatcher.dispatch(NameBasedDispatcher.java:58) at org.kohsuke.stapler.Stapler.tryInvoke(Stapler.java:746) at org.kohsuke.stapler.Stapler.invoke(Stapler.java:876) at org.kohsuke.stapler.MetaClass$5.doDispatch(MetaClass.java:233) at org.kohsuke.stapler.NameBasedDispatcher.dispatch(NameBasedDispatcher.java:58) at org.kohsuke.stapler.Stapler.tryInvoke(Stapler.java:746) at org.kohsuke.stapler.Stapler.invoke(Stapler.java:876) at org.kohsuke.stapler.MetaClass$5.doDispatch(MetaClass.java:233) at org.kohsuke.stapler.NameBasedDispatcher.dispatch(NameBasedDispatcher.java:58) at org.kohsuke.stapler.Stapler.tryInvoke(Stapler.java:746) at org.kohsuke.stapler.Stapler.invoke(Stapler.java:876) at org.kohsuke.stapler.Stapler.invoke(Stapler.java:649) at org.kohsuke.stapler.Stapler.service(Stapler.java:238) at javax.servlet.http.HttpServlet.service(HttpServlet.java:790) at org.eclipse.jetty.servlet.ServletHolder.handle(ServletHolder.java:812) at org.eclipse.jetty.servlet.ServletHandler$CachedChain.doFilter(ServletHandler.java:1669) at hudson.util.PluginServletFilter$1.doFilter(PluginServletFilter.java:135) at hudson.plugins.greenballs.GreenBallFilter.doFilter(GreenBallFilter.java:59) at hudson.util.PluginServletFilter$1.doFilter(PluginServletFilter.java:132) at hudson.util.PluginServletFilter.doFilter(PluginServletFilter.java:126) at org.eclipse.jetty.servlet.ServletHandler$CachedChain.doFilter(ServletHandler.java:1652) at hudson.security.csrf.CrumbFilter.doFilter(CrumbFilter.java:86) at org.eclipse.jetty.servlet.ServletHandler$CachedChain.doFilter(ServletHandler.java:1652) 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 jenkins.security.ExceptionTranslationFilter.doFilter(ExceptionTranslationFilter.java:117) 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:135) 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 jenkins.security.BasicHeaderProcessor.doFilter(BasicHeaderProcessor.java:93) 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:67) at hudson.security.ChainedServletFilter$1.doFilter(ChainedServletFilter.java:87) at hudson.security.ChainedServletFilter.doFilter(ChainedServletFilter.java:76) at hudson.security.HudsonFilter.doFilter(HudsonFilter.java:171) at org.eclipse.jetty.servlet.ServletHandler$CachedChain.doFilter(ServletHandler.java:1652) at org.kohsuke.stapler.compression.CompressionFilter.doFilter(CompressionFilter.java:49) at org.eclipse.jetty.servlet.ServletHandler$CachedChain.doFilter(ServletHandler.java:1652) at hudson.util.CharacterEncodingFilter.doFilter(CharacterEncodingFilter.java:82) at org.eclipse.jetty.servlet.ServletHandler$CachedChain.doFilter(ServletHandler.java:1652) at org.kohsuke.stapler.DiagnosticThreadNameFilter.doFilter(DiagnosticThreadNameFilter.java:30) at org.eclipse.jetty.servlet.ServletHandler$CachedChain.doFilter(ServletHandler.java:1652) at org.eclipse.jetty.servlet.ServletHandler.doHandle(ServletHandler.java:585) at org.eclipse.jetty.server.handler.ScopedHandler.handle(ScopedHandler.java:143) at org.eclipse.jetty.security.SecurityHandler.handle(SecurityHandler.java:553) at org.eclipse.jetty.server.session.SessionHandler.doHandle(SessionHandler.java:223) at org.eclipse.jetty.server.handler.ContextHandler.doHandle(ContextHandler.java:1127) at org.eclipse.jetty.servlet.ServletHandler.doScope(ServletHandler.java:515) at org.eclipse.jetty.server.session.SessionHandler.doScope(SessionHandler.java:185) at org.eclipse.jetty.server.handler.ContextHandler.doScope(ContextHandler.java:1061) at org.eclipse.jetty.server.handler.ScopedHandler.handle(ScopedHandler.java:141) at org.eclipse.jetty.server.handler.HandlerWrapper.handle(HandlerWrapper.java:97) at org.eclipse.jetty.server.Server.handle(Server.java:499) at org.eclipse.jetty.server.HttpChannel.handle(HttpChannel.java:311) at org.eclipse.jetty.server.HttpConnection.onFillable(HttpConnection.java:257) at org.eclipse.jetty.io.AbstractConnection$2.run(AbstractConnection.java:544) at winstone.BoundedExecutorService$1.run(BoundedExecutorService.java:77) at java.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1142) at java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:617) at java.lang. Thread .run( Thread .java:745) Caused by: java.awt.AWTError: Assistive Technology not found: org.GNOME.Accessibility.AtkWrapper at java.awt.Toolkit.loadAssistiveTechnologies(Toolkit.java:807) at java.awt.Toolkit.getDefaultToolkit(Toolkit.java:886) at sun.swing.SwingUtilities2.getSystemMnemonicKeyMask(SwingUtilities2.java:2020) at javax.swing.plaf.basic.BasicLookAndFeel.initComponentDefaults(BasicLookAndFeel.java:1158) at javax.swing.plaf.metal.MetalLookAndFeel.initComponentDefaults(MetalLookAndFeel.java:431) at javax.swing.plaf.basic.BasicLookAndFeel.getDefaults(BasicLookAndFeel.java:148) at javax.swing.plaf.metal.MetalLookAndFeel.getDefaults(MetalLookAndFeel.java:1577) at javax.swing.UIManager.setLookAndFeel(UIManager.java:539) at javax.swing.UIManager.setLookAndFeel(UIManager.java:579) at javax.swing.UIManager.initializeDefaultLAF(UIManager.java:1349) at javax.swing.UIManager.initialize(UIManager.java:1459) at javax.swing.UIManager.maybeInitialize(UIManager.java:1426) at javax.swing.UIManager.getDefaults(UIManager.java:659) at javax.swing.UIManager.getColor(UIManager.java:701) at org.jfree.chart.JFreeChart.<clinit>(JFreeChart.java:252) at org.jfree.chart.ChartFactory.createStackedAreaChart(ChartFactory.java:1124) at hudson.model.Job$3.createGraph(Job.java:1402) at hudson.util.Graph.render(Graph.java:93) at hudson.util.Graph.doPng(Graph.java:120) ... 78 more I searched around a bit and found this AskUbuntu post: https://askubuntu.com/questions/695560/assistive-technology-not-found-error-while-building-aprof-plot , which suggested editing /etc/java-8-openjdk/accessibility.properties and commenting out the assistive_technologies line. I did that and it worked fine! I think the Jenkins documentation should be updated, or some defaults need to be tweaked or something. Currently I can replicate this issue out-of-the-box on Debian by creating a brand new server and installing the Jenkins Debian package. All the graphs fail without this tweak. Thanks.
          Hide
          xani Mariusz Gronczewski added a comment -

          This is a bug in package deps.

          It "fixes itself" after installing defaiult-jre metapackage. Jenkins depends on default-jre-headless, hence the error.

          I believe package "fixing it" is libatk-wrapper-java-jni, altho I didnt checked above just installing default-jre (which pulled openjdk-8-jre)

          Show
          xani Mariusz Gronczewski added a comment - This is a bug in package deps. It "fixes itself" after installing defaiult-jre metapackage. Jenkins depends on default-jre-headless, hence the error. I believe package "fixing it" is libatk-wrapper-java-jni, altho I didnt checked above just installing default-jre (which pulled openjdk-8-jre)
          Hide
          paulrm Paul Messina added a comment -

          I found in openSUSE Tumbleweed 20170329, openjdk 1.9.0, jenkins-2.52

          Even with -Djava.awt.headless=true

           

          jenkins   9163     1  1 Mar30 ?        00:36:35 /usr/lib64/jvm/jre/bin/java -Djava.awt.headless=true -DJENKINS_HOME=/var/lib/jenkins -jar /usr/lib/jenkins/jenkins.war --javaHome=/usr/lib64/jvm/jre --logfile=/var/log/jenkins/jenkins.log --webroot=/var/cache/jenkins/war --httpPort=8080 --debug=5 --handlerCountMax=100 --handlerCountMaxIdle=20

          Show
          paulrm Paul Messina added a comment - I found in openSUSE Tumbleweed 20170329, openjdk 1.9.0, jenkins-2.52 Even with -Djava.awt.headless=true   jenkins   9163     1  1 Mar30 ?        00:36:35 /usr/lib64/jvm/jre/bin/java -Djava.awt.headless=true -DJENKINS_HOME=/var/lib/jenkins -jar /usr/lib/jenkins/jenkins.war --javaHome=/usr/lib64/jvm/jre --logfile=/var/log/jenkins/jenkins.log --webroot=/var/cache/jenkins/war --httpPort=8080 --debug=5 --handlerCountMax=100 --handlerCountMaxIdle=20
          Hide
          winnerwbx Andy Wang added a comment -

          This will solve it:

          ubuntu
          sudo apt-get install libfontconfig

          centos
          yum install libXext libXrender fontconfig libfontconfig.so.1

           

          Show
          winnerwbx Andy Wang added a comment - This will solve it: ubuntu sudo apt-get install libfontconfig centos yum install libXext libXrender fontconfig libfontconfig.so.1  
          Show
          oleg_nenashev Oleg Nenashev added a comment - Probably it needs to be added to https://github.com/jenkinsci/packaging/blob/master/deb/build/debian/control#L11
          Hide
          tom_ghyselinck Tom Ghyselinck added a comment -

          Hi,

          We run Jenkins LTS 2.107.2 on Debian 9.
          I installed all packages which have been noted in the previous comments:

          sudo apt-get install libxext6 libxrender1 fontconfig libfontconfig
          

          Unfortunately, we still see the issue.

          • Where is JFreeChart excepted to come from?
            • I suggest from some java package.
          • Is the NoClassDefFound error caused by either:
            • Java class really not available
            • Some required (native) libraries or tools not found (cfr. libfontconfig etc)
          • Which package(s) should we install on Debian 9 then?

          Thank you in advance!

          With best regards,
          Tom.

          Show
          tom_ghyselinck Tom Ghyselinck added a comment - Hi, We run Jenkins LTS 2.107.2 on Debian 9. I installed all packages which have been noted in the previous comments: sudo apt-get install libxext6 libxrender1 fontconfig libfontconfig Unfortunately, we still see the issue. Where is JFreeChart excepted to come from? I suggest from some java package. Is the NoClassDefFound error caused by either: Java class really not available Some required (native) libraries or tools not found (cfr. libfontconfig etc) Which package(s) should we install on Debian 9 then? Thank you in advance! With best regards, Tom.
          Hide
          tom_ghyselinck Tom Ghyselinck added a comment -

          Hi Oleg Nenashev, all,

          On Debian 9, I fixed it by installing libjfreechart-java:

          sudo apt-get install libjfreechart-java

          So this might be another required (or recommended) dependency for the jenkins debian package.

          With best regards,
          Tom.

          Show
          tom_ghyselinck Tom Ghyselinck added a comment - Hi Oleg Nenashev , all, On Debian 9, I fixed it by installing libjfreechart-java : sudo apt-get install libjfreechart-java So this might be another required (or recommended) dependency for the jenkins debian package. With best regards, Tom.
          Hide
          tamasgal Tamas Gal added a comment -

          I am also using Jenkins ver. 2.107.2 on Debian9 and have the same problem, but `libfontconfig` was already installed:

          Note, selecting 'libfontconfig1' instead of 'libfontconfig'
          libfontconfig1 is already the newest version (2.11.0-6.7+b1).

          I installed `libxext6 libxrender1 fontconfig libfontconfig` but it didn't help. After that I also installed `libjfreechart-java` but I still have the same problem.

          This is the top of the stack trace, which is printed when I open the image in a new tab:

          java.lang.NoClassDefFoundError: Could not initialize class org.jfree.chart.JFreeChart at org.jfree.chart.ChartFactory.createStackedAreaChart(ChartFactory.java:1124)

          Show
          tamasgal Tamas Gal added a comment - I am also using Jenkins ver. 2.107.2 on Debian9 and have the same problem, but `libfontconfig` was already installed: Note, selecting 'libfontconfig1' instead of 'libfontconfig' libfontconfig1 is already the newest version (2.11.0-6.7+b1). I installed `libxext6 libxrender1 fontconfig libfontconfig` but it didn't help. After that I also installed `libjfreechart-java` but I still have the same problem. This is the top of the stack trace, which is printed when I open the image in a new tab: java.lang.NoClassDefFoundError: Could not initialize class org.jfree.chart.JFreeChart at org.jfree.chart.ChartFactory.createStackedAreaChart(ChartFactory.java:1124)
          Hide
          tamasgal Tamas Gal added a comment -

          Commenting out the `assistive_technologies` line in `/etc/java-8-openjdk/accessibility.properties` solved it.

          Show
          tamasgal Tamas Gal added a comment - Commenting out the `assistive_technologies` line in `/etc/java-8-openjdk/accessibility.properties` solved it.
          Hide
          manuel_steurer Manuel Steurer added a comment -

          Using oracle jdk instead of open jdk solved it for me.

          Show
          manuel_steurer Manuel Steurer added a comment - Using oracle jdk instead of open jdk solved it for me.
          Hide
          andreasmandel Andreas Mandel added a comment -

          Not using the -headless install of the openjdk solved this here on ubuntu (apt install openjdk-8-jre).

          Show
          andreasmandel Andreas Mandel added a comment - Not using the -headless install of the openjdk solved this here on ubuntu ( apt install openjdk-8-jre ).
          Hide
          benbrummer Benjamin Brummer added a comment -

          I can confirm on Ubuntu using the openjdk-8-jdk solves this problem.

          Show
          benbrummer Benjamin Brummer added a comment - I can confirm on Ubuntu using the openjdk-8-jdk solves this problem.
          Hide
          pjdarton pjdarton added a comment -

          > I can confirm on Ubuntu using the openjdk-8-jdk solves this problem.

          ...so can I, although in my case (I had the headless jre installed initially), I had to reboot my server. Just stopping and restarting the Jenkins service didn't change anything.

          I remain "somewhat disgruntled" about installing the non-headless JRE on a headless server; IMO a headless server should not have any X11 code on it anywhere and installing the non-headless JRE pulled in numerous X11-related packages which offends my sense of neatness ... but my devs don't care as they're just happy they've got their pretty graphs back again, and it didn't take long either

          Show
          pjdarton pjdarton added a comment - > I can confirm on Ubuntu using the openjdk-8-jdk solves this problem. ...so can I, although in my case (I had the headless jre installed initially), I had to reboot my server. Just stopping and restarting the Jenkins service didn't change anything. I remain "somewhat disgruntled" about installing the non-headless JRE on a headless server; IMO a headless server should not have any X11 code on it anywhere and installing the non-headless JRE pulled in numerous X11-related packages which offends my sense of neatness ... but my devs don't care as they're just happy they've got their pretty graphs back again, and it didn't take long either

            People

            • Assignee:
              Unassigned
              Reporter:
              daniel15 Daniel Lo Nigro
            • Votes:
              6 Vote for this issue
              Watchers:
              13 Start watching this issue

              Dates

              • Created:
                Updated: