Error on weather binding when starting openHAB2


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] [         ] - [] bind method [addBindingProvider] not found; Component will fail
2016-01-11 21:43:01.943 [ERROR] [         ] - [] 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([:1.8.0_65]
    at com.sun.xml.internal.bind.v2.runtime.unmarshaller.Loader.reportError([:1.8.0_65]
    at com.sun.xml.internal.bind.v2.runtime.unmarshaller.Loader.reportError([:1.8.0_65]
    at com.sun.xml.internal.bind.v2.runtime.unmarshaller.Loader.reportUnexpectedChildElement([:1.8.0_65]
    at com.sun.xml.internal.bind.v2.runtime.unmarshaller.UnmarshallingContext$DefaultRootLoader.childElement([:1.8.0_65]
    at com.sun.xml.internal.bind.v2.runtime.unmarshaller.UnmarshallingContext._startElement([:1.8.0_65]
    at com.sun.xml.internal.bind.v2.runtime.unmarshaller.UnmarshallingContext.startElement([:1.8.0_65]
    at com.sun.xml.internal.bind.v2.runtime.unmarshaller.UnmarshallerImpl.unmarshal([:1.8.0_65]
    at javax.xml.bind.helpers.AbstractUnmarshallerImpl.unmarshal([:1.8.0_65]
    at javax.xml.bind.helpers.AbstractUnmarshallerImpl.unmarshal([:1.8.0_65]
    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

Any ideas?

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.

Regarding the concrete problem in the weather binding: I have no idea what this means, this probably need some code analysis.
At a first glance, I guess this line is the problem:
Resources should be loaded through the bundle context, not via the classpath - I would assume that this fixes the issue.

Sorry, this was not at all meant to be any kind of criticism, I am totally excited about the development :smile:

Thanks for the hint what the problem could be. I’ll try it out and report back!

1 Like

Just for documentation (problem not solved yet):

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.

After googling for the issue, I came across this post: (which links to

I’ll try more debugging and reading in the next days…

I just tested the weather binding in OH2 beta 1 and I encounter the same issue.

@dominicdesu Already any ideas on how that can be solved?

I opened an ussue:

Unfortunately not. With my very limited knowledge about OSGi only more questions arise while I try to research the issue :confused:
Here is one more, possibly related, link which I came across:<9F69795E29C890408AC2DAF646C89BB3799D4454F6@MAILBOX.arc.local>

I hope somebody else can look into and solve this issue…

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.

On my side, here is my JVM version:

java version "1.8.0"
Java™ SE Runtime Environment (build 1.8.0-b132)
Java HotSpot™ Client VM (build 25.0-b70, mixed mode)

So the JVM does not seem the reason.
I think the hottest link is - as this post was from @cschneider111, maybe he can help us here?

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 sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)[:1.8.0_40]
	at sun.reflect.NativeMethodAccessorImpl.invoke([:1.8.0_40]
	at sun.reflect.DelegatingMethodAccessorImpl.invoke([:1.8.0_40]
	at java.lang.reflect.Method.invoke([:1.8.0_40]
	at org.apache.felix.scr.impl.helper.BaseMethod.invokeMethod(

Added for tracking.

I’ve opened a PR for the weather binding on OH2. Please try this test JAR to verify the fix and report back either here or on github. Thank you!

The test jar is working for me with Wunderground provider.

1 Like

Confirmed here as well with WU and the latest 2.0 snapshot. Thanks @watou

1 Like

Is this jar File integrated in b2?

Yes, the weather binding is working well in OH2 beta 2.

1 Like

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.event.EventHandler, id=273, bundle=190/mvn:org.openhab.binding/]: Updating property weather of configuration caused a problem: Empty property ‘’, please check your openhab.cfg! weather : Empty property ‘’, please check your openhab.cfg!