Openhab 2.4 M3 build-- Help understanding error


I installed the 2.4 milestone build and now receive this error below. I am having trouble understanding where to chase it down as it looks to be related to the rest api. When I visit paper ui or basic ui all seems to be working fine. The first error appears to be the cause of the second one with failing to install bundles. However the bundles all appear to be installed in paper ui. See log below.

2018-09-04 07:47:21.251 [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.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://26.fwk7090514/javax/ws/rs/ext/RuntimeDelegate.class to bundleresource://26.fwk7090514/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( ~[?:?]
	... 15 more
2018-09-04 07:47:25.486 [INFO ] [basic.internal.servlet.WebAppServlet] - Started Basic UI at /basicui/app
2018-09-04 07:47:25.741 [INFO ] [] - MQTT Service initialization completed.
2018-09-04 07:47:25.745 [INFO ] [t.mqtt.internal.MqttBrokerConnection] - Starting MQTT broker connection 'wifipimqtt'
2018-09-04 07:47:29.298 [INFO ] [arthome.ui.paper.internal.PaperUIApp] - Started Paper UI at /paperui
2018-09-04 07:47:29.402 [ERROR] [core.karaf.internal.FeatureInstaller] - Failed installing 'openhab-persistence-mapdb, openhab-binding-exec, openhab-misc-restdocs, openhab-binding-network, openhab-persistence-influxdb, openhab-transformation-jsonpath, openhab-binding-mqtt1, openhab-ui-basic, openhab-transformation-map, openhab-binding-ntp, openhab-binding-tradfri, openhab-binding-astro, openhab-ui-paper': Error restarting bundles:
	Exception in of bundle

I had the same with some snapshot builds but the system was still working same as you so I just ignored them
The errors of happen on start-up and never after

1 Like

Thanks! Sounds like a plan!

Isn’t that because the system is not starting properly? The error indicates that a number of bundles are not starting which probably isn’t good. Ignoring errors that are telling you a bunch of bundles aren’t starting may not be the appropriate thing to do :wink:

Normally, a ClassCastException is caused by a mismatch between versions. It is normally caused by a bundle being compiled against one system, and then run in a slightly different system - eg it might be caused by running bundles from different versions, where a change has been made to the API.

@chris thanks for the info. I am repeating the install by installing bundles one by one. I am going to try to narrow down the error.

I agree it is not good to just ignore errors. This is happening on my secondary system, so I was letting it slide. I don’t plan on putting 2.4 on my production system until I resolv all Errors.

But they are starting… That’s the thing. All the bindings/actions/persistence/services/transformations are working after the start-up even though that error shows up just the once in the start-up log.

Ok, strange that the error seems to indicate they aren’t -:

Often with a CCE, it won’t start, but maybe there are multiple bundles and it’s able to resolve the dependencies through another bundle.

Have you tried clearing the cache?

Yes, the cache has been cleared. I am installing bundles one at a time now. I am going to try to see what causes the error.