JDBC Persistence Service missing in 1.7

How much RAM does your raspian have?
You want to start over 180 Bundles! I think about 4-16 GB should be right for that. :wink:

In your demo Setup, please delete Bundles and keep only:

default in standard demo Setup:
org.openhab.binding.http-1.8.0-SNAPSHOT.jar
org.openhab.binding.ntp-1.8.0-SNAPSHOT.jar
org.openhab.persistence.exec-1.8.0-SNAPSHOT.jar
org.openhab.persistence.logging-1.8.0-SNAPSHOT.jar
org.openhab.persistence.rrd4j-1.8.0-SNAPSHOT.jar

additions:
org.openhab.persistence.jdbc-1.8.0-SNAPSHOT.jar
sqlite-jdbc-3.8.11.2.jar

And please add Strategies Section in jdbc.persist.
Without Strategies, persistence does not save anything, I learned too.
Please for example to test, use:

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

Now, it works like a charm!

My fear, only one connection can be opened to SQLite is wrong!
As I have tested yet, SQlite can hold multiple connections simultaneously.

@watou,
It is not a Bug.

Thanks for that, @lewie.

@watou, moved too early
 gone more deeply, there is a Problem!

Without sitewhere, openhab overall and Persistence Services starts up with all over 180 Bundles in addons folder.
I could hardly believe it :slight_smile:

@lewie thanks for testing my pack. I left the add ons as they were from the installation on purpose not that I missed an important binding.
I changed it to your proposed add ons and also added the jdbc.persist file but no success on my side :frowning:
I will test it now on my mac instead of the pi.

Update:
Works like a charm on my mac. So it has something to do with my pi and probably jessey. I will test it with wheezy now.

Update 2
Wheezy shows the exact same behavior. -> doesn’t work with my pi

Update 3
I switched to mongodb persistent binding for now. If there is a new version for JDBC and sqlite ping me and I will test it on my system.

Hello everyone,

I am a newcomer to the world of OpenHAB, and I installed the application that works wonders.
But I vainly sought the org.openhab.persistence.jdbc-1.7.1.jar plugin :disappointed:
Could someone tell me where to find it ?

It didn’t exist when openHAB 1.7.1 was released. You can find the almost-1.8 version of it in the ZIP file here:

https://openhab.ci.cloudbees.com/job/openHAB/lastSuccessfulBuild/artifact/distribution/target/distribution-1.8.0-SNAPSHOT-addons.zip

@watou Thanks,

If I take the 1.8.0 version of JDBC, will it work with openHAB 1.7.1 ?
or should I install openHAB 1.8.0 ?

I am pretty sure it will work on openHAB 1.7.1 as well as it does in 1.8. Just follow the wiki page (that I just updated to note its 1.8 availability).

@watou Thank you very much,
I Will try that.

See JDBC Persistence with SQLite not working in openHAB 1.8.0
for a continued discussion of the issue with JDBC persistence with SQLite not working

Hi,
I’ve exactly the same problem on my RPi installation. The service does not raise any error but the file is not created.

Here my config:

  • org.openhab.persistence.jdbc-1.8.1.jar
  • sqlite-jdbc-3.8.11.2.jar
  • java 1.8.0_65

My config:

jdbc:url=jdbc:sqlite: /opt/openhab/mydb.db (I also tried with ./mydb.db)
jdbc:user=openhab
jdbc:password=*******
jdbc:tableUseRealItemNames=true

jdbc.persist:

Strategies
{
// if no strategy is specified for an item entry below, the default list will be used
default = everyChange
}

Items
{

  • : strategy = everyChange, restoreOnStartup
    }

Starting in debug I’ve

22:57:08.081 [DEBUG] [o.p.j.i.JdbcPersistenceService:95 ] - JDBC::unsetItemRegistry
22:57:08.343 [DEBUG] [o.p.j.i.JdbcPersistenceService:90 ] - JDBC::setItemRegistry
22:57:08.345 [DEBUG] [o.p.j.i.JdbcPersistenceService:60 ] - JDBC::activate: persistence service activated
22:57:08.347 [DEBUG] [o.p.j.i.JdbcPersistenceService:214 ] - JDBC::updateConfig
22:57:08.349 [DEBUG] [p.j.internal.JdbcConfiguration:64 ] - JDBC::JdbcConfiguration
22:57:08.351 [DEBUG] [p.j.internal.JdbcConfiguration:72 ] - JDBC::updateConfig: configuration.size = 8
22:57:08.353 [DEBUG] [p.j.internal.JdbcConfiguration:77 ] - JDBC::updateConfig: url=jdbc:sqlite:/opt/openhab/domusSilicea.db
22:57:08.355 [DEBUG] [p.j.internal.JdbcConfiguration:87 ] - JDBC::updateConfig: found serviceName = 'sqlite’
22:57:08.357 [DEBUG] [p.j.internal.JdbcConfiguration:98 ] - JDBC::updateConfig: Init Data Access Object Class: 'org.openhab.persistence.jdbc.db.JdbcSqliteDAO’
22:57:08.359 [DEBUG] [ersistence.jdbc.db.JdbcBaseDAO:101 ] - JDBC::initSqlTypes: Initialize the type array
22:57:08.362 [DEBUG] [ersistence.jdbc.db.JdbcBaseDAO:74 ] - JDBC::initSqlQueries: 'JdbcSqliteDAO’
22:57:08.364 [DEBUG] [o.o.p.jdbc.db.JdbcSqliteDAO :42 ] - JDBC::initSqlQueries: 'JdbcSqliteDAO’
22:57:08.366 [DEBUG] [p.j.internal.JdbcConfiguration:105 ] - JDBC::updateConfig: dBDAO ClassName=org.openhab.persistence.jdbc.db.JdbcSqliteDAO
22:57:08.370 [DEBUG] [p.j.internal.JdbcConfiguration:144 ] - JDBC::updateConfig: user=openhab
22:57:08.372 [DEBUG] [p.j.internal.JdbcConfiguration:157 ] - JDBC::updateConfig: password= password.length=7
22:57:08.373 [DEBUG] [p.j.internal.JdbcConfiguration:182 ] - JDBC::updateConfig: tableUseRealItemNames=true
22:57:08.375 [DEBUG] [p.j.internal.JdbcConfiguration:216 ] - JDBC::updateConfig: enableLogTime false
22:57:08.377 [WARN ] [p.j.internal.JdbcConfiguration:237 ] - JDBC::updateConfig: try to load JDBC-driverClass: 'org.sqlite.JDBC’
22:57:08.379 [DEBUG] [p.j.internal.JdbcConfiguration:240 ] - JDBC::updateConfig: load JDBC-driverClass was successful: 'org.sqlite.JDBC’
22:57:08.380 [DEBUG] [p.j.internal.JdbcConfiguration:266 ] - JDBC::updateConfig: configuration complete. service=jdbc
22:57:08.382 [DEBUG] [o.o.p.jdbc.internal.JdbcMapper:33 ] - JDBC::pingDB
22:57:08.383 [DEBUG] [o.o.p.jdbc.internal.JdbcMapper:153 ] - JDBC::openConnection isDriverAvailable: true
22:57:08.385 [WARN ] [o.o.p.jdbc.internal.JdbcMapper:155 ] - JDBC::openConnection: setupDataSource.

No file is created. I read the old post but I’ve no idea how to progress. No error in the log that give me any direction for investigation.

Is there anyone that have any suggestion?

Thanks
hjfabius