Hi,
I migrated from OH3.1 to OH3.2 on Eclipse IDE. Maven resolution if fine but when I link the add-on via IDE (debug) or import to OH3.2 distro, Im getting the following error. It seems that my custom bundle is unable to load LoggerFactory class. Any idea on how to resolve this? I have included a pom.xml for your reference too. Thanks
08:23:22.788 [ERROR] [o.thecodecloud.internal.CloudService] - bundle org.openhab.io.thecodecloud:3.2.0.202208030015 (164)[org.openhab.io.thecodecloud.internal.CloudService(273)] : Error during instantiation of the implementation object
java.lang.reflect.InvocationTargetException: null
at jdk.internal.reflect.NativeConstructorAccessorImpl.newInstance0(Native Method) ~[?:?]
at jdk.internal.reflect.NativeConstructorAccessorImpl.newInstance(NativeConstructorAccessorImpl.java:62) ~[?:?]
at jdk.internal.reflect.DelegatingConstructorAccessorImpl.newInstance(DelegatingConstructorAccessorImpl.java:45) ~[?:?]
at java.lang.reflect.Constructor.newInstance(Constructor.java:490) ~[?:?]
at org.apache.felix.scr.impl.inject.internal.ComponentConstructorImpl.newInstance(ComponentConstructorImpl.java:316) ~[org.apache.felix.scr-2.1.30.jar:?]
at org.apache.felix.scr.impl.manager.SingleComponentManager.createImplementationObject(SingleComponentManager.java:286) [org.apache.felix.scr-2.1.30.jar:?]
at org.apache.felix.scr.impl.manager.SingleComponentManager.createComponent(SingleComponentManager.java:115) [org.apache.felix.scr-2.1.30.jar:?]
at org.apache.felix.scr.impl.manager.SingleComponentManager.getService(SingleComponentManager.java:1000) [org.apache.felix.scr-2.1.30.jar:?]
at org.apache.felix.scr.impl.manager.SingleComponentManager.getServiceInternal(SingleComponentManager.java:973) [org.apache.felix.scr-2.1.30.jar:?]
at org.apache.felix.scr.impl.manager.SingleComponentManager.getService(SingleComponentManager.java:918) [org.apache.felix.scr-2.1.30.jar:?]
at org.eclipse.osgi.internal.serviceregistry.ServiceFactoryUse$1.run(ServiceFactoryUse.java:216) [org.eclipse.osgi-3.16.300.jar:?]
at java.security.AccessController.doPrivileged(Native Method) ~[?:?]
at org.eclipse.osgi.internal.serviceregistry.ServiceFactoryUse.factoryGetService(ServiceFactoryUse.java:213) [org.eclipse.osgi-3.16.300.jar:?]
at org.eclipse.osgi.internal.serviceregistry.ServiceFactoryUse.getService(ServiceFactoryUse.java:114) [org.eclipse.osgi-3.16.300.jar:?]
at org.eclipse.osgi.internal.serviceregistry.ServiceConsumer$2.getService(ServiceConsumer.java:48) [org.eclipse.osgi-3.16.300.jar:?]
at org.eclipse.osgi.internal.serviceregistry.ServiceRegistrationImpl.getService(ServiceRegistrationImpl.java:547) [org.eclipse.osgi-3.16.300.jar:?]
at org.eclipse.osgi.internal.serviceregistry.ServiceRegistry.getService(ServiceRegistry.java:533) [org.eclipse.osgi-3.16.300.jar:?]
at org.eclipse.osgi.internal.framework.BundleContextImpl.getService(BundleContextImpl.java:656) [org.eclipse.osgi-3.16.300.jar:?]
at org.apache.felix.scr.impl.manager.SingleRefPair.getServiceObject(SingleRefPair.java:88) [org.apache.felix.scr-2.1.30.jar:?]
at org.apache.felix.scr.impl.inject.methods.BindMethod.getServiceObject(BindMethod.java:675) [org.apache.felix.scr-2.1.30.jar:?]
at org.apache.felix.scr.impl.manager.DependencyManager.getServiceObject(DependencyManager.java:2556) [org.apache.felix.scr-2.1.30.jar:?]
at org.apache.felix.scr.impl.manager.DependencyManager.doInvokeBindMethod(DependencyManager.java:2075) [org.apache.felix.scr-2.1.30.jar:?]
at org.apache.felix.scr.impl.manager.DependencyManager.invokeBindMethod(DependencyManager.java:2058) [org.apache.felix.scr-2.1.30.jar:?]
at org.apache.felix.scr.impl.manager.SingleComponentManager.invokeBindMethod(SingleComponentManager.java:443) [org.apache.felix.scr-2.1.30.jar:?]
at org.apache.felix.scr.impl.manager.DependencyManager$MultipleDynamicCustomizer.addedService(DependencyManager.java:333) [org.apache.felix.scr-2.1.30.jar:?]
at org.apache.felix.scr.impl.manager.DependencyManager$MultipleDynamicCustomizer.addedService(DependencyManager.java:301) [org.apache.felix.scr-2.1.30.jar:?]
at org.apache.felix.scr.impl.manager.ServiceTracker$Tracked.customizerAdded(ServiceTracker.java:1200) [org.apache.felix.scr-2.1.30.jar:?]
at org.apache.felix.scr.impl.manager.ServiceTracker$Tracked.customizerAdded(ServiceTracker.java:1121) [org.apache.felix.scr-2.1.30.jar:?]
at org.apache.felix.scr.impl.manager.ServiceTracker$AbstractTracked.trackAdding(ServiceTracker.java:928) [org.apache.felix.scr-2.1.30.jar:?]
at org.apache.felix.scr.impl.manager.ServiceTracker$AbstractTracked.track(ServiceTracker.java:864) [org.apache.felix.scr-2.1.30.jar:?]
at org.apache.felix.scr.impl.manager.ServiceTracker$Tracked.serviceChanged(ServiceTracker.java:1152) [org.apache.felix.scr-2.1.30.jar:?]
at org.apache.felix.scr.impl.BundleComponentActivator$ListenerInfo.serviceChanged(BundleComponentActivator.java:114) [org.apache.felix.scr-2.1.30.jar:?]
at org.eclipse.osgi.internal.serviceregistry.FilteredServiceListener.serviceChanged(FilteredServiceListener.java:120) [org.eclipse.osgi-3.16.300.jar:?]
at org.eclipse.osgi.internal.framework.BundleContextImpl.dispatchEvent(BundleContextImpl.java:957) [org.eclipse.osgi-3.16.300.jar:?]
at org.eclipse.osgi.framework.eventmgr.EventManager.dispatchEvent(EventManager.java:234) [org.eclipse.osgi-3.16.300.jar:?]
at org.eclipse.osgi.framework.eventmgr.ListenerQueue.dispatchEventSynchronous(ListenerQueue.java:151) [org.eclipse.osgi-3.16.300.jar:?]
at org.eclipse.osgi.internal.serviceregistry.ServiceRegistry.publishServiceEventPrivileged(ServiceRegistry.java:936) [org.eclipse.osgi-3.16.300.jar:?]
at org.eclipse.osgi.internal.serviceregistry.ServiceRegistry.publishServiceEvent(ServiceRegistry.java:873) [org.eclipse.osgi-3.16.300.jar:?]
at org.eclipse.osgi.internal.serviceregistry.ServiceRegistrationImpl.register(ServiceRegistrationImpl.java:141) [org.eclipse.osgi-3.16.300.jar:?]
at org.eclipse.osgi.internal.serviceregistry.ServiceRegistry.registerService(ServiceRegistry.java:261) [org.eclipse.osgi-3.16.300.jar:?]
at org.eclipse.osgi.internal.framework.BundleContextImpl.registerService(BundleContextImpl.java:496) [org.eclipse.osgi-3.16.300.jar:?]
at org.apache.felix.scr.impl.manager.AbstractComponentManager$3.register(AbstractComponentManager.java:929) [org.apache.felix.scr-2.1.30.jar:?]
at org.apache.felix.scr.impl.manager.AbstractComponentManager$3.register(AbstractComponentManager.java:915) [org.apache.felix.scr-2.1.30.jar:?]
at org.apache.felix.scr.impl.manager.RegistrationManager.changeRegistration(RegistrationManager.java:133) [org.apache.felix.scr-2.1.30.jar:?]
at org.apache.felix.scr.impl.manager.AbstractComponentManager.registerService(AbstractComponentManager.java:984) [org.apache.felix.scr-2.1.30.jar:?]
at org.apache.felix.scr.impl.manager.AbstractComponentManager.activateInternal(AbstractComponentManager.java:752) [org.apache.felix.scr-2.1.30.jar:?]
at org.apache.felix.scr.impl.manager.AbstractComponentManager.enableInternal(AbstractComponentManager.java:674) [org.apache.felix.scr-2.1.30.jar:?]
at org.apache.felix.scr.impl.manager.AbstractComponentManager.enable(AbstractComponentManager.java:437) [org.apache.felix.scr-2.1.30.jar:?]
at org.apache.felix.scr.impl.manager.ConfigurableComponentHolder.enableComponents(ConfigurableComponentHolder.java:667) [org.apache.felix.scr-2.1.30.jar:?]
at org.apache.felix.scr.impl.BundleComponentActivator.initialEnable(BundleComponentActivator.java:305) [org.apache.felix.scr-2.1.30.jar:?]
at org.apache.felix.scr.impl.Activator.loadComponents(Activator.java:554) [org.apache.felix.scr-2.1.30.jar:?]
at org.apache.felix.scr.impl.Activator.access$200(Activator.java:70) [org.apache.felix.scr-2.1.30.jar:?]
at org.apache.felix.scr.impl.Activator$ScrExtension.start(Activator.java:421) [org.apache.felix.scr-2.1.30.jar:?]
at org.apache.felix.scr.impl.AbstractExtender.createExtension(AbstractExtender.java:196) [org.apache.felix.scr-2.1.30.jar:?]
at org.apache.felix.scr.impl.AbstractExtender.modifiedBundle(AbstractExtender.java:169) [org.apache.felix.scr-2.1.30.jar:?]
at org.apache.felix.scr.impl.AbstractExtender.modifiedBundle(AbstractExtender.java:49) [org.apache.felix.scr-2.1.30.jar:?]
at org.osgi.util.tracker.BundleTracker$Tracked.customizerModified(BundleTracker.java:488) [org.eclipse.osgi-3.16.300.jar:?]
at org.osgi.util.tracker.BundleTracker$Tracked.customizerModified(BundleTracker.java:1) [org.eclipse.osgi-3.16.300.jar:?]
at org.osgi.util.tracker.AbstractTracked.track(AbstractTracked.java:232) [org.eclipse.osgi-3.16.300.jar:?]
at org.osgi.util.tracker.BundleTracker$Tracked.bundleChanged(BundleTracker.java:450) [org.eclipse.osgi-3.16.300.jar:?]
at org.eclipse.osgi.internal.framework.BundleContextImpl.dispatchEvent(BundleContextImpl.java:945) [org.eclipse.osgi-3.16.300.jar:?]
at org.eclipse.osgi.framework.eventmgr.EventManager.dispatchEvent(EventManager.java:234) [org.eclipse.osgi-3.16.300.jar:?]
at org.eclipse.osgi.framework.eventmgr.ListenerQueue.dispatchEventSynchronous(ListenerQueue.java:151) [org.eclipse.osgi-3.16.300.jar:?]
at org.eclipse.osgi.internal.framework.EquinoxEventPublisher.publishBundleEventPrivileged(EquinoxEventPublisher.java:232) [org.eclipse.osgi-3.16.300.jar:?]
at org.eclipse.osgi.internal.framework.EquinoxEventPublisher.publishBundleEvent(EquinoxEventPublisher.java:138) [org.eclipse.osgi-3.16.300.jar:?]
at org.eclipse.osgi.internal.framework.EquinoxEventPublisher.publishBundleEvent(EquinoxEventPublisher.java:130) [org.eclipse.osgi-3.16.300.jar:?]
at org.eclipse.osgi.internal.framework.EquinoxContainerAdaptor.publishModuleEvent(EquinoxContainerAdaptor.java:217) [org.eclipse.osgi-3.16.300.jar:?]
at org.eclipse.osgi.container.Module.publishEvent(Module.java:499) [org.eclipse.osgi-3.16.300.jar:?]
at org.eclipse.osgi.container.Module.start(Module.java:486) [org.eclipse.osgi-3.16.300.jar:?]
at org.eclipse.osgi.internal.framework.EquinoxBundle.start(EquinoxBundle.java:445) [org.eclipse.osgi-3.16.300.jar:?]
at aQute.launcher.Launcher.start(Launcher.java:687) [biz.aQute.launcher-6.0.0.jar:?]
at aQute.launcher.Launcher.startBundles(Launcher.java:667) [biz.aQute.launcher-6.0.0.jar:?]
at aQute.launcher.Launcher.activate(Launcher.java:573) [biz.aQute.launcher-6.0.0.jar:?]
at aQute.launcher.Launcher.launch(Launcher.java:403) [biz.aQute.launcher-6.0.0.jar:?]
at aQute.launcher.Launcher.run(Launcher.java:185) [biz.aQute.launcher-6.0.0.jar:?]
at aQute.launcher.Launcher.main(Launcher.java:161) [biz.aQute.launcher-6.0.0.jar:?]
at aQute.launcher.pre.EmbeddedLauncher.executeWithRunPath(EmbeddedLauncher.java:170) [biz.aQute.launcher.pre.jar:?]
at aQute.launcher.pre.EmbeddedLauncher.findAndExecute(EmbeddedLauncher.java:135) [biz.aQute.launcher.pre.jar:?]
at aQute.launcher.pre.EmbeddedLauncher.main(EmbeddedLauncher.java:52) [biz.aQute.launcher.pre.jar:?]
Caused by: java.lang.NoClassDefFoundError: org/slf4j/LoggerFactory
at org.openhab.io.thecodecloud.internal.CloudService.<init>(CloudService.java:74) ~[?:?]
... 79 more
08:23:22.796 [WARN ] [e.model.rule.scoping.RulesClassCache] - bundle org.openhab.core.model.rule:3.2.0.202112191916 (144)[org.openhab.core.model.rule.scoping.RulesClassCache(175)] : Could not get service from ref {org.openhab.io.thecodecloud.internal.CloudService, org.openhab.core.events.EventSubscriber, org.openhab.core.model.script.engine.action.ActionService}={service.config.factory=false, service.id=407, service.bundleid=164, service.scope=bundle, service.config.category=io, service.pid=[org.openhab.thecodecloud, org.openhab.thecodecloud], service.config.label=TheCode Cloud, component.name=org.openhab.io.thecodecloud.internal.CloudService, service.config.description.uri=io:thecodecloud, component.id=273}
08:23:22.797 [WARN ] [e.model.rule.scoping.RulesClassCache] - bundle org.openhab.core.model.rule:3.2.0.202112191916 (144)[org.openhab.core.model.rule.scoping.RulesClassCache(175)] : DependencyManager : invokeBindMethod : Service not available from service registry for ServiceReference {org.openhab.io.thecodecloud.internal.CloudService, org.openhab.core.events.EventSubscriber, org.openhab.core.model.script.engine.action.ActionService}={service.config.factory=false, service.id=407, service.bundleid=164, service.scope=bundle, service.config.category=io, service.pid=[org.openhab.thecodecloud, org.openhab.thecodecloud], service.config.label=TheCode Cloud, component.name=org.openhab.io.thecodecloud.internal.CloudService, service.config.description.uri=io:thecodecloud, component.id=273} for reference ActionService
08:23:22.799 [ERROR] [o.thecodecloud.internal.CloudService] - bundle org.openhab.io.thecodecloud:3.2.0.202208030015 (164)[org.openhab.io.thecodecloud.internal.CloudService(273)] : Error during instantiation of the implementation object
java.lang.reflect.InvocationTargetException: null
at jdk.internal.reflect.NativeConstructorAccessorImpl.newInstance0(Native Method) ~[?:?]
at jdk.internal.reflect.NativeConstructorAccessorImpl.newInstance(NativeConstructorAccessorImpl.java:62) ~[?:?]
at jdk.internal.reflect.DelegatingConstructorAccessorImpl.newInstance(DelegatingConstructorAccessorImpl.java:45) ~[?:?]
at java.lang.reflect.Constructor.newInstance(Constructor.java:490) ~[?:?]
at org.apache.felix.scr.impl.inject.internal.ComponentConstructorImpl.newInstance(ComponentConstructorImpl.java:316) ~[org.apache.felix.scr-2.1.30.jar:?]
at org.apache.felix.scr.impl.manager.SingleComponentManager.createImplementationObject(SingleComponentManager.java:286) [org.apache.felix.scr-2.1.30.jar:?]
at org.apache.felix.scr.impl.manager.SingleComponentManager.createComponent(SingleComponentManager.java:115) [org.apache.felix.scr-2.1.30.jar:?]
at org.apache.felix.scr.impl.manager.SingleComponentManager.getService(SingleComponentManager.java:1000) [org.apache.felix.scr-2.1.30.jar:?]
at org.apache.felix.scr.impl.manager.SingleComponentManager.getServiceInternal(SingleComponentManager.java:973) [org.apache.felix.scr-2.1.30.jar:?]
POM.xml
<?xml version="1.0" encoding="UTF-8" standalone="no"?>4.0.0
org.openhab.addons.bundles org.openhab.addons.reactor.bundles 3.2.0-SNAPSHOTorg.openhab.io.mycloud
openHAB Add-ons :: Bundles :: IO :: My Cloud Connector
9.4.20.v20190813 !android.*, !com.android.*, !sun.* org.json json 20180813 compile org.apache.servicemix.bundles org.apache.servicemix.bundles.okhttp 3.8.1_1 compile org.apache.servicemix.bundles org.apache.servicemix.bundles.okio 1.13.0_1 compile<dependency> <groupId>org.openhab.osgiify</groupId> <artifactId>io.socket.socket.io-client</artifactId> <version>1.0.1</version> <scope>compile</scope> </dependency> <dependency> <groupId>org.openhab.osgiify</groupId> <artifactId>io.socket.engine.io-client</artifactId> <version>1.0.1</version> <scope>compile</scope> </dependency> <dependency> <groupId>org.eclipse.jetty.websocket</groupId> <artifactId>websocket-api</artifactId> <version>${jetty-version}</version> <scope>compile</scope> </dependency> <dependency> <groupId>org.eclipse.jetty.websocket</groupId> <artifactId>websocket-server</artifactId> <version>${jetty-version}</version> <scope>compile</scope> </dependency> <dependency> <groupId>org.eclipse.jetty.websocket</groupId> <artifactId>websocket-servlet</artifactId> <version>${jetty-version}</version> <scope>compile</scope> </dependency> <dependency> <groupId>javax.websocket</groupId> <artifactId>javax.websocket-api</artifactId> <version>1.1</version> <scope>compile</scope> </dependency>