MapDB giving weird error

Hello,

I have the following maps.persist file :

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

However, in the log I see the following:

2017-02-27 07:18:01.119 [WARN ] [el.core.internal.ModelRepositoryImpl] - Configuration model ‘mapdb.persist’ has errors, therefore ignoring it: [1,1]: mismatched input ‘’ expecting ‘Strategies’

2017-02-27 07:18:01.137 [INFO ] [el.core.internal.ModelRepositoryImpl] - Loading model ‘mapdb.persist’

Any ideas?

Maybe some unrecognized or hidden characters in there, delete the file and save a new one, preferable with Eclipse Smarthome Designer:

Strategies {
default = everyChange
}
Items {
* : strategy = everyChange, restoreOnStartup
}

Hi,

I’m getting the same error. But with influxdb.persist. I’ve even downloaded the file from https://raw.githubusercontent.com/steintore/my-openhab-config/master/persistence/influxdb.persist using wget but still the same error.

I’m running on openHAB 2.1.0~20170219214013-1 (Build #806).

Regards
Thomas

I’m using mapdb and influx as well with snapshot #804 and am not getting this error.
So I don’t know whats going on …
Try do avoid any comments with "/" or "*/" or whatever …

Did that, no change. same error. deleted file, created new one (touch on linux, then edit). Same error. Any other ideas?

Are you also on a version newer than #804? Maybe one of the newer releases introduced a bug …

Hi, I’ve also tried that with no result. But the persist seems to load anyhow and is sending data to the database.

But still strange with the error.

Br
Thomas

I am on the latest Stable and get the same error on influxdb.persist.
the solution for is to:

  1. rename influxdb.persist to influxdb.bla
  2. rename influxdb.bla back to influxdb.persist

when I perform the second step, the log does not throw an error.
If I update the file, upon saving the error will come again, I just have to rename to something other than .persist and then back.

I can confirm this as well, running latest unstable #988 with JDBC för MySQL. Works just like @lenorb said, if I save the file I get the error (not always but most of the time), if I rename it it seems to be read ok according to log.

Not sure if the change sticks though. I did a “bundle:restart #” and then the file read ok and seems to work ok.

Same here, trick from @lenorb seems to work, running stable 2.1

same here.

1 Like

Same. Does this bug has any workaround?