I would like to rebuild my existing database to use the item names for the tables. But when setting rebuildTableNames=true I get the following error on startup:
DBC::openConnection: Driver is available::Yank setupDataSource
2017-11-27 20:07:02.079 [WARN ] [persistence.jdbc.internal.JdbcMapper] - JDBC::formatTableNames: found Table Name= item1
2017-11-27 20:07:02.080 [WARN ] [persistence.jdbc.internal.JdbcMapper] - JDBC::formatTableNames: found Table id= -1
2017-11-27 20:07:02.081 [WARN ] [persistence.jdbc.internal.JdbcMapper] - JDBC::formatTableNames: found Table newName= null
2017-11-27 20:07:02.082 [ERROR] [persistence.jdbc.internal.JdbcMapper] - JDBC::formatTableNames: Table 'item1' could NOT be renamed to 'null'
2017-11-27 20:07:02.173 [ERROR] [org.knowm.yank.Yank ] - Error in SQL query!!!
I tried this as the database used by openhab and as the user “postgres”, same error in booth cases.
Maybe you have an idea, what I might missing?!
Thanks in advance!
Looks like a bug in the code somewhere. It is trying to rename the table to null which is not allowed. The null indicates that the Item name it is trying to change to is not being set correctly in the SQL command.
I know nothing of the JDBC binding or how all of this works. I didn’t even know this was possible. So I won’t be of further helps except to recommend filing an issue.
First of all: Rich, thanks a lot for your help and great effort in this forum. I wish I had only 10% of your knowledge about openHAB!!
Regarding the error:
I was not sure, if this really is an error or if it was caused by setting the configuration parameters inconsistent, I have not found much information regarding the “rebuildTableNames”. I will do some more testing in the next time und report a bug if that does not work out!
My secret was I just started reading the threads and researching how to answer other people’s problems so I could answer them. Helping others is a sure fire way to learn a system in a hurry.