This page last changed on Mar 22, 2014 by tom.christiaens.

I am trying to plot room temperature in a graph using RRD4J.
The OR controller runs on a Windows XP-computer.
When I enter the URL ("http://localhost:8080/controller/graph?name=graphActTemp&start=20140313-16-30") in my browser, I get the following error:

java.io.FileNotFoundException: Could not open /C:/OpenRemote/ORC/webapps/controller/rrd/ActTemp.rrd [non existent]
org.rrd4j.core.RrdDb.<init>(Unknown Source)
org.rrd4j.core.RrdDb.<init>(Unknown Source)
org.rrd4j.data.DataProcessor.getRrd(Unknown Source)
org.rrd4j.data.DataProcessor.fetchRrdData(Unknown Source)
org.rrd4j.data.DataProcessor.processData(Unknown Source)
org.rrd4j.graph.RrdGraph.fetchData(Unknown Source)
org.rrd4j.graph.RrdGraph.createGraph(Unknown Source)
org.rrd4j.graph.RrdGraph.<init>(Unknown Source)
org.openremote.controller.servlet.RrdGraphServlet.doGet(RrdGraphServlet.java:107)
javax.servlet.http.HttpServlet.service(HttpServlet.java:617)
javax.servlet.http.HttpServlet.service(HttpServlet.java:717)
org.openremote.controller.rest.support.json.JSONCallbackFilter.doFilter(JSONCallbackFilter.java:63)
org.springframework.web.filter.CharacterEncodingFilter.doFilterInternal(CharacterEncodingFilter.java:78)
org.springframework.web.filter.OncePerRequestFilter.doFilter(OncePerRequestFilter.java:77)

However the file ActTemp.rrd is actually there (it was automatically generated by the OR controller, based on the configuration file I set up as explained in the How-To about RRD4J).
What is strange in the error message is the pathname to the rrd-file. On a Windows machine the pathname should be C:\OpenRemote\ORC\webapps\controller\rrd\ActTemp.rrd
This means:
1. Instead of slashes, backslashes should be used on a Windows system to separate directories and files in a pathname.
2. There should be no slash (nor backslash) in front of the driveletter C.

The FileNotFoundException is thrown by the RrdDb object constructor (see source code RRDJ4). So it seems an invalid pathname is passed to it. Could this mean that there is somewhere a bug in OR, so that RRD4J cannot be used on a Windows computer? (I'm not a programmer, I only have some background in C++).

EDIT 22-03-2014:
I found the bug! The bug was me, myself and I! In the database definition in the XML configuration file I gave the database name the file extension rdd instead of rrd. In the graph definition I used the correct file extension. So it was obvious that the database file couldn't be found.

Document generated by Confluence on Jun 05, 2016 09:34