[Solved] JDBC MariaDB Table doesn't exists

Hello,
i have one problem with my persistence setup of my openhab instance.

I get lot of errors regarding not existing table

like

2020-09-07 12:41:43.555 [ERROR] [nal.common.AbstractInvocationHandler] - An error occurred while calling method 'QueryablePersistenceService.query()' on 'org.openhab.core.persistence.internal.QueryablePersistenceServiceDelegate@16054f6': null

2020-09-07 12:41:43.562 [ERROR] [ence.internal.PersistenceManagerImpl] - Exception occurred while querying persistence service 'jdbc': null

2020-09-07 12:41:43.574 [ERROR] [org.knowm.yank.Yank                 ] - Error in SQL query!!!

java.sql.SQLException: Error preparing query: Table 'openhabian.item0160' doesn't exist Query: SELECT time, value FROM item0160 ORDER BY time DESC  LIMIT 0,1 Parameters: []

or

java.sql.SQLException: Error preparing query: Table 'openhabian.item0160' doesn't exist Query: INSERT INTO item0160 (TIME, VALUE) VALUES( NOW(3), ? ) ON DUPLICATE KEY UPDATE VALUE= ? Parameters: [Finished, Finished]

here is my jdbc.cfg

url=jdbc:mariadb://localhost:3306/openhabian
user=?
password=?
sqltype.STRING        =   VARCHAR(65500)
Strategies {
   everyMinute	: "0 * * * * ?"
   everyHour    : "0 0 * * * ?"
   everyDay     : "0 0 0 * * ?"
   default = everyChange
}

Items {
 *: strategy = everyDay, restoreOnStartup
HarmonyHubWohnzimmerautomatizationStatus : strategy = everyChange, everyMinute, restoreOnStartup
}

.items

String	HarmonyHubWohnzimmerautomatizationStatus	"Harmonyautomatization in Status [%s]"

sitemap

Switch item=HarmonyHubWohnzimmerautomatizationStatus label="Harmonyautomatization Status" mappings=[ Started="Started", Finished="Finished"]

I have a lot of table which were not created but i can’t find any error. SO your help is appreciated

Please check if the length of VARCHAR is still limited.
See Jdbc mariadb problem persisting string items

still same error…Nothing changed…

Can I create the tables by myself???

Full instructions how to setup MariaDB

Solved by

1 Like