JDBC upgrade fails from 3.4.5 to 4.0.2

I have openhab in a docker container, and upgraded it from 3.4.0 to 3.4.4.
When upgrading from 3.4.4 to 3.4.5 mariadb persistence was lost, so I ended up dumping the database and renaming it from items to Items and item0001 to Item1 and so on… (search and replace long sql file).
Now it works correct on 3.4.5 but when upgrading to 4.0.2 old data is lost (graphs are empty in basic UI).
I thing I have something messed up from my mysql binding when upgrading to jdbc, but I cannot see what it is.

My jdbc.cfg is:

url=jdbc:mysql://192.168.1.7:3306/openhab3
user=openhab3
password=********
itemsManageTable=Items
tableNamePrefix=Item
tableUseRealItemNames=false
tableIdDigitCount=0

Is there any extra step to migrate to 4.x?

What’s the default persistence? That is what gets used for charting.

It’s JDBC, but after upgrading it is not listed in settings. I believe the problem comes from my previous mysql persistence usage, and by some cause it fails to work.

After testing again, I had to install manually again JBDC after upgrade, just to get a “flat line”. I selected a bigger date range and discovered that at some point I restored and old backup and last 3 days are “lost somewhere”, so everything was working ok :face_with_raised_eyebrow:

I will check backups later to get missing info.

Thanks for your time.

I have checked again, and I cannot see where the problem is, are some screenshots (using the same database.table):

With openhab3

With openhab4

with openhab4 extending date range

All I can recommend is checking your persistence config. Watch the logs for errors. Consider putting the jdbc add-on into debug or trace level logging.

1 Like