-
Bug
-
Resolution: Fixed
-
Major
-
None
-
Platform: All, OS: All
If Hudson runs on Unix, it tries to connect to the Xserver running on the local
machine (localhost:0.0) to apparently obtain some font metric information and
etc. This happens inside JFreeChart.
When there is no DISPLAY available, we know that this causes HeadlessException,
which Hudson handles correctly. However, if DISPLAY variable is available but
the connection fails, then it produces a fairly simple two line messages like
"Xlib: failed to connect to server", then Java code will throw NoClassDefError
from vey unintuitive place like this:
java.lang.NoClassDefFoundError
org.jfree.chart.ChartFactory.createStackedAreaChart(ChartFactory.java:956)
hudson.tasks.junit.TestResultAction.createChart(TestResultAction.java:218)
hudson.tasks.junit.TestResultAction.doGraph(TestResultAction.java:209)
Creating a font object will exhibit NoClassDefError, so perhaps Hudson can check
that to gracefully recover from this error. See the related thread people found
on this issue at
http://www.atmarkit.co.jp/bbs/phpBB/viewtopic.php?topic=30932&forum=12&4
(Japanese only)