Mapdb not working: There is no queryable persistence service registered with the name 'mapdb'

I tried to install mapdb, but it doesn’t seem to work.
As default persistence I have rrd4j.
What am I doing wrong?

Carl.
addon:

root@raspberrypi:/etc/openhab/configurations# ls -l /usr/share/openhab/addons/
total 2752
-rw-r--r-- 1 root root   7329 Jan 22 00:05 org.openhab.action.astro-1.8.0.jar
-rw-r--r-- 1 root root  80975 Jan 22 00:05 org.openhab.binding.astro-1.8.0.jar
-rw-r--r-- 1 root root  63873 Jul 31  2015 org.openhab.binding.exec-1.7.1.jar
-rw-r--r-- 1 root root  10404 Jan 30 21:34 org.openhab.binding.ntp-1.8.0.jar
-rw-r--r-- 1 root root 154058 Jul 31  2015 org.openhab.binding.rfxcom-1.7.1.jar
-rw-r--r-- 1 root root 957696 Jul 31  2015 org.openhab.binding.tellstick-1.7.1.jar
-rw-r--r-- 1 root root 498170 Jul 31  2015 org.openhab.io.transport.serial-1.7.1.jar
-rw-r--r-- 1 root root 402540 Feb  7 23:42 org.openhab.persistence.mapdb-1.8.0.jar
-rw-r--r-- 1 root root 624560 Feb  9 22:18 org.openhab.persistence.rrd4j-1.8.0.jar
-rw-r--r-- 1 root root    126 Jul 31  2015 README

openhab.cfg:

root@raspberrypi:/etc/openhab/configurations# grep -E -i "(rrd4j|^[^#]|mapdb)" openhab.cfg 
folder:items=10,items
folder:sitemaps=10,sitemap
folder:rules=10,rules
folder:scripts=10,script
folder:persistence=10,persist
security:netmask=192.168.178.0/24
# persistence:default=rrd4j
persistence:default=mapdb
chart:provider=default
########################### RRD4J Persistence Service #################################
#rrd4j:<defname>.def=[ABSOLUTE|COUNTER|DERIVE|GAUGE],<heartbeat>,[<min>|U],[<max>|U],<step>
#rrd4j:<defname>.archives=[AVERAGE|MIN|MAX|LAST|FIRST|TOTAL],<xff>,<steps>,<rows>
#rrd4j:<defname>.items=<list of items for this defname> 
rrd4j:carl.def=GAUGE,60,U,U,10
rrd4j:carl.archives=AVERAGE,0.5,1,600
rrd4j:carl.items=LichtIntensiteit_Woonkamer
logging:pattern=%date{ISO8601} - %-25logger: %msg%n
	
########################### MapDB Persistence Service ##################################
#mapdb:commitinterval=5
#mapdb:commitsamestate=false
ntp:hostname=ptbtime1.ptb.de
hue:secret=openHABRuntime
tcp:refreshinterval=250
astro:latitude=52.0704978
astro:longitude=4.3006999
astro:interval=57
root@raspberrypi:/etc/openhab/configurations#

mapdb.persist:

root@raspberrypi:/etc/openhab/configurations# cat persistence/mapdb.persist 
Strategies {
	everyHour : "0 0 * * * ?"
	everyDay : "0 0 0 * * ?"

	// if no strategy is specified for an item entry below, the default list will be used
	default = everyChange,restoreOnStartup,everyHour
}
Items {
  LightsOnIntensityThreshold
  LightsEnableIntensityThreshold 
}

root@raspberrypi:/etc/openhab/configurations# cat items/lichtsensor.items

/*
Voorbeeld voor exec binding.
Switch Light_GF_Huiskamer_Achterdeur_Schemerlamp "Achterdeur" (GF_Huiskamer, Lights) { exec=">[ON:sudo /home/pi/projects/klikaanklikuit_flask/tmp/lights/kaku_lock.sh D 1 on] >[OFF:sudo /home/pi/projects/klikaanklikuit_flask/tmp/lights/kaku_lock.sh D 1 off]"}
*/
Group LightSensor "Lichtmeter"
Number LichtIntensiteit_Woonkamer "Lichtintensiteit woonkamer [%.1f]" (LightSensor) {exec="<[/home/pi/LightSensorBH1750/bh1750_2.sh:10000:]"}
Number LightsOnIntensityThreshold "Lichtintensiteit waarbij lichten worden ingeschakeld [%.1f]" (LightSensor) // { exec="<[/bin/sh@@-c@@echo -n 24:60000:REGEX((.*?))]" }
Number LightsEnableIntensityThreshold "Lichtintensiteit waarbij het automatisch inschakelen wordt geactiveerd [%.1f]" (LightSensor)  //{ exec="<[/bin/sh@@-c@@echo -n 200:60000:REGEX((.*?))]" }
DateTime BackoffTimer "Tijd waarop automatisch inschakelen wordt geactiveerd (indien nu inactief) [%1$tH:%1$tM]" (LightSensor) //{exec="<[/bin/sh@@-c@@uptime | awk '{ print $1 }':6000:REGEX((.*?))]"}
Number AutoOnEnabled "Automatisch inschakelen is geactiveerd (0=nee, 1=ja) [%1d]" (LightSensor)

openhab.log:

root@raspberrypi:/etc/openhab/configurations# grep -E -i "(mapdb|quartz|genericitemprovider|^ )" /var/log/openhab/openhab.log | tail --lines 45
23:30:15.721 [INFO ] [rtz.core.SchedulerSignalerImpl:61   ] - Initialized Scheduler Signaller of type: class org.quartz.core.SchedulerSignalerImpl
23:30:15.723 [INFO ] [rg.quartz.core.QuartzScheduler:243  ] - Quartz Scheduler v.2.1.7 created.
23:30:15.732 [INFO ] [org.quartz.simpl.RAMJobStore  :154  ] - RAMJobStore initialized.
23:30:15.740 [INFO ] [rg.quartz.core.QuartzScheduler:268  ] - Scheduler meta-data: Quartz Scheduler (v2.1.7) 'openHAB-job-scheduler' with instanceId 'NON_CLUSTERED'
  Scheduler class: 'org.quartz.core.QuartzScheduler' - running locally.
  NOT STARTED.
  Currently in standby mode.
  Number of jobs executed: 0
  Using thread pool 'org.quartz.simpl.SimpleThreadPool' - with 2 threads.
  Using job-store 'org.quartz.simpl.RAMJobStore' - which does not support persistence. and is not clustered.
23:30:15.742 [INFO ] [uartz.impl.StdSchedulerFactory:1324 ] - Quartz scheduler 'openHAB-job-scheduler' initialized from specified file: '/etc/openhab/quartz.properties'
23:30:15.745 [INFO ] [uartz.impl.StdSchedulerFactory:1328 ] - Quartz scheduler version: 2.1.7
23:30:15.748 [INFO ] [rg.quartz.core.QuartzScheduler:534  ] - Scheduler openHAB-job-scheduler_$_NON_CLUSTERED started.
23:30:23.027 [DEBUG] [o.o.c.i.items.ItemRegistryImpl:137  ] - Item provider 'GenericItemProvider' has been added.
  class org.atmosphere.jersey.AtmosphereResourceConfigurator
23:30:31.647 [INFO ] [c.internal.ModelRepositoryImpl:80   ] - Loading model 'mapdb.persist'
23:30:32.063 [DEBUG] [i.internal.GenericItemProvider:154  ] - Processing binding configs for items from model 'lamp1.items'
23:30:32.086 [DEBUG] [i.internal.GenericItemProvider:133  ] - Read items from model 'lamp1.items'
23:30:32.122 [DEBUG] [i.internal.GenericItemProvider:154  ] - Processing binding configs for items from model 'lichtsensor.items'
23:30:32.128 [DEBUG] [i.internal.GenericItemProvider:133  ] - Read items from model 'lamp1.items'
23:30:32.131 [DEBUG] [i.internal.GenericItemProvider:133  ] - Read items from model 'lichtsensor.items'
23:30:32.159 [DEBUG] [i.internal.GenericItemProvider:154  ] - Processing binding configs for items from model 'sunset_with_offset_event.items'
23:30:32.162 [DEBUG] [i.internal.GenericItemProvider:133  ] - Read items from model 'lamp1.items'
23:30:32.164 [DEBUG] [i.internal.GenericItemProvider:133  ] - Read items from model 'lichtsensor.items'
23:30:32.167 [DEBUG] [i.internal.GenericItemProvider:133  ] - Read items from model 'sunset_with_offset_event.items'
23:30:32.203 [DEBUG] [i.internal.GenericItemProvider:154  ] - Processing binding configs for items from model 'datum.items'
23:30:32.206 [DEBUG] [i.internal.GenericItemProvider:133  ] - Read items from model 'lamp1.items'
23:30:32.208 [DEBUG] [i.internal.GenericItemProvider:133  ] - Read items from model 'lichtsensor.items'
23:30:32.211 [DEBUG] [i.internal.GenericItemProvider:133  ] - Read items from model 'sunset_with_offset_event.items'
23:30:32.214 [DEBUG] [i.internal.GenericItemProvider:133  ] - Read items from model 'datum.items'
23:30:47.186 [DEBUG] [i.internal.GenericItemProvider:341  ] - Start processing binding configuration of Item 'Light_GF_Huiskamer_Achterdeur_Schemerlamp (Type=SwitchItem, State=Uninitialized)' with 'ExecGenericBindingProvider' reader.
23:30:47.194 [DEBUG] [i.internal.GenericItemProvider:341  ] - Start processing binding configuration of Item 'Light_GF_Huiskamer_Achter_Staandelamp (Type=SwitchItem, State=Uninitialized)' with 'ExecGenericBindingProvider' reader.
23:30:47.197 [DEBUG] [i.internal.GenericItemProvider:341  ] - Start processing binding configuration of Item 'LichtIntensiteit_Woonkamer (Type=NumberItem, State=Uninitialized)' with 'ExecGenericBindingProvider' reader.
23:30:47.350 [DEBUG] [i.internal.GenericItemProvider:341  ] - Start processing binding configuration of Item 'Sunrise_Time (Type=DateTimeItem, State=Uninitialized)' with 'AstroGenericBindingProvider' reader.
23:30:47.458 [DEBUG] [i.internal.GenericItemProvider:341  ] - Start processing binding configuration of Item 'Sunset_Time (Type=DateTimeItem, State=Uninitialized)' with 'AstroGenericBindingProvider' reader.
23:30:47.477 [DEBUG] [i.internal.GenericItemProvider:341  ] - Start processing binding configuration of Item 'Sunset_with_Offset_Event (Type=SwitchItem, State=Uninitialized)' with 'AstroGenericBindingProvider' reader.
23:30:47.489 [DEBUG] [i.internal.GenericItemProvider:341  ] - Start processing binding configuration of Item 'Sunset_with_Offset_Event1 (Type=SwitchItem, State=Uninitialized)' with 'AstroGenericBindingProvider' reader.
23:30:47.495 [DEBUG] [i.internal.GenericItemProvider:341  ] - Start processing binding configuration of Item 'Sunset_minus_1hour (Type=SwitchItem, State=Uninitialized)' with 'AstroGenericBindingProvider' reader.
23:30:47.967 [DEBUG] [.m.i.MapDBPersistenceActivator:31   ] - MapDB persistence bundle has been started.
23:30:48.009 [DEBUG] [.p.m.i.MapDBPersistenceService:86   ] - mapdb persistence service activated
23:30:48.056 [WARN ] [.o.c.p.e.PersistenceExtensions:711  ] - There is no queryable persistence service registered with the name 'mapdb'
23:30:48.760 [DEBUG] [.p.m.i.MapDBPersistenceService:198  ] - Scheduled Commit-Job with interval 5sec.
23:30:48.767 [DEBUG] [.p.internal.PersistenceManager:147  ] - Initializing mapdb persistence service.
23:30:48.779 [DEBUG] [.p.internal.PersistenceManager:441  ] - Scheduled strategy mapdb.everyHour with cron expression 0 0 * * * ?
23:30:48.786 [DEBUG] [.p.internal.PersistenceManager:441  ] - Scheduled strategy mapdb.everyDay with cron expression 0 0 0 * * ?

I don’t see anything obvious wrong. Note that the message you are seeing is a warning not an error so it can be ignored if there are no other errors. And indeed mapdb is not a queryable persistence service. If you try to get anything except the previousValue it returns null so this just might be a standard warning. It also might be because of some things in your mapdb.persist file that do not make sense (see below).

I notice that you have a strange mixture of binding versions that could cause some problems, but not this particular problem. What version of OH are you actually running? Did you install using apt-get (it looks like it given the directories referenced)? If so did you also install your addons using apt-get? Have you upgraded to the latest version of OH (and addons) which is 1.8.1?

Here is my addons for comparison:

rich@chimera:~$ ls -l /usr/share/openhab/addons/
total 9096
-rw-r--r-- 1 root root    7324 Feb  2 16:00 org.openhab.action.astro-1.8.1.jar
-rw-r--r-- 1 root root   39063 Feb  2 15:59 org.openhab.action.mail-1.8.1.jar
-rw-r--r-- 1 root root    6844 Sep 29 15:01 org.openhab.action.pushbullet-1.8.0-SNAPSHOT.jar
-rw-r--r-- 1 root root   80976 Feb  2 16:00 org.openhab.binding.astro-1.8.1.jar
-rw-r--r-- 1 root root   63843 Feb  2 16:00 org.openhab.binding.exec-1.8.1.jar
-rw-r--r-- 1 root root   19556 Feb  2 16:00 org.openhab.binding.http-1.8.1.jar
-rw-r--r-- 1 root root   29362 Feb  2 16:01 org.openhab.binding.mqtt-1.8.1.jar
-rw-r--r-- 1 root root   15890 Feb  2 16:01 org.openhab.binding.mqttitude-1.8.1.jar
-rw-r--r-- 1 root root  275511 Feb  2 16:02 org.openhab.binding.nest-1.8.1.jar
-rw-r--r-- 1 root root   10710 Feb  2 16:00 org.openhab.binding.networkhealth-1.8.1.jar
-rw-r--r-- 1 root root   10403 Feb  2 16:00 org.openhab.binding.ntp-1.8.1.jar
-rw-r--r-- 1 root root 4417984 Sep 29 15:01 org.openhab.binding.pushbullet-1.8.0-SNAPSHOT.jar
-rw-r--r-- 1 root root  324361 Feb 10 12:09 org.openhab.binding.weather-1.8.1.jar
-rw-r--r-- 1 root root 1202283 Feb  9 22:17 org.openhab.binding.zwave-1.8.1.jar
-rw-r--r-- 1 root root 1134175 May 28  2015 org.openhab.io.habmin-1.7.0-SNAPSHOT.jar
-rw-r--r-- 1 root root  613061 Feb  2 16:04 org.openhab.io.myopenhab-1.8.1.jar
-rw-r--r-- 1 root root  402539 Feb  2 16:04 org.openhab.persistence.mapdb-1.8.1.jar
-rw-r--r-- 1 root root  624674 Feb  2 16:04 org.openhab.persistence.rrd4j-1.8.1.jar
-rw-r--r-- 1 root root     126 Feb  2 16:23 README

Notice how everything is version 1.8.1 except for the two bindings I use which are not part of the official distro. All were installed using apt-get and when a new verison of OH is released, both OH core and all the addons are updated.

openhab.cfg:

...
# The name of the default persistence service to use
persistence:default=rrd4j
...
########################### RRD4J Persistence Service #################################
#
# please note that currently the first archive in each RRD defines the consolidation
# function (e.g. AVERAGE) used by OpenHAB, thus only one consolidation function is
# fully supported
#
# default_numeric and default_other are internally defined defnames and are used as
# defaults when no other defname applies

#rrd4j:<defname>.def=[ABSOLUTE|COUNTER|DERIVE|GAUGE],<heartbeat>,[<min>|U],[<max>|U],<step>
#rrd4j:<defname>.archives=[AVERAGE|MIN|MAX|LAST|FIRST|TOTAL],<xff>,<steps>,<rows>
#rrd4j:<defname>.items=<list of items for this defname>
...
########################### MapDB Persistence Service ##################################
# the commit interval in seconds (optional, default to '5')
#mapdb:commitinterval=5

# issue a commit even if the state did not change (optional, defaults to 'false')
#mapdb:commitsamestate=false

Notice I basically use the defaults for both and also use rrd4j as the default. I doubt your settings would be a problem either though.

mapdb.persist:

Strategies {
        default = everyUpdate
}

Items {
        // persist all items on every change and restore them from the db at startup
        * : strategy = everyChange, restoreOnStartup
}

I only use mapdb for restoreOnStartup. It only saves the most recent value so it really doesn’t make sense to use any other strategy than everyChange. It doesn’t hurt but it doesn’t actually accomplish anything, just overwriting the same value already stored there periodically. It is possible the warning is happening because you have “everyHour” as part of your mapdb default strategy and using such a strategy may make OH think it is a queryable persistence.