|
|
Re: "NoClassDefFoundError" while running "bundleContext.registerService" [message #1752231 is a reply to message #1752228] |
Fri, 20 January 2017 07:58 |
ren Junhua Messages: 3 Registered: January 2017 |
Junior Member |
|
|
Hi,Thanks for your response.
Here is the error detail:
2017-01-20T08:40:13.944+0100 157 ERROR [symbolicName=org.eclipse.smarthome.core.thing, className=org.eclipse.smarthome.core.thing.internal.ThingManager] - Exception occured while calling thing handler factory 'com.sengled.internal.FlexHandlerFactory@10e576e': java.lang.NoClassDefFoundError: org/osgi/framework/BundleContext
java.util.concurrent.ExecutionException: java.lang.NoClassDefFoundError: org/osgi/framework/BundleContext
at java.util.concurrent.FutureTask.report(FutureTask.java:122)
at java.util.concurrent.FutureTask.get(FutureTask.java:206)
at org.eclipse.smarthome.core.common.SafeMethodCaller.callAsynchronous(SafeMethodCaller.java:186)
at org.eclipse.smarthome.core.common.SafeMethodCaller.call(SafeMethodCaller.java:79)
at org.eclipse.smarthome.core.common.SafeMethodCaller.call(SafeMethodCaller.java:63)
at org.eclipse.smarthome.core.thing.internal.ThingManager.registerHandler(ThingManager.java:633)
at org.eclipse.smarthome.core.thing.internal.ThingManager.addThingHandlerFactory(ThingManager.java:1021)
at sun.reflect.GeneratedMethodAccessor38.invoke(Unknown Source)
at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43)
at java.lang.reflect.Method.invoke(Method.java:497)
at com.prosyst.mbs.impl.services.scm.model.MethodInvoker.invoke(MethodInvoker.java:44)
at com.prosyst.mbs.impl.services.scm.model.ComponentReference.bind(ComponentReference.java:387)
at com.prosyst.mbs.impl.services.scm.model.ServiceComponentProp.bindReference(ServiceComponentProp.java:482)
at com.prosyst.mbs.impl.services.scm.InstanceProcess.dynamicBind(InstanceProcess.java:427)
at com.prosyst.mbs.impl.services.scm.Resolver.getEligible(Resolver.java:343)
at com.prosyst.mbs.impl.services.scm.SCRManager.serviceChanged(SCRManager.java:267)
at com.prosyst.mbs.impl.framework.module.security.BasicPEA.dispatch(BasicSecurityImpl.java:554)
at com.prosyst.mbs.framework.security.AbstractPEA.run(AbstractPEA.java:153)
at java.security.AccessController.doPrivileged(Native Method)
at com.prosyst.mbs.framework.security.AbstractPEA.doPrivileged(AbstractPEA.java:42)
at com.prosyst.mbs.impl.framework.module.security.BasicSecurityImpl.doPrivileged(BasicSecurityImpl.java:306)
at com.prosyst.mbs.impl.framework.EventsManager.serviceChanged(EventsManager.java:1111)
at com.prosyst.mbs.impl.framework.BundleContextImpl.registerService(BundleContextImpl.java:686)
at com.prosyst.mbs.impl.framework.BundleContextImpl.registerService(BundleContextImpl.java:645)
at com.prosyst.mbs.impl.services.scm.InstanceProcess.registerService(InstanceProcess.java:542)
at com.prosyst.mbs.impl.services.scm.InstanceProcess.buildComponents(InstanceProcess.java:204)
at com.prosyst.mbs.impl.services.scm.Resolver.buildNewlySatisfied(Resolver.java:478)
at com.prosyst.mbs.impl.services.scm.Resolver.enableComponents(Resolver.java:226)
at com.prosyst.mbs.impl.services.scm.SCRManager.performWork(SCRManager.java:876)
at com.prosyst.mbs.impl.services.scm.SCRManager$QueuedJob.dispatch(SCRManager.java:846)
at com.prosyst.mbs.impl.services.scm.WorkThread.run(WorkThread.java:82)
at com.prosyst.util.impl.tpt.threadpool.PEA.run(PEA.java:11)
at java.security.AccessController.doPrivileged(Native Method)
at com.prosyst.util.impl.tpt.threadpool.ExecutorImpl.run(ExecutorImpl.java:186)
Caused by: java.lang.NoClassDefFoundError: org/osgi/framework/BundleContext
at com.sengled.internal.FlexHandlerFactory.registerLightDiscoveryService(FlexHandlerFactory.java:130)
at com.sengled.internal.FlexHandlerFactory.createHandler(FlexHandlerFactory.java:110)
at org.eclipse.smarthome.core.thing.binding.BaseThingHandlerFactory.registerHandler(BaseThingHandlerFactory.java:133)
at org.eclipse.smarthome.core.thing.internal.ThingManager$7.call(ThingManager.java:637)
at org.eclipse.smarthome.core.thing.internal.ThingManager$7.call(ThingManager.java:1)
at org.eclipse.smarthome.core.common.SafeMethodCaller$CallableWrapper.call(SafeMethodCaller.java:177)
at java.util.concurrent.FutureTask.run(FutureTask.java:266)
at java.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1142)
at java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:617)
at java.lang.Thread.run(Thread.java:745)
Caused by: java.lang.ClassNotFoundException: org.osgi.framework.BundleContext, from bundle com.sengled
at com.prosyst.mbs.impl.framework.DefaultClassProvider.loadClass_(DefaultClassProvider.java:655)
at com.prosyst.mbs.impl.framework.DefaultClassProvider.loadClass(DefaultClassProvider.java:488)
at java.lang.ClassLoader.loadClass(ClassLoader.java:357)
... 10 more
By the way ,I usually run my code in qivicon device and see the log there .Error disappears when I comment " aa=bundleContext.registerService(DiscoveryService.class.getName(), discoveryService, null);".....
Thank you!
[Updated on: Fri, 20 January 2017 08:05] Report message to a moderator
|
|
|
|
|
|
|
Powered by
FUDForum. Page generated in 0.03271 seconds