Out-of-the-Box OSGi problem

101 views
Skip to first unread message

Karel Goderis

unread,
Dec 5, 2014, 11:57:41 AM12/5/14
to open...@googlegroups.com
I am maybe a bit too tired to get going, but this I is what I encounter:

1. Create a new binding using the skeleton script on “binding_name"
2. Add binding_name:sample:test []   to .things
3. in Eclipse, flag bundle in the Plug-list, set auto-start to true
4. hit Run/Debug

You would expect to damn thing to get loaded and do nothing meaningful, but this is what I get:

17:54:23.581 DEBUG o.e.s.c.x.o.XmlDocumentBundleTracker[:174] - Reading the XML document '/ESH-INF/thing/thing-types.xml' in module 'org.openhab.binding.helios'...
17:54:23.586 DEBUG o.e.s.c.x.o.XmlDocumentBundleTracker[:107] - Create an empty XmlDocumentProvider for the module 'org.openhab.binding.helios'.

!ENTRY org.eclipse.equinox.ds 4 0 2014-12-05 17:54:23.840
!MESSAGE Exception occurred while creating new instance of component Component[
name = org.openhab.binding.helios.internal.HeliosHandlerFactory
activate = activate
deactivate = deactivate
modified = 
configuration-policy = optional
factory = null
autoenable = true
immediate = true
implementation = org.openhab.binding.helios.internal.HeliosHandlerFactory
state = Unsatisfied
properties = 
serviceFactory = false
serviceInterface = [org.eclipse.smarthome.core.thing.binding.ThingHandlerFactory]
references = null
located in bundle = org.openhab.binding.helios_2.0.0.qualifier [113]

and in the OSGi console I have:

113 ACTIVE      org.openhab.binding.helios_2.0.0.qualifier

osgi> b 113
org.openhab.binding.helios_2.0.0.qualifier [113]
  Id=113, Status=ACTIVE      Data Root=/Users/kgoderis/Documents/openHAB2.0/.metadata/.plugins/org.eclipse.pde.core/openHAB_Runtime/org.eclipse.osgi/113/data
  "No registered services."
  No services in use.
  Exported packages
    org.openhab.binding.helios; version="0.0.0"[exported]
    org.openhab.binding.helios.handler; version="0.0.0"[exported]
  Imported packages
    com.google.common.collect; version="10.0.1" <com.google.guava_10.0.1.v201203051515 [10]>
    org.eclipse.smarthome.config.core; version="0.0.0" <org.eclipse.smarthome.config.core_0.8.0.201411281407 [64]>
    org.eclipse.smarthome.core.library.types; version="0.0.0" <org.eclipse.smarthome.core.library_0.8.0.201411281407 [71]>
    org.eclipse.smarthome.core.thing; version="0.0.0" <org.eclipse.smarthome.core.thing_0.8.0.201411281407 [75]>
    org.eclipse.smarthome.core.thing.binding; version="0.0.0" <org.eclipse.smarthome.core.thing_0.8.0.201411281407 [75]>
    org.eclipse.smarthome.core.types; version="0.0.0" <org.eclipse.smarthome.core_0.8.0.201411281407 [68]>
    org.slf4j; version="1.7.2" <org.slf4j.api_1.7.2.v20121108-1250 [119]>
  No fragment bundles
  No required bundles

Why is it not registering the ThingHandlerFactory? I don’t get it. the Hue and Yahoo Factories get hooked….

Karel


Kai Kreuzer

unread,
Dec 5, 2014, 3:54:16 PM12/5/14
to Karel Goderis, open...@googlegroups.com
This is indeed strange.
I just tried your usecase (with the same ESH bundles) and it gets loaded and does nothing meaningful:

21:49:22.907 DEBUG o.e.s.c.t.i.ThingManager[:216] - Thing 'helios:sample:test' is tracked by ThingManager.
21:49:22.907 DEBUG o.e.s.c.i.items.ItemUpdater[:77] - Received update of a not accepted type (UnDefType) for item helios_sample_test
21:49:22.907 DEBUG o.e.s.c.t.i.ThingManager[:288] - Creating handler for thing 'helios:sample:test'.
21:49:22.907 INFO  runtime.busevents[:25] - helios_sample_test state updated to Undefined
21:49:22.908 DEBUG o.e.s.c.i.items.ItemUpdater[:77] - Received update of a not accepted type (UnDefType) for item Things
21:49:22.908 INFO  runtime.busevents[:25] - Things state updated to Undefined
21:49:22.909 DEBUG o.e.s.c.t.i.ThingManager[:62] - Thing handler for thing 'helios:sample:test' added.
21:49:22.909 DEBUG o.e.s.c.t.i.ThingManager[:133] - Assigning handler for thing 'helios:sample:test'.

Can you somehow find out what kind of exception occurs while the component is created? Probably some exception is thrown within the constructor.

Regards,
Kai

--
You received this message because you are subscribed to the Google Groups "openhab2" group.
To unsubscribe from this group and stop receiving emails from it, send an email to openhab2+u...@googlegroups.com.
To post to this group, send email to open...@googlegroups.com.
To view this discussion on the web visit https://groups.google.com/d/msgid/openhab2/78975E2E-2AE7-46F1-AF12-064A70EA5171%40me.com.
For more options, visit https://groups.google.com/d/optout.

Reply all
Reply to author
Forward
0 new messages