thanks for all the hard-work towards openHAB2! openHAB is already really cool but openHAB2 seems to be (or get) even more sophisticated on many levels.
I just downloaded and installed the new openHAB distribution packages.
Before starting openHAB2, I configured some bindings in the addons.cfg. Now, when starting openHAB2, I get an exception on the weather binding (and at the beginning on the transform):
2016-01-11 21:42:45.745 [ERROR] [org.eclipse.smarthome.core.transform] - [org.eclipse.smarthome.action.transformation.action(74)] Circular reference detected, getService returning null
2016-01-11 21:42:59.763 [INFO ] [arthome.ui.paper.internal.PaperUIApp] - Started Paper UI at /ui
2016-01-11 21:42:59.965 [INFO ] [.dashboard.internal.DashboardService] - Started dashboard at /start
2016-01-11 21:43:00.561 [INFO ] [b.core.service.AbstractActiveService] - Exec Refresh Service has been started
2016-01-11 21:43:00.585 [INFO ] [b.core.service.AbstractActiveService] - Exec Refresh Service has been started
2016-01-11 21:43:00.591 [INFO ] [b.core.service.AbstractActiveService] - Exec Refresh Service has been shut down
2016-01-11 21:43:00.608 [INFO ] [b.core.service.AbstractActiveService] - Exec Refresh Service has been started
2016-01-11 21:43:00.614 [INFO ] [b.core.service.AbstractActiveService] - Exec Refresh Service has been shut down
2016-01-11 21:43:01.580 [INFO ] [b.core.service.AbstractActiveService] - Exec Refresh Service has been shut down
2016-01-11 21:43:01.830 [ERROR] [org.openhab.binding.weather ] - [org.openhab.binding.weather(158)] bind method [addBindingProvider] not found; Component will fail
2016-01-11 21:43:01.943 [ERROR] [org.openhab.binding.weather ] - [org.openhab.binding.weather(158)] bind method [addBindingProvider] not found
2016-01-11 21:43:02.290 [ERROR] [.weather.internal.bus.WeatherBinding] - Error activating WeatherBinding: unexpected element (uri:"", local:"common-id-mappings"). Expected elements are (none)
javax.xml.bind.UnmarshalException: unexpected element (uri:"", local:"common-id-mappings"). Expected elements are (none)
at com.sun.xml.internal.bind.v2.runtime.unmarshaller.UnmarshallingContext.handleEvent(UnmarshallingContext.java:726)[:1.8.0_65]
at com.sun.xml.internal.bind.v2.runtime.unmarshaller.Loader.reportError(Loader.java:247)[:1.8.0_65]
at com.sun.xml.internal.bind.v2.runtime.unmarshaller.Loader.reportError(Loader.java:242)[:1.8.0_65]
at com.sun.xml.internal.bind.v2.runtime.unmarshaller.Loader.reportUnexpectedChildElement(Loader.java:109)[:1.8.0_65]
at com.sun.xml.internal.bind.v2.runtime.unmarshaller.UnmarshallingContext$DefaultRootLoader.childElement(UnmarshallingContext.java:1131)[:1.8.0_65]
at com.sun.xml.internal.bind.v2.runtime.unmarshaller.UnmarshallingContext._startElement(UnmarshallingContext.java:556)[:1.8.0_65]
at com.sun.xml.internal.bind.v2.runtime.unmarshaller.UnmarshallingContext.startElement(UnmarshallingContext.java:538)[:1.8.0_65]
...
at com.sun.xml.internal.bind.v2.runtime.unmarshaller.UnmarshallerImpl.unmarshal(UnmarshallerImpl.java:214)[:1.8.0_65]
at javax.xml.bind.helpers.AbstractUnmarshallerImpl.unmarshal(AbstractUnmarshallerImpl.java:157)[:1.8.0_65]
at javax.xml.bind.helpers.AbstractUnmarshallerImpl.unmarshal(AbstractUnmarshallerImpl.java:204)[:1.8.0_65]
at org.openhab.binding.weather.internal.parser.CommonIdHandler.loadMapping(CommonIdHandler.java:63)
at org.openhab.binding.weather.internal.bus.WeatherBinding.activate(WeatherBinding.java:55)
at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)[:1.8.0_65]
I already had a weather.cfg from a previous openHAB2 installation:
# location configuration, you can specify multiple locations
location.myhome.latitude=1.234567
location.myhome.longitude=9.876543
location.myhome.provider=Yahoo
location.myhome.language=de
location.myhome.updateInterval=10
Yes, I am also a bit unhappy that the move to Karaf causes quite some new problems that previously didn’t exist. But still I think that its benefits weigh more than the problems, so I decided to better do the move now than later.
I made some changes how the xml file is loaded, however the exception remains the same.
So I added some debug and found out that the xml file can be read and is available for the unmarshalling.
Dominic, which JVM are you using? This error reminds of an issue I encountered before where there was a difference between the java xml jars included in different JVMs.
I will look into it. It seems somehow the schema is not recognized.
I have seen a similar thing when the annoation packages were not imported as then these informations are missing.
Just looked into the source code and Manifest. I think the Import-Package for
javax.xml.bind.annotation is missing.
The unmarshaller problem is fixed with the latest build.
Now there is another issue:
23:39:46.995 [ERROR] [.weather.internal.bus.WeatherBinding] - Error activating WeatherBinding: CommonId for provider YAHOO with id 0 already exists
java.lang.IllegalArgumentException: CommonId for provider YAHOO with id 0 already exists
at org.openhab.binding.weather.internal.parser.CommonIdHandler.addCommonId(CommonIdHandler.java:85)
at org.openhab.binding.weather.internal.parser.CommonIdHandler.loadMapping(CommonIdHandler.java:73)
at org.openhab.binding.weather.internal.bus.WeatherBinding.activate(WeatherBinding.java:55)
at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)[:1.8.0_40]
at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:62)[:1.8.0_40]
at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43)[:1.8.0_40]
at java.lang.reflect.Method.invoke(Method.java:497)[:1.8.0_40]
at org.apache.felix.scr.impl.helper.BaseMethod.invokeMethod(BaseMethod.java:222)
can you share how you got weather binding working on openhab2? Mine doesn’t work. I get this message:
016-05-26 17:59:41.089 [ERROR] [org.apache.felix.configadmin ] - [org.osgi.service.cm.ManagedService, org.osgi.service.event.EventHandler, id=273, bundle=190/mvn:org.openhab.binding/org.openhab.binding.weather/1.9.0.b3]: Updating property weather of configuration org.openhab.weather caused a problem: Empty property ‘location..name’, please check your openhab.cfg!
org.osgi.service.cm.ConfigurationException: weather : Empty property ‘location..name’, please check your openhab.cfg!
at org.openhab.binding.weather.internal.common.WeatherConfig.parseLocation(WeatherConfig.java:113)[190:org.openhab.binding.weather:1.9.0.b3]
at org.openhab.binding.weather.internal.common.WeatherConfig.parse(WeatherConfig.java:80)[190:org.openhab.binding.weather:1.9.0.b3]
at org.openhab.binding.weather.internal.bus.WeatherBinding.updated(WeatherBinding.java:77)[190:org.openhab.binding.weather:1.9.0.b3]
at org.apache.felix.cm.impl.helper.ManagedServiceTracker.updated(ManagedServiceTracker.java:189)[7:org.apache.felix.configadmin:1.8.8]
at org.apache.felix.cm.impl.helper.ManagedServiceTracker.updateService(ManagedServiceTracker.java:152)[7:org.apache.felix.configadmin:1.8.8]
at org.apache.felix.cm.impl.helper.ManagedServiceTracker.provideConfiguration(ManagedServiceTracker.java:85)[7:org.apache.felix.configadmin:1.8.8]
at org.apache.felix.cm.impl.ConfigurationManager$UpdateConfiguration.run(ConfigurationManager.java:1753)[7:org.apache.felix.configadmin:1.8.8]
at org.apache.felix.cm.impl.UpdateThread.run0(UpdateThread.java:143)[7:org.apache.felix.configadmin:1.8.8]
at org.apache.felix.cm.impl.UpdateThread.run(UpdateThread.java:110)[7:org.apache.felix.configadmin:1.8.8]
at java.lang.Thread.run(Thread.java:745)[:1.8.0_91]