How to debug messages like this?

  • Platform information:
    • Hardware: ARM64
    • OS: Ubunto 23.10
    • Java Runtime Environment: Zulu17
    • openHAB version: 4.1.1
  • Issue of the topic: Getting WARNING messages in log with no futher details

Im receiving warnings in openhab logs that Im not able to interpret. What is the right way to detail messages like this out to find the root cause?

2024-03-22 10:36:43.334 [WARN ] [ui.internal.items.ItemUIRegistryImpl] - Cannot retrieve item OF for widget org.openhab.core.model.sitemap.sitemap.Switch
2024-03-22 10:36:46.770 [WARN ] [ui.internal.items.ItemUIRegistryImpl] - Cannot retrieve item O for widget org.openhab.core.model.sitemap.sitemap.Switch
2024-03-22 10:36:46.771 [WARN ] [ui.internal.items.ItemUIRegistryImpl] - Cannot retrieve item OF for widget org.openhab.core.model.sitemap.sitemap.Switch

or this one?

2024-03-22 10:55:05.300 [WARN ] [iadb.jdbc.message.server.ErrorPacket] - Error: 1366-22007: Incorrect double value: ‘OPEN’ for column openhab.item0152.value at row 1
2024-03-22 10:55:05.301 [WARN ] [jdbc.internal.JdbcPersistenceService] - JDBC::store: Unable to store item
org.openhab.persistence.jdbc.internal.exceptions.JdbcSQLException: Error in SQL query!!!; (conn=2983) Incorrect double value: ‘OPEN’ for column openhab.item0152.value at row 1 Query: INSERT INTO item0152 (time, value) VALUES( NOW(3), ? ) ON DUPLICATE KEY UPDATE VALUE= ? Parameters: [OPEN, OPEN]; Pool Name= yank-default; SQL= INSERT INTO item0152 (time, value) VALUES( NOW(3), ? ) ON DUPLICATE KEY UPDATE VALUE= ?
at org.openhab.persistence.jdbc.internal.db.JdbcBaseDAO.doStoreItemValue(JdbcBaseDAO.java:441) ~[?:?]
at org.openhab.persistence.jdbc.internal.JdbcMapper.storeItemValue(JdbcMapper.java:220) ~[?:?]
at org.openhab.persistence.jdbc.internal.JdbcPersistenceService.internalStore(JdbcPersistenceService.java:174) ~[?:?]
at org.openhab.persistence.jdbc.internal.JdbcPersistenceService.lambda$1(JdbcPersistenceService.java:146) ~[?:?]
at java.util.concurrent.Executors$RunnableAdapter.call(Executors.java:539) [?:?]
at java.util.concurrent.FutureTask.run(FutureTask.java:264) [?:?]
at java.util.concurrent.ScheduledThreadPoolExecutor$ScheduledFutureTask.run(ScheduledThreadPoolExecutor.java:304) [?:?]
at java.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1136) [?:?]
at java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:635) [?:?]
at java.lang.Thread.run(Thread.java:840) [?:?]

What is the best way to dig deeper into issues like this? Advises?

The first warnings indicate you have a sitemap with a Switch element that is using item=OF and you do not have an Item named “OF”.

Why did you use code fences for the first warnings but not the second ones?

The second set of warnings is coming from JDBC persistence. It’s complaining about an Item “item0152” but I don’t know JDBC persistence so I don’t know if that’s a mapping or if it’s the Item’s name.

The warning through is saying you are trying to insert “OPEN” into a column defined to store a number. Did you change the type of an Item recently from a Number to a Contact?

1st of all - thanks for answering

Thats what I also thought but I cannot find any “OF” or “O” in the sitemap code. Or am Im looking at the wrong place?

Well… what can I say? Stupid me :wink:

Looked through any relevant items but they all are of type Switch or Contact. But I believe Im able to fine the root cause for this one.

Maybe you have a managed sitemap created through the UI? You can grep through /var/lib/openHAB/jsondb to see if you can find anything there.

To me this looks like there is the last character missing and it would be OFF and ON ?

All right… finally I got the issues analysed and solved:
1.) Warnings WRT Widget in Sitemap “O” and “OF”
This was caused by a misconfiguration in Sitemaps for a LED Switch device - I mixed-up operator for Value Color. Cant get it reproduced, so not sure anymore about the details…

2.) Warnings WRT value type mismatch for item0152 when writing persistent data into MariaDB
This is really what the message means. The item0152 has incorrect data type of double while it should be varchar(6).

Solution:
SQL into MariaDB
use openhab; //Use openhab DB
show tables; //List any table - just for fun
Select * from items; //Check what item name belongs to the item0152 in this case. For further checks possibly
show columns from item0152; // Show details for this specific item.
ALTER TABLE item0152 MODIFY value varchar(6); //Finally modify value to varchar(6) - in my case anyway.

Im not sure why the value type has become incorrect but thats how to correct it.
Hope that helps.