Installation of bindings is failing in OpenHAB 2.4 with error: Exception in org.eclipse.smarthome.io.rest.sse.internal.SseActivator.start()

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 org.eclipse.smarthome.io.rest.sse.internal.SseActivator.start() of bundle org.eclipse.smarthome.io.rest.sse.

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] [org.eclipse.smarthome.io.rest.sse   ] - FrameworkEvent ERROR - org.eclipse.smarthome.io.rest.sse
org.osgi.framework.BundleException: Exception in org.eclipse.smarthome.io.rest.sse.internal.SseActivator.start() of bundle org.eclipse.smarthome.io.rest.sse.
        at org.eclipse.osgi.internal.framework.BundleContextImpl.startActivator(BundleContextImpl.java:800) ~[?:?]
        at org.eclipse.osgi.internal.framework.BundleContextImpl.start(BundleContextImpl.java:729) [?:?]
        at org.eclipse.osgi.internal.framework.EquinoxBundle.startWorker0(EquinoxBundle.java:933) ~[?:?]
        at org.eclipse.osgi.internal.framework.EquinoxBundle$EquinoxModule.startWorker(EquinoxBundle.java:309) ~[?:?]
        at org.eclipse.osgi.container.Module.doStart(Module.java:581) ~[?:?]
        at org.eclipse.osgi.container.Module.start(Module.java:449) ~[?:?]
        at org.eclipse.osgi.framework.util.SecureAction$23.run(SecureAction.java:474) ~[?:?]
        at org.eclipse.osgi.framework.util.SecureAction$23.run(SecureAction.java:1) ~[?:?]
        at java.security.AccessController.doPrivileged(Native Method) ~[?:?]
        at org.eclipse.osgi.framework.util.SecureAction.start(SecureAction.java:472) ~[?:?]
        at org.eclipse.osgi.container.ModuleContainer.start(ModuleContainer.java:750) ~[?:?]
        at org.eclipse.osgi.container.ModuleContainer.applyDelta(ModuleContainer.java:741) ~[?:?]
        at org.eclipse.osgi.container.ModuleContainer.resolveAndApply(ModuleContainer.java:511) ~[?:?]
        at org.eclipse.osgi.container.ModuleContainer.resolve(ModuleContainer.java:457) ~[?:?]
        at org.eclipse.osgi.container.ModuleContainer.refresh(ModuleContainer.java:1001) ~[?:?]
        at org.eclipse.osgi.container.ModuleContainer$ContainerWiring.dispatchEvent(ModuleContainer.java:1382) ~[?:?]
        at org.eclipse.osgi.container.ModuleContainer$ContainerWiring.dispatchEvent(ModuleContainer.java:1) ~[?:?]
        at org.eclipse.osgi.framework.eventmgr.EventManager.dispatchEvent(EventManager.java:230) [?:?]
        at org.eclipse.osgi.framework.eventmgr.EventManager$EventThread.run(EventManager.java:340) [?:?]
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 javax.ws.rs.ext.RuntimeDelegate.findDelegate(RuntimeDelegate.java:146) ~[?:?]
        at javax.ws.rs.ext.RuntimeDelegate.getInstance(RuntimeDelegate.java:120) ~[?:?]
        at javax.ws.rs.core.MediaType.valueOf(MediaType.java:179) ~[?:?]
        at org.glassfish.jersey.media.sse.SseFeature.<clinit>(SseFeature.java:62) ~[?:?]
        at org.eclipse.smarthome.io.rest.sse.internal.SseActivator.start(SseActivator.java:49) ~[?:?]
        at org.eclipse.osgi.internal.framework.BundleContextImpl$3.run(BundleContextImpl.java:779) ~[?:?]
        at org.eclipse.osgi.internal.framework.BundleContextImpl$3.run(BundleContextImpl.java:1) ~[?:?]
        at java.security.AccessController.doPrivileged(Native Method) ~[?:?]
        at org.eclipse.osgi.internal.framework.BundleContextImpl.startActivator(BundleContextImpl.java:772) ~[?:?]
        ... 18 more
2018-11-07 07:29:13.842 [WARN ] [me.core.internal.events.EventHandler] - Dispatching event to subscriber 'org.eclipse.smarthome.io.monitor.internal.EventLogger@152a60f' 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 org.eclipse.smarthome.io.rest.sse.internal.SseActivator.start() of bundle org.eclipse.smarthome.io.rest.sse.

I suspect it’s missing some framework file. Under the /var/lib/openhab2/cache/org.eclipse.osgi folder the latest framework file shown is framework.info.65 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 org.eclipse.smarthome.io.rest.sse.internal.SseActivator.start() of bundle org.eclipse.smarthome.io.rest.sse.

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 javax.ws.rs.client.ClientBuilder.newBuilder(ClientBuilder.java:97) ~[?:?]
        at org.openhab.binding.nest.internal.rest.NestStreamingRestClient.createEventSource(NestStreamingRestClient.java:79) ~[?:?]
        at org.openhab.binding.nest.internal.rest.NestStreamingRestClient.reopenEventSource(NestStreamingRestClient.java:115) ~[?:?]
        at org.openhab.binding.nest.internal.rest.NestStreamingRestClient.start(NestStreamingRestClient.java:127) ~[?:?]
        at org.openhab.binding.nest.internal.handler.NestBridgeHandler.startStreamingUpdates(NestBridgeHandler.java:317) ~[?:?]
        at org.openhab.binding.nest.internal.handler.NestBridgeHandler.restartStreamingUpdates(NestBridgeHandler.java:300) ~[?:?]
        at org.openhab.binding.nest.internal.handler.NestBridgeHandler.lambda$1(NestBridgeHandler.java:111) ~[?:?]
        at java.util.concurrent.Executors$RunnableAdapter.call(Executors.java:511) ~[?:?]
        at java.util.concurrent.FutureTask.run(FutureTask.java:266) ~[?:?]
        at java.util.concurrent.ScheduledThreadPoolExecutor$ScheduledFutureTask.access$201(ScheduledThreadPoolExecutor.java:180) ~[?:?]
        at java.util.concurrent.ScheduledThreadPoolExecutor$ScheduledFutureTask.run(ScheduledThreadPoolExecutor.java:293) ~[?:?]
        at java.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1149) [?:?]
        at java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:624) [?:?]
        at java.lang.Thread.run(Thread.java:748) [?:?]
2018-11-07 08:20:56.932 [ERROR] [core.karaf.internal.FeatureInstaller] - Failed installing 'openhab-binding-harmonyhub': Error restarting bundles:
        Exception in org.eclipse.smarthome.io.rest.sse.internal.SseActivator.start() of bundle org.eclipse.smarthome.io.rest.sse.