Installation of bindings is failing in OpenHAB 2.4 with error: Exception in

I have multiple errors in OpenHAB 2.4 which I’m narrowing down. The core of the problem appears to be a failing installation system. My MQTT control stopped working with the upgrade and I have narrowed it down to OpenHAB not posting at all to the subjects of the Mosquitto server (which is working fine). I tried to uninstall the MQTT-binding and uninstall was fine but then I cannot re-install it. the error is:

[ERROR] [core.karaf.internal.FeatureInstaller] - Failed installing 'openhab-binding-mqtt1': Error restarting bundles:
Exception in of bundle

This then crashes the UIs and places the system in an infinite reboot loop.
Any suggestion would be greatly appreciated!

Same issue here, did you resolve?

I upgraded to 2.4.0 had minimal issues, ran an apt-get upgrade to latest OH 2.4 build (as of a couple days ago) and most things worked but still had the odd random runtime error in the logs, so decided to try clearing tmp and cache folders then restarting OH. After doing this, things went down hill fast.

Totally stumped now other than a complete wipe and rebuild (or restore)

2018-11-07 07:28:55.664 [INFO ] [control.internal.WebSocketConnection] - Web Socket close 1000. Reason: null
2018-11-07 07:28:59.701 [INFO ] [ui.habmin.internal.servlet.HABminApp] - Started HABmin servlet at /habmin
2018-11-07 07:28:59.801 [ERROR] [   ] - FrameworkEvent ERROR -
org.osgi.framework.BundleException: Exception in of bundle
        at org.eclipse.osgi.internal.framework.BundleContextImpl.startActivator( ~[?:?]
        at org.eclipse.osgi.internal.framework.BundleContextImpl.start( [?:?]
        at org.eclipse.osgi.internal.framework.EquinoxBundle.startWorker0( ~[?:?]
        at org.eclipse.osgi.internal.framework.EquinoxBundle$EquinoxModule.startWorker( ~[?:?]
        at org.eclipse.osgi.container.Module.doStart( ~[?:?]
        at org.eclipse.osgi.container.Module.start( ~[?:?]
        at org.eclipse.osgi.framework.util.SecureAction$ ~[?:?]
        at org.eclipse.osgi.framework.util.SecureAction$ ~[?:?]
        at Method) ~[?:?]
        at org.eclipse.osgi.framework.util.SecureAction.start( ~[?:?]
        at org.eclipse.osgi.container.ModuleContainer.start( ~[?:?]
        at org.eclipse.osgi.container.ModuleContainer.applyDelta( ~[?:?]
        at org.eclipse.osgi.container.ModuleContainer.resolveAndApply( ~[?:?]
        at org.eclipse.osgi.container.ModuleContainer.resolve( ~[?:?]
        at org.eclipse.osgi.container.ModuleContainer.refresh( ~[?:?]
        at org.eclipse.osgi.container.ModuleContainer$ContainerWiring.dispatchEvent( ~[?:?]
        at org.eclipse.osgi.container.ModuleContainer$ContainerWiring.dispatchEvent( ~[?:?]
        at org.eclipse.osgi.framework.eventmgr.EventManager.dispatchEvent( [?:?]
        at org.eclipse.osgi.framework.eventmgr.EventManager$ [?:?]
Caused by: java.lang.LinkageError: ClassCastException: attempting to castbundleresource://31.fwk15675549/javax/ws/rs/ext/RuntimeDelegate.class to bundleresource://31.fwk15675549/javax/ws/rs/ext/RuntimeDelegate.class
        at ~[?:?]
        at ~[?:?]
        at ~[?:?]
        at<clinit>( ~[?:?]
        at ~[?:?]
        at org.eclipse.osgi.internal.framework.BundleContextImpl$ ~[?:?]
        at org.eclipse.osgi.internal.framework.BundleContextImpl$ ~[?:?]
        at Method) ~[?:?]
        at org.eclipse.osgi.internal.framework.BundleContextImpl.startActivator( ~[?:?]
        ... 18 more
2018-11-07 07:29:13.842 [WARN ] [] - Dispatching event to subscriber '' takes more than 5000ms.
2018-11-07 07:29:17.531 [INFO ] [lipse.smarthome.model.script.openhab] - SYSTEM STARTING UP!
2018-11-07 07:29:18.963 [ERROR] [core.karaf.internal.FeatureInstaller] - Failed installing 'openhab-binding-exec, openhab-misc-openhabcloud, openhab-binding-network, openhab-persistence-influxdb, openhab-binding-wemo, openhab-binding-weather1, openhab-persistence-mysql, openhab-transformation-regex, openhab-binding-weatherunderground, openhab-transformation-jsonpath, openhab-binding-zwave, openhab-binding-mqtt1, openhab-binding-astro1, openhab-persistence-mqtt, openhab-persistence-rrd4j, openhab-ui-basic, openhab-transformation-map, openhab-binding-ntp, openhab-action-mail, openhab-ui-habmin, openhab-action-mqtt, openhab-transformation-exec, openhab-ui-paper, openhab-transformation-scale': Error restarting bundles:
        Exception in of bundle

I suspect it’s missing some framework file. Under the /var/lib/openhab2/cache/org.eclipse.osgi folder the latest framework file shown is I usually see this slowly increment as OH downloads the necessary files, its like it is just stopped here and not downloading anymore, although folders above 65 do exist (assume it creates all folders first then populates them?)

EDIT: A number of bindings are showing as uninitialized too. Uninstalling those bindings from PaperUI or reinstalling the hour glass sits there indefinitely and it never appears (from a UI perspective) to complete. Refreshing the URL brings it back though. Doing this to the Astro 2.4 binding for example:

2018-11-07 08:16:51.715 [INFO ] [thome.binding.astro.internal.job.Job] - Scheduled Astro event-jobs for thing astro:sun:local
2018-11-07 08:16:51.823 [INFO ] [ding.astro.handler.AstroThingHandler] - Scheduled Positional job astro:sun:local every 300 seconds
2018-11-07 08:16:52.382 [INFO ] [thome.binding.astro.internal.job.Job] - Scheduled Astro event-jobs for thing astro:moon:local
2018-11-07 08:16:52.411 [INFO ] [thome.binding.astro.internal.job.Job] - Scheduled Astro event-jobs for thing astro:sun:local
2018-11-07 08:16:52.454 [INFO ] [ding.astro.handler.AstroThingHandler] - Scheduled Positional job astro:sun:local every 300 seconds
2018-11-07 08:16:56.291 [ERROR] [core.karaf.internal.FeatureInstaller] - Failed installing 'openhab-binding-astro': Error restarting bundles:
        Exception in of bundle

usually, you get this kind of errors during the first startup of the OH2 service following the clearing of cache & tmp

The second (and subsequent) startups come up clean (at least this is my experience)

so try to clear again, start up (let it populate the cache & tmp), shut it down (let it sit for a few secs :slight_smile:) and then start it up again to see if things improve

(I know… not a lot of “scientific data” :stuck_out_tongue: but it works for me)

Thanks Dim, yes this is what I’ve done and am waiting now for things to come right. It seems patience is required here - I get similar issues with reinstalling the Harmony hub binding, but after some time it has come right (same as Astro binding)

2018-11-07 08:20:53.789 [WARN ] [mmon.WrappedScheduledExecutorService] - Scheduled runnable ended with an exception:
java.lang.LinkageError: ClassCastException: attempting to castbundleresource://31.fwk11084731/javax/ws/rs/client/ClientBuilder.class to bundleresource://31.fwk11084731/javax/ws/rs/client/ClientBuilder.class
        at ~[?:?]
        at ~[?:?]
        at ~[?:?]
        at ~[?:?]
        at org.openhab.binding.nest.internal.handler.NestBridgeHandler.startStreamingUpdates( ~[?:?]
        at org.openhab.binding.nest.internal.handler.NestBridgeHandler.restartStreamingUpdates( ~[?:?]
        at org.openhab.binding.nest.internal.handler.NestBridgeHandler.lambda$1( ~[?:?]
        at java.util.concurrent.Executors$ ~[?:?]
        at ~[?:?]
        at java.util.concurrent.ScheduledThreadPoolExecutor$ScheduledFutureTask.access$201( ~[?:?]
        at java.util.concurrent.ScheduledThreadPoolExecutor$ ~[?:?]
        at java.util.concurrent.ThreadPoolExecutor.runWorker( [?:?]
        at java.util.concurrent.ThreadPoolExecutor$ [?:?]
        at [?:?]
2018-11-07 08:20:56.932 [ERROR] [core.karaf.internal.FeatureInstaller] - Failed installing 'openhab-binding-harmonyhub': Error restarting bundles:
        Exception in of bundle