Rrd4j Charts error

Hello. I use OH1.8.2 on Synology DSM6. The project I have moved from Raspi (Jessy) where it works perfect (except that tah Raspi kill the SD-card every 3 month).
On Synology I have now the problem, that the charts not works. I get the following error:

HTTP ERROR 500

Problem accessing /rrdchart.png. Reason:

Could not initialize class org.rrd4j.graph.RrdGraphConstants

Caused by:

java.lang.NoClassDefFoundError: Could not initialize class org.rrd4j.graph.RrdGraphConstants
at org.rrd4j.graph.RrdGraphDef.(Unknown Source)
at org.openhab.persistence.rrd4j.internal.charts.RRD4jChartServlet.createChart(RRD4jChartServlet.java:254)
at org.openhab.persistence.rrd4j.internal.charts.RRD4jChartServlet.service(RRD4jChartServlet.java:160)
at org.eclipse.equinox.http.servlet.internal.ServletRegistration.service(ServletRegistration.java:61)
at org.eclipse.equinox.http.servlet.internal.ProxyServlet.processAlias(ProxyServlet.java:128)
at org.eclipse.equinox.http.servlet.internal.ProxyServlet.service(ProxyServlet.java:60)
at javax.servlet.http.HttpServlet.service(HttpServlet.java:848)
at org.eclipse.jetty.servlet.ServletHolder.handle(ServletHolder.java:598)
at org.eclipse.jetty.servlet.ServletHandler.doHandle(ServletHandler.java:486)
at org.eclipse.jetty.server.session.SessionHandler.doHandle(SessionHandler.java:231)
at org.eclipse.jetty.server.handler.ContextHandler.doHandle(ContextHandler.java:1065)
at org.eclipse.jetty.servlet.ServletHandler.doScope(ServletHandler.java:413)
at org.eclipse.jetty.server.session.SessionHandler.doScope(SessionHandler.java:192)
at org.eclipse.jetty.server.handler.ContextHandler.doScope(ContextHandler.java:999)
at org.eclipse.jetty.server.handler.ScopedHandler.handle(ScopedHandler.java:117)
at org.eclipse.jetty.server.handler.ContextHandlerCollection.handle(ContextHandlerCollection.java:250)
at org.eclipse.jetty.server.handler.HandlerCollection.handle(HandlerCollection.java:149)
at org.eclipse.jetty.server.handler.HandlerWrapper.handle(HandlerWrapper.java:111)
at org.eclipse.jetty.server.Server.handle(Server.java:350)
at org.eclipse.jetty.server.AbstractHttpConnection.handleRequest(AbstractHttpConnection.java:454)
at org.eclipse.jetty.server.AbstractHttpConnection.headerComplete(AbstractHttpConnection.java:890)
at org.eclipse.jetty.server.AbstractHttpConnection$RequestHandler.headerComplete(AbstractHttpConnection.java:944)
at org.eclipse.jetty.http.HttpParser.parseNext(HttpParser.java:630)
at org.eclipse.jetty.http.HttpParser.parseAvailable(HttpParser.java:230)
at org.eclipse.jetty.server.AsyncHttpConnection.handle(AsyncHttpConnection.java:77)
at org.eclipse.jetty.io.nio.SelectChannelEndPoint.handle(SelectChannelEndPoint.java:606)
at org.eclipse.jetty.io.nio.SelectChannelEndPoint$1.run(SelectChannelEndPoint.java:46)
at org.eclipse.jetty.util.thread.QueuedThreadPool.runJob(QueuedThreadPool.java:603)
at org.eclipse.jetty.util.thread.QueuedThreadPool$3.run(QueuedThreadPool.java:538)
at java.lang.Thread.run(Thread.java:745)

Has anyone any suggestion?

I have the same problem. Did you solve it?

Hi. Sorry for the late replay. No, I canceled the project with synology. I bought a PC-Bord from PC-Engines with a 64gb SSD. I use the synology only to store the database from persistance.

Hi treesink,

I have the same issue. Where you able to solve this somehow.
Moving to a different hardware is no option for my case.

I haven’t tried this on my NAS, but could this article be relevant?

Hmm, it sounds reasonable that a synology has no real UI support and therefore that might be the cause.
But doing now a lot of research in the internet it seems like for some diskstations charting works and for some not.
I was now trying to understand the linked discussion, but I have no idea how I could change the behavior of the chart generation so that it supports headless devices.

So -Djava.awt.headless=true (iirc) is passed to the Java runtime?

But the how should this be done?
I am calling the chart via URL for testing purpose like this:

http://<IP>:8080/rrdchart.png?items=my_item&period=h

Then I get the same error like @aco described.

@watou
I have done some more research on this topic and found that there was already once a discussion on something similar by Kai:
Click me

I have double checked this and the headless parameter is set on my system.
Any other suggestions?

Michael

Same problem on 2 install on 2 differents syno, well working since 2 years with java7, since I tried to install openhab2, and/or java8.

I’ve upgraded my OH to 2.2 on my syno and my charts no longer work. i have no solution, just letting you know someone else out there is having the same issue

fixed it.
green arrow type java. red arrow click open


follow the instructions. download the file. uploaded it to syno. stop openhab. start openhab. enjoy charts

1 Like

Thank you Scott. This worked for me on my DS1513+ too.

1 Like