Strange error & Some MQTT devices not responding

So, I’ve spent about 2h troubleshooting some MQTT devices not showing up. They are not in the logs but I can see posts in the terminal on a different machine. Other MQTT devices on the same broker are working fine. I suspect it has something to do with renaming/persistence, but I am not sure where to look. I’m getting this error in my openhab.log but I’m not sure what it is pointing to.

2016-05-24 22:56:40.211 [ERROR] [org.apache.felix.configadmin ] - [org.osgi.service.cm.ManagedService, id=337, bundle=115/mvn:org.eclipse.smarthome.model/org.eclipse.smarthome.model.core/0.8.0-SNAPSHOT]: Unexpected problem updating configuration org.eclipse.smarthome.folder
java.lang.ClassCastException: java.lang.Double cannot be cast to java.lang.String
at org.openhab.persistence.jdbc.db.JdbcBaseDAO.getState(JdbcBaseDAO.java:448)[207:org.openhab.persistence.jdbc:1.9.0.201605170112]
at org.openhab.persistence.jdbc.db.JdbcBaseDAO.doGetHistItemFilterQuery(JdbcBaseDAO.java:287)[207:org.openhab.persistence.jdbc:1.9.0.201605170112]
at org.openhab.persistence.jdbc.internal.JdbcMapper.getHistItemFilterQuery(JdbcMapper.java:147)[207:org.openhab.persistence.jdbc:1.9.0.201605170112]
at org.openhab.persistence.jdbc.internal.JdbcPersistenceService.query(JdbcPersistenceService.java:201)[207:org.openhab.persistence.jdbc:1.9.0.201605170112]
at org.openhab.core.persistence.internal.QueryablePersistenceServiceDelegate.query(QueryablePersistenceServiceDelegate.java:49)[191:org.openhab.core.compat1x:2.0.0.201605091907]
at org.eclipse.smarthome.model.persistence.internal.PersistenceManager.initialize(PersistenceManager.java:374)[118:org.eclipse.smarthome.model.persistence:0.8.0.201605141733]
at org.eclipse.smarthome.model.persistence.internal.PersistenceManager.added(PersistenceManager.java:347)[118:org.eclipse.smarthome.model.persistence:0.8.0.201605141733]
at org.eclipse.smarthome.model.persistence.internal.PersistenceManager.added(PersistenceManager.java:1)[118:org.eclipse.smarthome.model.persistence:0.8.0.201605141733]
at org.eclipse.smarthome.core.internal.items.ItemRegistryImpl.allItemsChanged(ItemRegistryImpl.java:98)[96:org.eclipse.smarthome.core:0.8.0.201605141733]
at org.eclipse.smarthome.model.item.internal.GenericItemProvider.modelChanged(GenericItemProvider.java:407)[116:org.eclipse.smarthome.model.item:0.8.0.201605141733]
at org.eclipse.smarthome.model.core.internal.ModelRepositoryImpl.notifyListeners(ModelRepositoryImpl.java:201)[115:org.eclipse.smarthome.model.core:0.8.0.201605141733]
at org.eclipse.smarthome.model.core.internal.ModelRepositoryImpl.addOrRefreshModel(ModelRepositoryImpl.java:97)[115:org.eclipse.smarthome.model.core:0.8.0.201605141733]
at org.eclipse.smarthome.model.core.internal.folder.FolderObserver.checkFile(FolderObserver.java:240)[115:org.eclipse.smarthome.model.core:0.8.0.201605141733]
at org.eclipse.smarthome.model.core.internal.folder.FolderObserver.notifyUpdateToModelRepo(FolderObserver.java:169)[115:org.eclipse.smarthome.model.core:0.8.0.201605141733]
at org.eclipse.smarthome.model.core.internal.folder.FolderObserver.updated(FolderObserver.java:150)[115:org.eclipse.smarthome.model.core:0.8.0.201605141733]
at org.apache.felix.cm.impl.helper.ManagedServiceTracker.updated(ManagedServiceTracker.java:189)[7:org.apache.felix.configadmin:1.8.8]
at org.apache.felix.cm.impl.helper.ManagedServiceTracker.updateService(ManagedServiceTracker.java:152)[7:org.apache.felix.configadmin:1.8.8]
at org.apache.felix.cm.impl.helper.ManagedServiceTracker.provideConfiguration(ManagedServiceTracker.java:85)[7:org.apache.felix.configadmin:1.8.8]
at org.apache.felix.cm.impl.ConfigurationManager$ManagedServiceUpdate.provide(ConfigurationManager.java:1444)[7:org.apache.felix.configadmin:1.8.8]
at org.apache.felix.cm.impl.ConfigurationManager$ManagedServiceUpdate.run(ConfigurationManager.java:1400)[7:org.apache.felix.configadmin:1.8.8]
at org.apache.felix.cm.impl.UpdateThread.run0(UpdateThread.java:143)[7:org.apache.felix.configadmin:1.8.8]
at org.apache.felix.cm.impl.UpdateThread.run(UpdateThread.java:110)[7:org.apache.felix.configadmin:1.8.8]
at java.lang.Thread.run(Thread.java:745)[:1.8.0_65]

Any ideas?

More errors, likely related:

2016-05-24 23:06:28.036 [ERROR] [ui.internal.items.ItemUIRegistryImpl] - Cannot retrieve item ‘switch_garden_soaker’ for widget org.eclipse.smarthome.model.sitemap.Switch
2016-05-24 23:06:28.039 [ERROR] [ui.internal.items.ItemUIRegistryImpl] - Cannot retrieve item for widget org.eclipse.smarthome.model.sitemap.Switch
2016-05-24 23:06:28.042 [ERROR] [ui.internal.items.ItemUIRegistryImpl] - Cannot retrieve item ‘switch_garden_soaker’ for widget org.eclipse.smarthome.model.sitemap.Switch
2016-05-24 23:06:28.045 [ERROR] [ui.internal.items.ItemUIRegistryImpl] - Cannot retrieve item for widget org.eclipse.smarthome.model.sitemap.Switch
2016-05-24 23:06:28.047 [ERROR] [ui.internal.items.ItemUIRegistryImpl] - Cannot retrieve item ‘switch_garden_soaker’ for widget org.eclipse.smarthome.model.sitemap.Switch
2016-05-24 23:06:28.049 [ERROR] [ui.internal.items.ItemUIRegistryImpl] - Cannot retrieve item ‘switch_garden_soaker’ for widget org.eclipse.smarthome.model.sitemap.Switch

Did you at some point persist items but then later change the item types while keeping the same item names?

@lewie, do you have an opinion about the stack trace in the first message?

java.lang.ClassCastException: java.lang.Double cannot be cast to java.lang.String
at org.openhab.persistence.jdbc.db.JdbcBaseDAO.getState(JdbcBaseDAO.java:448)[207:org.openhab.persistence.jdbc:1.9.0.201605170112]
at org.openhab.persistence.jdbc.db.JdbcBaseDAO.doGetHistItemFilterQuery(JdbcBaseDAO.java:287)[207:org.openhab.persistence.jdbc:1.9.0.201605170112]
at org.openhab.persistence.jdbc.internal.JdbcMapper.getHistItemFilterQuery(JdbcMapper.java:147)[207:org.openhab.persistence.jdbc:1.9.0.201605170112]
at org.openhab.persistence.jdbc.internal.JdbcPersistenceService.query(JdbcPersistenceService.java:201)[207:org.openhab.persistence.jdbc:1.9.0.201605170112]
...

Hi Watou - thanks for the reply. Yeah, I am still sorting out my device taxonomies and guess I need to be more careful with wildcarding persistence.

I did a full reinstall of OH2 yesterday as I’m still not in that deep. Just saw the B2 release. Where do I see what version I am running?

I guess I didn’t quite fix it. I did a full re-install and moved my conf folder once reinstalling all bindings and transformations.

Still getting these errors:

2016-05-25 11:36:21.567 [ERROR] [ui.internal.items.ItemUIRegistryImpl] - Cannot retrieve item ‘temp_garden’ for widget org.eclipse.smarthome.model.sitemap.Text
2016-05-25 11:36:21.573 [ERROR] [ui.internal.items.ItemUIRegistryImpl] - Cannot retrieve item for widget org.eclipse.smarthome.model.sitemap.Text
2016-05-25 11:36:21.575 [ERROR] [ui.internal.items.ItemUIRegistryImpl] - Cannot retrieve item for widget org.eclipse.smarthome.model.sitemap.Text
2016-05-25 11:36:21.577 [ERROR] [ui.internal.items.ItemUIRegistryImpl] - Cannot retrieve item ‘temp_garden’ for widget org.eclipse.smarthome.model.sitemap.Text
2016-05-25 11:36:21.579 [ERROR] [ui.internal.items.ItemUIRegistryImpl] - Cannot retrieve item ‘temp_garden’ for widget org.eclipse.smarthome.model.sitemap.Text
2016-05-25 11:36:21.583 [ERROR] [ui.internal.items.ItemUIRegistryImpl] - Cannot retrieve item ‘humidity_garden’ for widget org.eclipse.smarthome.model.sitemap.Text
2016-05-25 11:36:21.585 [ERROR] [ui.internal.items.ItemUIRegistryImpl] - Cannot retrieve item for widget org.eclipse.smarthome.model.sitemap.Text
2016-05-25 11:36:21.589 [ERROR] [ui.internal.items.ItemUIRegistryImpl] - Cannot retrieve item for widget org.eclipse.smarthome.model.sitemap.Text
2016-05-25 11:36:21.591 [ERROR] [ui.internal.items.ItemUIRegistryImpl] - Cannot retrieve item ‘humidity_garden’ for widget org.eclipse.smarthome.model.sitemap.Text
2016-05-25 11:36:21.593 [ERROR] [ui.internal.items.ItemUIRegistryImpl] - Cannot retrieve item ‘humidity_garden’ for widget org.eclipse.smarthome.model.sitemap.Text
2016-05-25 11:36:21.597 [ERROR] [ui.internal.items.ItemUIRegistryImpl] - Cannot retrieve item ‘sensor_garden_barrel’ for widget org.eclipse.smarthome.model.sitemap.Text
2016-05-25 11:36:21.600 [ERROR] [ui.internal.items.ItemUIRegistryImpl] - Cannot retrieve item for widget org.eclipse.smarthome.model.sitemap.Text
2016-05-25 11:36:21.602 [ERROR] [ui.internal.items.ItemUIRegistryImpl] - Cannot retrieve item for widget org.eclipse.smarthome.model.sitemap.Text
2016-05-25 11:36:21.604 [ERROR] [ui.internal.items.ItemUIRegistryImpl] - Cannot retrieve item ‘sensor_garden_barrel’ for widget org.eclipse.smarthome.model.sitemap.Text
2016-05-25 11:36:21.606 [ERROR] [ui.internal.items.ItemUIRegistryImpl] - Cannot retrieve item ‘sensor_garden_barrel’ for widget org.eclipse.smarthome.model.sitemap.Text

never mind - I think these errors were introduced by my troubleshooting of the items file.