There is no default persistence service configured

mysql persistence

When trying to query from a rule with something like:

I get the following errors:
16:18:00.047 [WARN ] [nce.extensions.PersistenceExtensions] - There is no default persistence service configured!
16:18:00.048 [WARN ] [nce.extensions.PersistenceExtensions] - There is no queryable persistence service registered with the id ‘null’

I have tried setting it to mysql in openhab.cfg as follows:

and in the Paper UI under configuration.

Note: The data is in the mysql database so that part is not the issue

openHAB2 has no such file as openhab.cfg :slight_smile:
Instead of this, use conf/services/addons.cfg to set persistence (first in list will be default persistence) or use the karaf command line to set default persistence.

Same issue:

grep persistence addons.cfg
persistence = mysql

openhab> config:property-list
default = rrd4j = org.eclipse.smarthome.persistence
openhab> config:property-set default mysql
openhab> config:property-list
default = mysql = org.eclipse.smarthome.persistence
openhab> config:update

On another note, changes through karaf command line do not seem to persist through a restart/reboot.