Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Netatmo binding 1.8 not working in openHAB2 #82

Closed
lolodomo opened this issue Jan 16, 2016 · 9 comments

Comments

Projects
None yet
4 participants
@lolodomo
Copy link
Contributor

commented Jan 16, 2016

After putting the netatmo 1.8 jar file in the addons sub-directory and starting openHAB2, here are the errors I get:

16:18:59.527 [WARN ] [org.apache.felix.fileinstall        ] - Error while starting bundle: file:/home/pi/openhab/addons/org.openhab.binding.netatmo-1.8.0.jar
org.osgi.framework.BundleException: Could not resolve module: org.openhab.binding.netatmo [173]
  Unresolved requirement: Import-Package: org.codehaus.jackson

        at org.eclipse.osgi.container.Module.start(Module.java:434)[org.eclipse.osgi-3.10.2.v20150203-1939.jar:]
        at org.eclipse.osgi.internal.framework.EquinoxBundle.start(EquinoxBundle.java:393)[org.eclipse.osgi-3.10.2.v20150203-1939.jar:]
        at org.apache.felix.fileinstall.internal.DirectoryWatcher.startBundle(DirectoryWatcher.java:1245)[8:org.apache.felix.fileinstall:3.5.0]
        at org.apache.felix.fileinstall.internal.DirectoryWatcher.startBundles(DirectoryWatcher.java:1217)[8:org.apache.felix.fileinstall:3.5.0]
        at org.apache.felix.fileinstall.internal.DirectoryWatcher.startAllBundles(DirectoryWatcher.java:1207)[8:org.apache.felix.fileinstall:3.5.0]
        at org.apache.felix.fileinstall.internal.DirectoryWatcher.doProcess(DirectoryWatcher.java:504)[8:org.apache.felix.fileinstall:3.5.0]
        at org.apache.felix.fileinstall.internal.DirectoryWatcher.process(DirectoryWatcher.java:358)[8:org.apache.felix.fileinstall:3.5.0]
        at org.apache.felix.fileinstall.internal.DirectoryWatcher.run(DirectoryWatcher.java:310)[8:org.apache.felix.fileinstall:3.5.0]
16:18:59.566 [WARN ] [org.apache.felix.fileinstall        ] - Error while starting bundle: file:/home/pi/openhab/addons/org.openhab.binding.netatmo-1.8.0.jar
org.osgi.framework.BundleException: Could not resolve module: org.openhab.binding.netatmo [173]
  Unresolved requirement: Import-Package: org.codehaus.jackson

        at org.eclipse.osgi.container.Module.start(Module.java:434)[org.eclipse.osgi-3.10.2.v20150203-1939.jar:]
        at org.eclipse.osgi.internal.framework.EquinoxBundle.start(EquinoxBundle.java:393)[org.eclipse.osgi-3.10.2.v20150203-1939.jar:]
        at org.apache.felix.fileinstall.internal.DirectoryWatcher.startBundle(DirectoryWatcher.java:1245)[8:org.apache.felix.fileinstall:3.5.0]
        at org.apache.felix.fileinstall.internal.DirectoryWatcher.startBundles(DirectoryWatcher.java:1217)[8:org.apache.felix.fileinstall:3.5.0]
        at org.apache.felix.fileinstall.internal.DirectoryWatcher.doProcess(DirectoryWatcher.java:509)[8:org.apache.felix.fileinstall:3.5.0]
        at org.apache.felix.fileinstall.internal.DirectoryWatcher.process(DirectoryWatcher.java:358)[8:org.apache.felix.fileinstall:3.5.0]
        at org.apache.felix.fileinstall.internal.DirectoryWatcher.run(DirectoryWatcher.java:310)[8:org.apache.felix.fileinstall:3.5.0]
@robnielsen

This comment has been minimized.

Copy link

commented Jan 17, 2016

It's also failing for me, but I'm getting a different error:

2016-01-17 09:18:07.156 [WARN ] [org.apache.felix.fileinstall        ] - Error while starting bundle: file:/home/rob/oh2/addons/org.openhab.binding.netatmo-1.9.0-SNAPSHOT.jar
org.osgi.framework.BundleException: Could not resolve module: org.openhab.binding.netatmo [10]
  Unresolved requirement: Import-Package: com.google.common.base

        at org.eclipse.osgi.container.Module.start(Module.java:434)[org.eclipse.osgi-3.10.2.v20150203-1939.jar:]
        at org.eclipse.osgi.internal.framework.EquinoxBundle.start(EquinoxBundle.java:393)[org.eclipse.osgi-3.10.2.v20150203-1939.jar:]
        at org.apache.felix.fileinstall.internal.DirectoryWatcher.startBundle(DirectoryWatcher.java:1245)[8:org.apache.felix.fileinstall:3.5.0]
        at org.apache.felix.fileinstall.internal.DirectoryWatcher.startBundles(DirectoryWatcher.java:1217)[8:org.apache.felix.fileinstall:3.5.0]
        at org.apache.felix.fileinstall.internal.DirectoryWatcher.doProcess(DirectoryWatcher.java:509)[8:org.apache.felix.fileinstall:3.5.0]
        at org.apache.felix.fileinstall.internal.DirectoryWatcher.process(DirectoryWatcher.java:358)[8:org.apache.felix.fileinstall:3.5.0]
        at org.apache.felix.fileinstall.internal.DirectoryWatcher.run(DirectoryWatcher.java:310)[8:org.apache.felix.fileinstall:3.5.0]
@lolodomo

This comment has been minimized.

Copy link
Contributor Author

commented Jan 17, 2016

@robnielsen : you are using a 1.8 snapshot while I am using the official 1.8 version of the binding. Maybe it can explain the difference ?

@kaikreuzer

This comment has been minimized.

@robnielsen

This comment has been minimized.

Copy link

commented Jan 17, 2016

@kaikreuzer, I just tried 88 and got the same error

@kaikreuzer

This comment has been minimized.

Copy link
Member

commented Jan 17, 2016

Are you sure?
I get

openhab> bundle:list -s |grep netatmo
167 | Active   |  80 | 1.9.0.201601170211    | org.openhab.binding.netatmo

and

23:59:31.353 [DEBUG] [org.openhab.binding.netatmo         ] - BundleEvent STARTING - org.openhab.binding.netatmo
23:59:31.354 [DEBUG] [ng.netatmo.internal.NetatmoActivator] - Netatmo binding has been started.
23:59:31.358 [DEBUG] [org.openhab.binding.netatmo         ] - ServiceEvent REGISTERED - {org.osgi.service.cm.ManagedService}={service.pid=org.openhab.netatmo, component.name=org.openhab.binding.netatmo.binding, component.id=217, service.id=343, service.bundleid=167, service.scope=bundle} - org.openhab.binding.netatmo
23:59:31.363 [DEBUG] [org.openhab.binding.netatmo         ] - ServiceEvent REGISTERED - {org.openhab.model.item.binding.BindingConfigReader, org.openhab.binding.netatmo.NetatmoBindingProvider}={component.name=org.openhab.binding.netatmo.genericbindingprovider, component.id=218, service.id=341, service.bundleid=167, service.scope=bundle} - org.openhab.binding.netatmo
23:59:31.363 [DEBUG] [org.openhab.binding.netatmo         ] - BundleEvent STARTED - org.openhab.binding.netatmo
@robnielsen

This comment has been minimized.

Copy link

commented Jan 17, 2016

I'm using the zip file: https://openhab.ci.cloudbees.com/job/openHAB-Distribution/88/artifact/distributions/openhab-offline/target/openhab-offline-2.0.0-SNAPSHOT.zip.

I'm seeing different things in the log file. The first time I see:

2016-01-17 17:26:04.185 [WARN ] [org.apache.felix.fileinstall        ] - Error while starting bundle: file:/home/rob/oh2/addons/org.openhab.binding.netatmo-1.9.0-SNAPSHOT.jar
org.osgi.framework.BundleException: Could not resolve module: org.openhab.binding.netatmo [29]
  Unresolved requirement: Import-Package: org.codehaus.jackson

        at org.eclipse.osgi.container.Module.start(Module.java:434)[org.eclipse.osgi-3.10.2.v20150203-1939.jar:]
        at org.eclipse.osgi.internal.framework.EquinoxBundle.start(EquinoxBundle.java:393)[org.eclipse.osgi-3.10.2.v20150203-1939.jar:]
        at org.apache.felix.fileinstall.internal.DirectoryWatcher.startBundle(DirectoryWatcher.java:1245)[8:org.apache.felix.fileinstall:3.5.0]
        at org.apache.felix.fileinstall.internal.DirectoryWatcher.startBundles(DirectoryWatcher.java:1217)[8:org.apache.felix.fileinstall:3.5.0]
        at org.apache.felix.fileinstall.internal.DirectoryWatcher.doProcess(DirectoryWatcher.java:509)[8:org.apache.felix.fileinstall:3.5.0]
        at org.apache.felix.fileinstall.internal.DirectoryWatcher.process(DirectoryWatcher.java:358)[8:org.apache.felix.fileinstall:3.5.0]
        at org.apache.felix.fileinstall.internal.DirectoryWatcher.run(DirectoryWatcher.java:310)[8:org.apache.felix.fileinstall:3.5.0]
2016-01-17 17:26:07.111 [INFO ] [.openhab.core.internal.CoreActivator] - openHAB runtime has been started (v2.0.0, build 201601150204).
2016-01-17 17:26:23.302 [WARN ] [org.apache.felix.fileinstall        ] - Error while starting bundle: file:/home/rob/oh2/addons/org.openhab.binding.netatmo-1.9.0-SNAPSHOT.jar
org.osgi.framework.BundleException: Could not resolve module: org.openhab.binding.netatmo [29]
  Unresolved requirement: Import-Package: org.codehaus.jackson

        at org.eclipse.osgi.container.Module.start(Module.java:434)[org.eclipse.osgi-3.10.2.v20150203-1939.jar:]
        at org.eclipse.osgi.internal.framework.EquinoxBundle.start(EquinoxBundle.java:393)[org.eclipse.osgi-3.10.2.v20150203-1939.jar:]
        at org.apache.felix.fileinstall.internal.DirectoryWatcher.startBundle(DirectoryWatcher.java:1245)[8:org.apache.felix.fileinstall:3.5.0]
        at org.apache.felix.fileinstall.internal.DirectoryWatcher.startBundles(DirectoryWatcher.java:1217)[8:org.apache.felix.fileinstall:3.5.0]
        at org.apache.felix.fileinstall.internal.DirectoryWatcher.startAllBundles(DirectoryWatcher.java:1207)[8:org.apache.felix.fileinstall:3.5.0]
        at org.apache.felix.fileinstall.internal.DirectoryWatcher.doProcess(DirectoryWatcher.java:504)[8:org.apache.felix.fileinstall:3.5.0]
        at org.apache.felix.fileinstall.internal.DirectoryWatcher.process(DirectoryWatcher.java:358)[8:org.apache.felix.fileinstall:3.5.0]
        at org.apache.felix.fileinstall.internal.DirectoryWatcher.run(DirectoryWatcher.java:310)[8:org.apache.felix.fileinstall:3.5.0]
2016-01-17 17:26:23.306 [WARN ] [org.apache.felix.fileinstall        ] - Error while starting bundle: file:/home/rob/oh2/addons/org.openhab.binding.netatmo-1.9.0-SNAPSHOT.jar
org.osgi.framework.BundleException: Could not resolve module: org.openhab.binding.netatmo [29]
  Unresolved requirement: Import-Package: org.codehaus.jackson

        at org.eclipse.osgi.container.Module.start(Module.java:434)[org.eclipse.osgi-3.10.2.v20150203-1939.jar:]
        at org.eclipse.osgi.internal.framework.EquinoxBundle.start(EquinoxBundle.java:393)[org.eclipse.osgi-3.10.2.v20150203-1939.jar:]
        at org.apache.felix.fileinstall.internal.DirectoryWatcher.startBundle(DirectoryWatcher.java:1245)[8:org.apache.felix.fileinstall:3.5.0]
        at org.apache.felix.fileinstall.internal.DirectoryWatcher.startBundles(DirectoryWatcher.java:1217)[8:org.apache.felix.fileinstall:3.5.0]
        at org.apache.felix.fileinstall.internal.DirectoryWatcher.doProcess(DirectoryWatcher.java:509)[8:org.apache.felix.fileinstall:3.5.0]
        at org.apache.felix.fileinstall.internal.DirectoryWatcher.process(DirectoryWatcher.java:358)[8:org.apache.felix.fileinstall:3.5.0]
        at org.apache.felix.fileinstall.internal.DirectoryWatcher.run(DirectoryWatcher.java:310)[8:org.apache.felix.fileinstall:3.5.0]
2016-01-17 17:26:23.591 [INFO ] [el.core.internal.ModelRepositoryImpl] - Loading model 'demo.items'

Then I'm pressing ctrl-d, deleting the log files and starting again. This time I get:

2016-01-17 17:28:56.559 [INFO ] [b.core.service.AbstractActiveService] - Netatmo Refresh Service has been started
2016-01-17 17:28:56.564 [INFO ] [b.core.service.AbstractActiveService] - Netatmo Refresh Service has been shut down

I'm not seeing any indication of why it starts and immediately is shutting down.

@maggu2810

This comment has been minimized.

Copy link
Contributor

commented Jan 18, 2016

Have you installed the bundles using by using the feature installation?

@kaikreuzer

This comment has been minimized.

Copy link
Member

commented Jan 18, 2016

@maggu2810: There is no feature defined for Netatmo yet.
I also simply put the jar in the addons folder - but maybe I have another feature already installed, which brings the jackson libs (afair, they aren't part of the runtime anymore...)

@kaikreuzer

This comment has been minimized.

Copy link
Member

commented Jan 18, 2016

Ok, the problem is that you are lacking the 1.x compatibility layer on your runtime. I have just amended the documentation with #95.
Please run feature:install openhab-runtime-compat1x and all should be fine!

@kaikreuzer kaikreuzer closed this Jan 18, 2016

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
You can’t perform that action at this time.