[SOLVED] Update to 2.5.1 broke ZigBee (mismatched dependencies?)

Tags: #<Tag:0x00007fc90d725140>

Upgraded from 2.5.0 to 2.5.1 using yum from the OpenHab Stable repo (https://dl.bintray.com/openhab/rpm-repo2/stable), unfortunately I’m now seeing this in the logs:

java.lang.NoSuchMethodError: com.zsmartsystems.zigbee.ZigBeeNetworkManager.addExtension(Lcom/zsmartsystems/zigbee/app/ZigBeeNetworkExtension;)V
at org.openhab.binding.zigbee.handler.ZigBeeCoordinatorHandler.initialiseZigBee(ZigBeeCoordinatorHandler.java:409) ~[?:?]
at org.openhab.binding.zigbee.handler.ZigBeeCoordinatorHandler.lambda$0(ZigBeeCoordinatorHandler.java:508) ~[?:?]
at java.util.concurrent.Executors$RunnableAdapter.call(Executors.java:511) ~[?:1.8.0_192]
at java.util.concurrent.FutureTask.run(FutureTask.java:266) ~[?:1.8.0_192]
at java.util.concurrent.ScheduledThreadPoolExecutor$ScheduledFutureTask.access$201(ScheduledThreadPoolExecutor.java:180) ~[?:1.8.0_192]
at java.util.concurrent.ScheduledThreadPoolExecutor$ScheduledFutureTask.run(ScheduledThreadPoolExecutor.java:293) ~[?:1.8.0_192]
at java.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1149) [?:1.8.0_192]
at java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:624) [?:1.8.0_192]
at java.lang.Thread.run(Thread.java:748) [?:1.8.0_192]

and my ZigBee controller & devices are offline (“Unknown” status).

Clear the Cache is a first step.

that was quite messy…

Jan 29 11:10:07 plexnuc karaf[4514]: at org.eclipse.osgi.container.ModuleContainer$ContainerStartLevel.dispatchEvent(ModuleContainer.java:1528)
Jan 29 11:10:07 plexnuc karaf[4514]: at org.eclipse.osgi.container.ModuleContainer$ContainerStartLevel.dispatchEvent(ModuleContainer.java:1)
Jan 29 11:10:07 plexnuc karaf[4514]: at org.eclipse.osgi.framework.eventmgr.EventManager.dispatchEvent(EventManager.java:230)
Jan 29 11:10:07 plexnuc karaf[4514]: at org.eclipse.osgi.framework.eventmgr.EventManager$EventThread.run(EventManager.java:340)
Jan 29 11:10:07 plexnuc karaf[4514]: Caused by: java.io.FileNotFoundException: /var/lib/openhab2/cache/org.eclipse.osgi/114/0/bundleFile (No such file or directory)
Jan 29 11:10:07 plexnuc karaf[4514]: at java.util.zip.ZipFile.open(Native Method)
Jan 29 11:10:07 plexnuc karaf[4514]: at java.util.zip.ZipFile.<init>(ZipFile.java:230)
Jan 29 11:10:07 plexnuc karaf[4514]: at java.util.zip.ZipFile.<init>(ZipFile.java:160)
Jan 29 11:10:07 plexnuc karaf[4514]: at java.util.zip.ZipFile.<init>(ZipFile.java:174)
Jan 29 11:10:07 plexnuc karaf[4514]: at org.eclipse.osgi.framework.util.SecureAction.getZipFile(SecureAction.java:304)
Jan 29 11:10:07 plexnuc karaf[4514]: ... 230 more
Jan 29 11:10:20 plexnuc karaf[4514]: org.openhab.core.model.rule.runtime [org.eclipse.smarthome.model.rule.runtime.internal.engine.RuleTriggerManager] ERROR : Error while starting the scheduler service: The Scheduler cannot be resta
Jan 29 11:12:38 plexnuc systemd[1]: Stopping openHAB 2 - empowering the smart home...
Jan 29 11:12:39 plexnuc karaf[5765]: Can't connect to the container. The container is not running.
Jan 29 11:12:39 plexnuc systemd[1]: openhab2.service: control process exited, code=exited status=1

using systemd rather than openhab-cli start had better results…

looks to be running again now but the same exception is still being thrown:

2020-01-29 11:19:38.306 [WARN ] [mmon.WrappedScheduledExecutorService] - Scheduled runnable ended with an exception: 
java.lang.NoSuchMethodError: com.zsmartsystems.zigbee.ZigBeeNetworkManager.addExtension(Lcom/zsmartsystems/zigbee/app/ZigBeeNetworkExtension;)V
at org.openhab.binding.zigbee.handler.ZigBeeCoordinatorHandler.initialiseZigBee(ZigBeeCoordinatorHandler.java:409) ~[?:?]
at org.openhab.binding.zigbee.handler.ZigBeeCoordinatorHandler.lambda$0(ZigBeeCoordinatorHandler.java:508) ~[?:?]
at java.util.concurrent.Executors$RunnableAdapter.call(Executors.java:511) ~[?:1.8.0_192]
at java.util.concurrent.FutureTask.run(FutureTask.java:266) ~[?:1.8.0_192]
at java.util.concurrent.ScheduledThreadPoolExecutor$ScheduledFutureTask.access$201(ScheduledThreadPoolExecutor.java:180) ~[?:1.8.0_192]
at java.util.concurrent.ScheduledThreadPoolExecutor$ScheduledFutureTask.run(ScheduledThreadPoolExecutor.java:293) ~[?:1.8.0_192]
at java.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1149) [?:1.8.0_192]
at java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:624) [?:1.8.0_192]
at java.lang.Thread.run(Thread.java:748) [?:1.8.0_192]

Which is odd since all openhab-cli does is call systemd.

Since that didn’t work a Zigbee expert is going to have to chime in here.

I verified that /var/lib/openhab2/tmp is deleted after using openhab-cli clean-cache, when restarting openhab I see this:

[root@plexnuc openhab2]# pwd
/var/lib/openhab2
[root@plexnuc openhab2]# find | grep -i .jar$ | grep org.openhab.binding.zigbee
./tmp/kar/openhab-addons-2.5.0/org/openhab/addons/bundles/org.openhab.binding.zigbee/2.5.0/org.openhab.binding.zigbee-2.5.0.jar
./tmp/kar/openhab-addons-2.5.0/org/openhab/addons/bundles/org.openhab.binding.zigbee.cc2531/2.5.0/org.openhab.binding.zigbee.cc2531-2.5.0.jar
./tmp/kar/openhab-addons-2.5.0/org/openhab/addons/bundles/org.openhab.binding.zigbee.ember/2.5.0/org.openhab.binding.zigbee.ember-2.5.0.jar
./tmp/kar/openhab-addons-2.5.0/org/openhab/addons/bundles/org.openhab.binding.zigbee.telegesis/2.5.0/org.openhab.binding.zigbee.telegesis-2.5.0.jar
./tmp/kar/openhab-addons-2.5.0/org/openhab/addons/bundles/org.openhab.binding.zigbee.xbee/2.5.0/org.openhab.binding.zigbee.xbee-2.5.0.jar

./tmp/mvn/org/openhab/addons/bundles/org.openhab.binding.zigbee.console/2.5.1/org.openhab.binding.zigbee.console-2.5.1.jar . 
./tmp/mvn/org/openhab/addons/bundles/org.openhab.binding.zigbee.console.ember/2.5.1/org.openhab.binding.zigbee.console.ember-2.5.1.jar

Why is karaf grabbing the seemingly wrong versions of the dependency?

I neglected to update the openhab2-addons package (RPM) - I wonder if that can be enforced through RPM dependencies?

Once updated everything is well again, apologies for the noise.