openhab / openhab-addons

Add-ons for openHAB
https://www.openhab.org/
Eclipse Public License 2.0
1.88k stars 3.58k forks source link

[ZWave] Binding broken when renaming serial controller #858

Closed thopiekar closed 8 years ago

thopiekar commented 8 years ago

While trying to get my door/window sensors working, I made a reinstall again for researches in #850.

I'm not sure whether it is related to https://github.com/openhab/openhab2-addons/commit/3998733edd34ea3380fd82800e338feda1a4b765, so I made a new issue here.

2016-04-29 19:59:23.006 [INFO ] [internal.service.FeaturesServiceImpl] -   org.openhab.binding.zwave/2.0.0.201604262000
2016-04-29 19:59:23.012 [INFO ] [g.apache.aries.spifly.dynamic.bundle] - Bundle Considered for SPI providers: org.openhab.binding.zwave
2016-04-29 19:59:23.013 [INFO ] [g.apache.aries.spifly.dynamic.bundle] - No 'SPI-Provider' Manifest header. Skipping bundle: org.openhab.binding.zwave
2016-04-29 19:59:23.082 [INFO ] [me.event.ThingStatusInfoChangedEvent] - 'zwave:device:5ec07f15:node4' changed from UNINITIALIZED (HANDLER_MISSING_ERROR) to INITIALIZING
2016-04-29 19:59:23.089 [INFO ] [me.event.ThingStatusInfoChangedEvent] - 'zwave:device:5ec07f15:node4' changed from INITIALIZING to OFFLINE
2016-04-29 19:59:23.091 [ERROR] [ome.core.thing.internal.ThingManager] - Exception occured while initializing handler of thing 'zwave:device:5ec07f15:node4': java.lang.ClassCastException: org.eclipse.smarthome.core.thing.internal.ThingImpl cannot be cast to org.eclipse.smarthome.core.thing.Bridge
java.util.concurrent.ExecutionException: java.lang.ClassCastException: org.eclipse.smarthome.core.thing.internal.ThingImpl cannot be cast to org.eclipse.smarthome.core.thing.Bridge
        at java.util.concurrent.FutureTask.report(FutureTask.java:122)[:1.8.0_91]
        at java.util.concurrent.FutureTask.get(FutureTask.java:206)[:1.8.0_91]
        at org.eclipse.smarthome.core.common.SafeMethodCaller.callAsynchronous(SafeMethodCaller.java:179)[95:org.eclipse.smarthome.core:0.8.0.201604221705]
        at org.eclipse.smarthome.core.common.SafeMethodCaller.call(SafeMethodCaller.java:72)[95:org.eclipse.smarthome.core:0.8.0.201604221705]
        at org.eclipse.smarthome.core.common.SafeMethodCaller.call(SafeMethodCaller.java:56)[95:org.eclipse.smarthome.core:0.8.0.201604221705]
        at org.eclipse.smarthome.core.thing.internal.ThingManager$7.run(ThingManager.java:659)[101:org.eclipse.smarthome.core.thing:0.8.0.201604221705]
        at java.util.concurrent.Executors$RunnableAdapter.call(Executors.java:511)[:1.8.0_91]
        at java.util.concurrent.FutureTask.run(FutureTask.java:266)[:1.8.0_91]
        at java.util.concurrent.ScheduledThreadPoolExecutor$ScheduledFutureTask.access$201(ScheduledThreadPoolExecutor.java:180)[:1.8.0_91]
        at java.util.concurrent.ScheduledThreadPoolExecutor$ScheduledFutureTask.run(ScheduledThreadPoolExecutor.java:293)[:1.8.0_91]
        at java.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1142)[:1.8.0_91]
        at java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:617)[:1.8.0_91]
        at java.lang.Thread.run(Thread.java:745)[:1.8.0_91]
Caused by: java.lang.ClassCastException: org.eclipse.smarthome.core.thing.internal.ThingImpl cannot be cast to org.eclipse.smarthome.core.thing.Bridge
        at org.eclipse.smarthome.core.thing.binding.BaseThingHandler.getBridge(BaseThingHandler.java:491)[101:org.eclipse.smarthome.core.thing:0.8.0.201604221705]
        at org.openhab.binding.zwave.handler.ZWaveThingHandler.initialize(ZWaveThingHandler.java:131)[195:org.openhab.binding.zwave:2.0.0.201604262000]
        at org.eclipse.smarthome.core.thing.internal.ThingManager$7$1.call(ThingManager.java:662)[101:org.eclipse.smarthome.core.thing:0.8.0.201604221705]
        at org.eclipse.smarthome.core.thing.internal.ThingManager$7$1.call(ThingManager.java:1)[101:org.eclipse.smarthome.core.thing:0.8.0.201604221705]
        at org.eclipse.smarthome.core.common.SafeMethodCaller$CallableWrapper.call(SafeMethodCaller.java:170)[95:org.eclipse.smarthome.core:0.8.0.201604221705]
        at java.util.concurrent.FutureTask.run(FutureTask.java:266)[:1.8.0_91]
        ... 3 more
2016-04-29 19:59:23.093 [INFO ] [me.event.ThingStatusInfoChangedEvent] - 'zwave:device:5ec07f15:node5' changed from UNINITIALIZED (HANDLER_MISSING_ERROR) to INITIALIZING
2016-04-29 19:59:23.092 [INFO ] [me.event.ThingStatusInfoChangedEvent] - 'zwave:device:5ec07f15:node4' changed from OFFLINE to UNINITIALIZED (HANDLER_INITIALIZING_ERROR): org.eclipse.smarthome.core.thing.internal.ThingImpl cannot be cast to org.eclipse.smarthome.core.thing.Bridge
2016-04-29 19:59:23.111 [INFO ] [me.event.ThingStatusInfoChangedEvent] - 'zwave:device:5ec07f15:node7' changed from UNINITIALIZED (HANDLER_MISSING_ERROR) to INITIALIZING
2016-04-29 19:59:23.124 [ERROR] [ome.core.thing.internal.ThingManager] - Exception occured while initializing handler of thing 'zwave:device:5ec07f15:node7': java.lang.ClassCastException: org.eclipse.smarthome.core.thing.internal.ThingImpl cannot be cast to org.eclipse.smarthome.core.thing.Bridge
java.util.concurrent.ExecutionException: java.lang.ClassCastException: org.eclipse.smarthome.core.thing.internal.ThingImpl cannot be cast to org.eclipse.smarthome.core.thing.Bridge
        at java.util.concurrent.FutureTask.report(FutureTask.java:122)[:1.8.0_91]
        at java.util.concurrent.FutureTask.get(FutureTask.java:206)[:1.8.0_91]
        at org.eclipse.smarthome.core.common.SafeMethodCaller.callAsynchronous(SafeMethodCaller.java:179)[95:org.eclipse.smarthome.core:0.8.0.201604221705]
        at org.eclipse.smarthome.core.common.SafeMethodCaller.call(SafeMethodCaller.java:72)[95:org.eclipse.smarthome.core:0.8.0.201604221705]
        at org.eclipse.smarthome.core.common.SafeMethodCaller.call(SafeMethodCaller.java:56)[95:org.eclipse.smarthome.core:0.8.0.201604221705]
        at org.eclipse.smarthome.core.thing.internal.ThingManager$7.run(ThingManager.java:659)[101:org.eclipse.smarthome.core.thing:0.8.0.201604221705]
        at java.util.concurrent.Executors$RunnableAdapter.call(Executors.java:511)[:1.8.0_91]
        at java.util.concurrent.FutureTask.run(FutureTask.java:266)[:1.8.0_91]
        at java.util.concurrent.ScheduledThreadPoolExecutor$ScheduledFutureTask.access$201(ScheduledThreadPoolExecutor.java:180)[:1.8.0_91]
        at java.util.concurrent.ScheduledThreadPoolExecutor$ScheduledFutureTask.run(ScheduledThreadPoolExecutor.java:293)[:1.8.0_91]
        at java.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1142)[:1.8.0_91]
        at java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:617)[:1.8.0_91]
        at java.lang.Thread.run(Thread.java:745)[:1.8.0_91]
Caused by: java.lang.ClassCastException: org.eclipse.smarthome.core.thing.internal.ThingImpl cannot be cast to org.eclipse.smarthome.core.thing.Bridge
        at org.eclipse.smarthome.core.thing.binding.BaseThingHandler.getBridge(BaseThingHandler.java:491)[101:org.eclipse.smarthome.core.thing:0.8.0.201604221705]
        at org.openhab.binding.zwave.handler.ZWaveThingHandler.initialize(ZWaveThingHandler.java:131)[195:org.openhab.binding.zwave:2.0.0.201604262000]
        at org.eclipse.smarthome.core.thing.internal.ThingManager$7$1.call(ThingManager.java:662)[101:org.eclipse.smarthome.core.thing:0.8.0.201604221705]
        at org.eclipse.smarthome.core.thing.internal.ThingManager$7$1.call(ThingManager.java:1)[101:org.eclipse.smarthome.core.thing:0.8.0.201604221705]
        at org.eclipse.smarthome.core.common.SafeMethodCaller$CallableWrapper.call(SafeMethodCaller.java:170)[95:org.eclipse.smarthome.core:0.8.0.201604221705]
        at java.util.concurrent.FutureTask.run(FutureTask.java:266)[:1.8.0_91]
        ... 3 more
2016-04-29 19:59:23.130 [INFO ] [me.event.ThingStatusInfoChangedEvent] - 'zwave:device:5ec07f15:node7' changed from OFFLINE to UNINITIALIZED (HANDLER_INITIALIZING_ERROR): org.eclipse.smarthome.core.thing.internal.ThingImpl cannot be cast to org.eclipse.smarthome.core.thing.Bridge
2016-04-29 19:59:23.124 [INFO ] [me.event.ThingStatusInfoChangedEvent] - 'zwave:device:5ec07f15:node7' changed from INITIALIZING to OFFLINE
2016-04-29 19:59:23.139 [INFO ] [me.event.ThingStatusInfoChangedEvent] - 'zwave:device:5ec07f15:node8' changed from UNINITIALIZED (HANDLER_MISSING_ERROR) to INITIALIZING
2016-04-29 19:59:23.168 [ERROR] [ome.core.thing.internal.ThingManager] - Exception occured while calling thing handler factory 'org.openhab.binding.zwave.internal.ZWaveHandlerFactory@c6317b': java.lang.ClassCastException: org.eclipse.smarthome.core.thing.internal.ThingImpl cannot be cast to org.eclipse.smarthome.core.thing.Bridge
java.util.concurrent.ExecutionException: java.lang.ClassCastException: org.eclipse.smarthome.core.thing.internal.ThingImpl cannot be cast to org.eclipse.smarthome.core.thing.Bridge
        at java.util.concurrent.FutureTask.report(FutureTask.java:122)[:1.8.0_91]
        at java.util.concurrent.FutureTask.get(FutureTask.java:206)[:1.8.0_91]
        at org.eclipse.smarthome.core.common.SafeMethodCaller.callAsynchronous(SafeMethodCaller.java:179)
        at org.eclipse.smarthome.core.common.SafeMethodCaller.call(SafeMethodCaller.java:72)
        at org.eclipse.smarthome.core.common.SafeMethodCaller.call(SafeMethodCaller.java:56)
        at org.eclipse.smarthome.core.thing.internal.ThingManager.registerHandler(ThingManager.java:582)
        at org.eclipse.smarthome.core.thing.internal.ThingManager.addThingHandlerFactory(ThingManager.java:902)
        at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)[:1.8.0_91]
        at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:62)[:1.8.0_91]
        at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43)[:1.8.0_91]
        at java.lang.reflect.Method.invoke(Method.java:498)[:1.8.0_91]
        at org.apache.felix.scr.impl.helper.BaseMethod.invokeMethod(BaseMethod.java:222)[31:org.apache.felix.scr:2.0.2]
        at org.apache.felix.scr.impl.helper.BaseMethod.access$500(BaseMethod.java:37)[31:org.apache.felix.scr:2.0.2]
        at org.apache.felix.scr.impl.helper.BaseMethod$Resolved.invoke(BaseMethod.java:615)[31:org.apache.felix.scr:2.0.2]
        at org.apache.felix.scr.impl.helper.BaseMethod.invoke(BaseMethod.java:499)[31:org.apache.felix.scr:2.0.2]
        at org.apache.felix.scr.impl.helper.BindMethod.invoke(BindMethod.java:41)[31:org.apache.felix.scr:2.0.2]
        at org.apache.felix.scr.impl.manager.DependencyManager.doInvokeBindMethod(DependencyManager.java:1660)[31:org.apache.felix.scr:2.0.2]
        at org.apache.felix.scr.impl.manager.DependencyManager.invokeBindMethod(DependencyManager.java:1636)[31:org.apache.felix.scr:2.0.2]
        at org.apache.felix.scr.impl.manager.SingleComponentManager.invokeBindMethod(SingleComponentManager.java:370)[31:org.apache.felix.scr:2.0.2]
        at org.apache.felix.scr.impl.manager.DependencyManager$MultipleDynamicCustomizer.addedService(DependencyManager.java:319)[31:org.apache.felix.scr:2.0.2]
        at org.apache.felix.scr.impl.manager.DependencyManager$MultipleDynamicCustomizer.addedService(DependencyManager.java:295)[31:org.apache.felix.scr:2.0.2]
        at org.apache.felix.scr.impl.manager.ServiceTracker$Tracked.customizerAdded(ServiceTracker.java:1215)[31:org.apache.felix.scr:2.0.2]
        at org.apache.felix.scr.impl.manager.ServiceTracker$Tracked.customizerAdded(ServiceTracker.java:1136)[31:org.apache.felix.scr:2.0.2]
        at org.apache.felix.scr.impl.manager.ServiceTracker$AbstractTracked.trackAdding(ServiceTracker.java:945)[31:org.apache.felix.scr:2.0.2]
        at org.apache.felix.scr.impl.manager.ServiceTracker$AbstractTracked.track(ServiceTracker.java:881)[31:org.apache.felix.scr:2.0.2]
        at org.apache.felix.scr.impl.manager.ServiceTracker$Tracked.serviceChanged(ServiceTracker.java:1167)[31:org.apache.felix.scr:2.0.2]
        at org.apache.felix.scr.impl.BundleComponentActivator$ListenerInfo.serviceChanged(BundleComponentActivator.java:120)[31:org.apache.felix.scr:2.0.2]
        at org.eclipse.osgi.internal.serviceregistry.FilteredServiceListener.serviceChanged(FilteredServiceListener.java:109)[org.eclipse.osgi-3.10.2.v20150203-1939.jar:]
        at org.eclipse.osgi.internal.framework.BundleContextImpl.dispatchEvent(BundleContextImpl.java:914)[org.eclipse.osgi-3.10.2.v20150203-1939.jar:]
        at org.eclipse.osgi.framework.eventmgr.EventManager.dispatchEvent(EventManager.java:230)[org.eclipse.osgi-3.10.2.v20150203-1939.jar:]
        at org.eclipse.osgi.framework.eventmgr.ListenerQueue.dispatchEventSynchronous(ListenerQueue.java:148)[org.eclipse.osgi-3.10.2.v20150203-1939.jar:]
        at org.eclipse.osgi.internal.serviceregistry.ServiceRegistry.publishServiceEventPrivileged(ServiceRegistry.java:862)[org.eclipse.osgi-3.10.2.v20150203-1939.jar:]
        at org.eclipse.osgi.internal.serviceregistry.ServiceRegistry.publishServiceEvent(ServiceRegistry.java:801)[org.eclipse.osgi-3.10.2.v20150203-1939.jar:]
        at org.eclipse.osgi.internal.serviceregistry.ServiceRegistrationImpl.register(ServiceRegistrationImpl.java:127)[org.eclipse.osgi-3.10.2.v20150203-1939.jar:]
        at org.eclipse.osgi.internal.serviceregistry.ServiceRegistry.registerService(ServiceRegistry.java:225)[org.eclipse.osgi-3.10.2.v20150203-1939.jar:]
        at org.eclipse.osgi.internal.framework.BundleContextImpl.registerService(BundleContextImpl.java:464)[org.eclipse.osgi-3.10.2.v20150203-1939.jar:]
        at org.apache.felix.scr.impl.manager.AbstractComponentManager$3.register(AbstractComponentManager.java:869)[31:org.apache.felix.scr:2.0.2]
        at org.apache.felix.scr.impl.manager.AbstractComponentManager$3.register(AbstractComponentManager.java:857)[31:org.apache.felix.scr:2.0.2]
        at org.apache.felix.scr.impl.manager.RegistrationManager.changeRegistration(RegistrationManager.java:133)[31:org.apache.felix.scr:2.0.2]
        at org.apache.felix.scr.impl.manager.AbstractComponentManager.registerService(AbstractComponentManager.java:915)[31:org.apache.felix.scr:2.0.2]
        at org.apache.felix.scr.impl.manager.AbstractComponentManager.activateInternal(AbstractComponentManager.java:715)[31:org.apache.felix.scr:2.0.2]
        at org.apache.felix.scr.impl.manager.AbstractComponentManager.enable(AbstractComponentManager.java:399)[31:org.apache.felix.scr:2.0.2]
        at org.apache.felix.scr.impl.config.ConfigurableComponentHolder.enableComponents(ConfigurableComponentHolder.java:676)[31:org.apache.felix.scr:2.0.2]
        at org.apache.felix.scr.impl.BundleComponentActivator.initialEnable(BundleComponentActivator.java:339)[31:org.apache.felix.scr:2.0.2]
        at org.apache.felix.scr.impl.Activator.loadComponents(Activator.java:360)[31:org.apache.felix.scr:2.0.2]
        at org.apache.felix.scr.impl.Activator.access$000(Activator.java:53)[31:org.apache.felix.scr:2.0.2]
        at org.apache.felix.scr.impl.Activator$ScrExtension.start(Activator.java:260)[31:org.apache.felix.scr:2.0.2]
        at org.apache.felix.utils.extender.AbstractExtender.createExtension(AbstractExtender.java:259)[31:org.apache.felix.scr:2.0.2]
        at org.apache.felix.utils.extender.AbstractExtender.modifiedBundle(AbstractExtender.java:232)[31:org.apache.felix.scr:2.0.2]
        at org.osgi.util.tracker.BundleTracker$Tracked.customizerModified(BundleTracker.java:482)[org.osgi.core-6.0.0.jar:]
        at org.osgi.util.tracker.BundleTracker$Tracked.customizerModified(BundleTracker.java:415)[org.osgi.core-6.0.0.jar:]
        at org.osgi.util.tracker.AbstractTracked.track(AbstractTracked.java:232)[org.osgi.core-6.0.0.jar:]
        at org.osgi.util.tracker.BundleTracker$Tracked.bundleChanged(BundleTracker.java:444)[org.osgi.core-6.0.0.jar:]
        at org.eclipse.osgi.internal.framework.BundleContextImpl.dispatchEvent(BundleContextImpl.java:902)[org.eclipse.osgi-3.10.2.v20150203-1939.jar:]
        at org.eclipse.osgi.framework.eventmgr.EventManager.dispatchEvent(EventManager.java:230)[org.eclipse.osgi-3.10.2.v20150203-1939.jar:]
        at org.eclipse.osgi.framework.eventmgr.ListenerQueue.dispatchEventSynchronous(ListenerQueue.java:148)[org.eclipse.osgi-3.10.2.v20150203-1939.jar:]
        at org.eclipse.osgi.internal.framework.EquinoxEventPublisher.publishBundleEventPrivileged(EquinoxEventPublisher.java:165)[org.eclipse.osgi-3.10.2.v20150203-1939.jar:]
        at org.eclipse.osgi.internal.framework.EquinoxEventPublisher.publishBundleEvent(EquinoxEventPublisher.java:75)[org.eclipse.osgi-3.10.2.v20150203-1939.jar:]
        at org.eclipse.osgi.internal.framework.EquinoxEventPublisher.publishBundleEvent(EquinoxEventPublisher.java:67)[org.eclipse.osgi-3.10.2.v20150203-1939.jar:]
        at org.eclipse.osgi.internal.framework.EquinoxContainerAdaptor.publishModuleEvent(EquinoxContainerAdaptor.java:102)[org.eclipse.osgi-3.10.2.v20150203-1939.jar:]
        at org.eclipse.osgi.container.Module.publishEvent(Module.java:466)[org.eclipse.osgi-3.10.2.v20150203-1939.jar:]
        at org.eclipse.osgi.container.Module.start(Module.java:457)[org.eclipse.osgi-3.10.2.v20150203-1939.jar:]
        at org.eclipse.osgi.internal.framework.EquinoxBundle.start(EquinoxBundle.java:393)[org.eclipse.osgi-3.10.2.v20150203-1939.jar:]
        at org.eclipse.osgi.internal.framework.EquinoxBundle.start(EquinoxBundle.java:412)[org.eclipse.osgi-3.10.2.v20150203-1939.jar:]
        at org.apache.karaf.features.internal.service.FeaturesServiceImpl.startBundle(FeaturesServiceImpl.java:1199)[9:org.apache.karaf.features.core:4.0.4]
        at org.apache.karaf.features.internal.service.Deployer.deploy(Deployer.java:840)[9:org.apache.karaf.features.core:4.0.4]
        at org.apache.karaf.features.internal.service.FeaturesServiceImpl.doProvision(FeaturesServiceImpl.java:1089)[9:org.apache.karaf.features.core:4.0.4]
        at org.apache.karaf.features.internal.service.FeaturesServiceImpl$1.call(FeaturesServiceImpl.java:985)[9:org.apache.karaf.features.core:4.0.4]
        at java.util.concurrent.FutureTask.run(FutureTask.java:266)[:1.8.0_91]
        at java.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1142)[:1.8.0_91]
        at java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:617)[:1.8.0_91]
        at java.lang.Thread.run(Thread.java:745)[:1.8.0_91]
Caused by: java.lang.ClassCastException: org.eclipse.smarthome.core.thing.internal.ThingImpl cannot be cast to org.eclipse.smarthome.core.thing.Bridge
        at org.openhab.binding.zwave.internal.ZWaveHandlerFactory.createHandler(ZWaveHandlerFactory.java:50)[195:org.openhab.binding.zwave:2.0.0.201604262000]
        at org.eclipse.smarthome.core.thing.binding.BaseThingHandlerFactory.registerHandler(BaseThingHandlerFactory.java:113)[101:org.eclipse.smarthome.core.thing:0.8.0.201604221705]
        at org.eclipse.smarthome.core.thing.internal.ThingManager$6.call(ThingManager.java:586)[101:org.eclipse.smarthome.core.thing:0.8.0.201604221705]
        at org.eclipse.smarthome.core.thing.internal.ThingManager$6.call(ThingManager.java:1)[101:org.eclipse.smarthome.core.thing:0.8.0.201604221705]
        at org.eclipse.smarthome.core.common.SafeMethodCaller$CallableWrapper.call(SafeMethodCaller.java:170)[95:org.eclipse.smarthome.core:0.8.0.201604221705]
        ... 4 more
2016-04-29 19:59:23.212 [ERROR] [ome.core.thing.internal.ThingManager] - Exception occured while initializing handler of thing 'zwave:device:5ec07f15:node5': java.lang.ClassCastException: org.eclipse.smarthome.core.thing.internal.ThingImpl cannot be cast to org.eclipse.smarthome.core.thing.Bridge
java.util.concurrent.ExecutionException: java.lang.ClassCastException: org.eclipse.smarthome.core.thing.internal.ThingImpl cannot be cast to org.eclipse.smarthome.core.thing.Bridge
        at java.util.concurrent.FutureTask.report(FutureTask.java:122)[:1.8.0_91]
        at java.util.concurrent.FutureTask.get(FutureTask.java:206)[:1.8.0_91]
        at org.eclipse.smarthome.core.common.SafeMethodCaller.callAsynchronous(SafeMethodCaller.java:179)[95:org.eclipse.smarthome.core:0.8.0.201604221705]
        at org.eclipse.smarthome.core.common.SafeMethodCaller.call(SafeMethodCaller.java:72)[95:org.eclipse.smarthome.core:0.8.0.201604221705]
        at org.eclipse.smarthome.core.common.SafeMethodCaller.call(SafeMethodCaller.java:56)[95:org.eclipse.smarthome.core:0.8.0.201604221705]
        at org.eclipse.smarthome.core.thing.internal.ThingManager$7.run(ThingManager.java:659)[101:org.eclipse.smarthome.core.thing:0.8.0.201604221705]
        at java.util.concurrent.Executors$RunnableAdapter.call(Executors.java:511)[:1.8.0_91]
        at java.util.concurrent.FutureTask.run(FutureTask.java:266)[:1.8.0_91]
        at java.util.concurrent.ScheduledThreadPoolExecutor$ScheduledFutureTask.access$201(ScheduledThreadPoolExecutor.java:180)[:1.8.0_91]
        at java.util.concurrent.ScheduledThreadPoolExecutor$ScheduledFutureTask.run(ScheduledThreadPoolExecutor.java:293)[:1.8.0_91]
        at java.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1142)[:1.8.0_91]
        at java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:617)[:1.8.0_91]
        at java.lang.Thread.run(Thread.java:745)[:1.8.0_91]
Caused by: java.lang.ClassCastException: org.eclipse.smarthome.core.thing.internal.ThingImpl cannot be cast to org.eclipse.smarthome.core.thing.Bridge
        at org.eclipse.smarthome.core.thing.binding.BaseThingHandler.getBridge(BaseThingHandler.java:491)[101:org.eclipse.smarthome.core.thing:0.8.0.201604221705]
        at org.openhab.binding.zwave.handler.ZWaveThingHandler.initialize(ZWaveThingHandler.java:131)[195:org.openhab.binding.zwave:2.0.0.201604262000]
        at org.eclipse.smarthome.core.thing.internal.ThingManager$7$1.call(ThingManager.java:662)[101:org.eclipse.smarthome.core.thing:0.8.0.201604221705]
        at org.eclipse.smarthome.core.thing.internal.ThingManager$7$1.call(ThingManager.java:1)[101:org.eclipse.smarthome.core.thing:0.8.0.201604221705]
        at org.eclipse.smarthome.core.common.SafeMethodCaller$CallableWrapper.call(SafeMethodCaller.java:170)[95:org.eclipse.smarthome.core:0.8.0.201604221705]
        at java.util.concurrent.FutureTask.run(FutureTask.java:266)[:1.8.0_91]
        ... 3 more
2016-04-29 19:59:23.212 [ERROR] [ome.core.thing.internal.ThingManager] - Exception occured while initializing handler of thing 'zwave:device:5ec07f15:node8': java.lang.ClassCastException: org.eclipse.smarthome.core.thing.internal.ThingImpl cannot be cast to org.eclipse.smarthome.core.thing.Bridge
java.util.concurrent.ExecutionException: java.lang.ClassCastException: org.eclipse.smarthome.core.thing.internal.ThingImpl cannot be cast to org.eclipse.smarthome.core.thing.Bridge
        at java.util.concurrent.FutureTask.report(FutureTask.java:122)[:1.8.0_91]
        at java.util.concurrent.FutureTask.get(FutureTask.java:206)[:1.8.0_91]
        at org.eclipse.smarthome.core.common.SafeMethodCaller.callAsynchronous(SafeMethodCaller.java:179)[95:org.eclipse.smarthome.core:0.8.0.201604221705]
        at org.eclipse.smarthome.core.common.SafeMethodCaller.call(SafeMethodCaller.java:72)[95:org.eclipse.smarthome.core:0.8.0.201604221705]
        at org.eclipse.smarthome.core.common.SafeMethodCaller.call(SafeMethodCaller.java:56)[95:org.eclipse.smarthome.core:0.8.0.201604221705]
        at org.eclipse.smarthome.core.thing.internal.ThingManager$7.run(ThingManager.java:659)[101:org.eclipse.smarthome.core.thing:0.8.0.201604221705]
        at java.util.concurrent.Executors$RunnableAdapter.call(Executors.java:511)[:1.8.0_91]
        at java.util.concurrent.FutureTask.run(FutureTask.java:266)[:1.8.0_91]
        at java.util.concurrent.ScheduledThreadPoolExecutor$ScheduledFutureTask.access$201(ScheduledThreadPoolExecutor.java:180)[:1.8.0_91]
        at java.util.concurrent.ScheduledThreadPoolExecutor$ScheduledFutureTask.run(ScheduledThreadPoolExecutor.java:293)[:1.8.0_91]
        at java.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1142)[:1.8.0_91]
        at java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:617)[:1.8.0_91]
        at java.lang.Thread.run(Thread.java:745)[:1.8.0_91]
Caused by: java.lang.ClassCastException: org.eclipse.smarthome.core.thing.internal.ThingImpl cannot be cast to org.eclipse.smarthome.core.thing.Bridge
        at org.eclipse.smarthome.core.thing.binding.BaseThingHandler.getBridge(BaseThingHandler.java:491)[101:org.eclipse.smarthome.core.thing:0.8.0.201604221705]
        at org.openhab.binding.zwave.handler.ZWaveThingHandler.initialize(ZWaveThingHandler.java:131)[195:org.openhab.binding.zwave:2.0.0.201604262000]
        at org.eclipse.smarthome.core.thing.internal.ThingManager$7$1.call(ThingManager.java:662)[101:org.eclipse.smarthome.core.thing:0.8.0.201604221705]
        at org.eclipse.smarthome.core.thing.internal.ThingManager$7$1.call(ThingManager.java:1)[101:org.eclipse.smarthome.core.thing:0.8.0.201604221705]
        at org.eclipse.smarthome.core.common.SafeMethodCaller$CallableWrapper.call(SafeMethodCaller.java:170)[95:org.eclipse.smarthome.core:0.8.0.201604221705]
        at java.util.concurrent.FutureTask.run(FutureTask.java:266)[:1.8.0_91]
        ... 3 more
2016-04-29 19:59:23.220 [INFO ] [me.event.ThingStatusInfoChangedEvent] - 'zwave:device:5ec07f15:node5' changed from INITIALIZING to OFFLINE
2016-04-29 19:59:23.220 [INFO ] [me.event.ThingStatusInfoChangedEvent] - 'zwave:device:5ec07f15:node8' changed from INITIALIZING to OFFLINE
2016-04-29 19:59:23.225 [INFO ] [me.event.ThingStatusInfoChangedEvent] - 'zwave:device:5ec07f15:node8' changed from OFFLINE to UNINITIALIZED (HANDLER_INITIALIZING_ERROR): org.eclipse.smarthome.core.thing.internal.ThingImpl cannot be cast to org.eclipse.smarthome.core.thing.Bridge
2016-04-29 19:59:23.226 [INFO ] [me.event.ThingStatusInfoChangedEvent] - 'zwave:device:5ec07f15:node5' changed from OFFLINE to UNINITIALIZED (HANDLER_INITIALIZING_ERROR): org.eclipse.smarthome.core.thing.internal.ThingImpl cannot be cast to org.eclipse.smarthome.core.thing.Bridge
2016-04-29 19:59:23.240 [INFO ] [internal.service.FeaturesServiceImpl] - Done.
2016-04-29 19:59:23.246 [INFO ] [smarthome.event.ExtensionEvent      ] - Extension 'binding-zwave' has been installed.
2016-04-29 20:00:34.074 [INFO ] [smarthome.event.ThingUpdatedEvent   ] - Thing 'zwave:device:5ec07f15:node8' has been updated.
cdjackson commented 8 years ago

Are you using the UI for your configuration, or is it configured manually? I’m not sure what this error is but I’m not sure how it can happen if things are configured in the UI.

thopiekar commented 8 years ago

Yes, I used the Paper UI for that. Simply clicked on uninstall, waited and made a install again.

cdjackson commented 8 years ago

Is the bridge properly initialised?

thopiekar commented 8 years ago

No, all ZWave devices are "Uninitialised".

cdjackson commented 8 years ago

Ok, so I think this must be caused by the bridge being uninitialised. Any idea why that is?

thopiekar commented 8 years ago

No, sorry :disappointed:

cdjackson commented 8 years ago

Ok - I think you need to sort this out first then. If you have a log, then I’m happy to take a look, but if the controller isn’t working, then nothing else will so we need to fix that first.

thopiekar commented 8 years ago

openhab.txt

In the mean time I unzip an 3-days-old offline zip and set up my controller. After a time it found all the devices again, but again the zwave binding broke with:

22:10:45.986 [INFO ] [me.event.ThingStatusInfoChangedEvent] - 'zwave:device:ea35ed86:node8' changed from OFFLINE to UNINITIALIZED (HANDLER_INITIALIZING_ERROR): org.eclipse.smarthome.core.thing.internal.ThingImpl cannot be cast to org.eclipse.smarthome.core.thing.Bridge
  1. I don't have a good explanation for this. The openhab2 distro is running on a Hardkernel Odroid U3 (Samsung Exynos4412, ARM) board with Oracle Java JDK8 installed. Probably that matters here. (Will retry on my notebook.)
  2. Additionally is possible that it fails to setup my remote? While looking at the issue I reported yesterday, I made a factory reset on that remote and reconnected it. Then it appeared finally as online.

Log: openhab.txt

PS: Tried now alternatively with OpenJDK 8 and got the same. When running OpenHab (new installation) on my notebook only one thing where I sent a wake signal just got online (which I assume is correct).

cdjackson commented 8 years ago

As stated earlier, there is something wrong with your controller. The binding is not talking to it, and this is causing the errors. You need to rectify this first.

thopiekar commented 8 years ago

I never thought this might be the cause, but when I rename the thing "Z-Wave Serial Controller" into "Controller (Z-Wave)" it gets broken. I removed the controller, re-added it and it works again :smile:

cdjackson commented 8 years ago

Strange - ok, I’ll take a look at this…

If you rename it, and restart OH completely, is it still broken?

thopiekar commented 8 years ago

Yes, even after restarting it is still broken. I tried to set the default name to get it working, but it doesn't fix the problem.. Just readding that thing will make it work (at least for me).

cdjackson commented 8 years ago

This doesn't seem to be related to the ZWave binding - I can replicate this with other bindings - so it's either an issue with HABmin and the way it saves the thing information, or it's a problem with ESH. Given PaperUI doesn't seem to provide the ability to change the name of a thing, I can't test which at the moment but suspect it's an ESH issue.

maggu2810 commented 8 years ago

Given PaperUI doesn't seem to provide the ability to change the name of a thing

cdjackson commented 8 years ago

Thanks - not sure why I didn’t see what before…

Anyway, the error doesn’t seem to occur with PaperUI, so it looks related to the way HABmin saves the thing configuration. I’ll check the difference between the two….

cdjackson commented 8 years ago

So the difference is that HABmin is sending the full thing back to ESH, while PaperUI is only sending an object with the label, and an empty configuration. I guess the REST interface is doing something ‘bad’ with some of the other members.

maggu2810 commented 8 years ago

I remember that we decided it is a good idea not to send the configuration if it is not changed (https://github.com/eclipse/smarthome/issues/1168#issue-140306478), but it surely should work and I would consider that as an bug if this is not working.

cdjackson commented 8 years ago

Absolutely - HABmin uses other config methods for setting most of the config, but it needs to use this API to set the label, and some other stuff (channel config I think). I don’t null everything else out - I don’t mind doing it but I really think that ESH shouldn’t kill the thing if this API is used...

devnulled commented 8 years ago

I have experienced this bug as well in both HABmin and PaperUI both, FWIW. I'm running OpenHAB from a 2.x snapshot that I grabbed within the last week or two at the most. In fact, the only reason I installed HABmin was to try and get around this problem in PaperUI until I stumbled across this bug.

Is there some way to fix my Z-Wave devices manually without having to reconnect them?

cdjackson commented 8 years ago

You need to delete the thing and add it back, but you don't need to exclude and re-include the device into the network. So, delete the thing, hit the discovery button and it will immediately be found again (don't do anything to the node) and then add the thing back. It should pick up all the previous channels and items with any luck.

devnulled commented 8 years ago

Thanks @cdjackson, that did the trick.

cdjackson commented 8 years ago

Fixed by https://github.com/eclipse/smarthome/issues/1440