HABmin2 and OH2 beta (b71)

Tags: #<Tag:0x00007f3872d21638>

@chris

does not work: log:
19:15:00.404 [WARN ] [org.apache.felix.fileinstall ] - Error while starting bundle: file:/OH/addons/org.openhab.ui.habmin_2.0.0.SNAPSHOT-0.0.15.jar
org.osgi.framework.BundleException: Could not resolve module: org.openhab.ui.habmin [172]
Unresolved requirement: Require-Bundle: javax.servlet

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]

Probably best to report directly at https://github.com/cdjackson/habmin2/issues
@chris: Apache Karaf is more strict on package-imports and according to OSGi specs, all javax.* that are used have to be declared.

Ok - thanks. I’ll take a look over the next few days…

1 Like

My binding also stopped working for this reason, is the fix to add the package to the MANIFEST?

@chris I managed to fix my binding by updating the manifest as such:

 Import-Package: com.google.common.collect,
 org.apache.commons.lang;version="2.6.0",
 org.eclipse.smarthome.config.core,
 org.eclipse.smarthome.config.discovery,
 org.eclipse.smarthome.core.items,
 org.eclipse.smarthome.core.library.types,
 org.eclipse.smarthome.core.thing,
 org.eclipse.smarthome.core.thing.binding,
 org.eclipse.smarthome.core.thing.binding.builder,
 org.eclipse.smarthome.core.types,
 org.osgi.service.component;version="1.2.2",
 javax.xml.bind,
 org.slf4j

Once I rebuilt the binding and deployed it to the new OH2 it works as expected. I assume if you add javax.servlet instead of the javax.xml.bind it should work for you also.

@kai in my instance, the class/package was used in the library that was included in the binding, and not directly in the binding code and so this won’t always be easy to know what needs to be the import section.

You are right, I had this issue in many other cases as well. But it does not make a difference: Your bundle requires the package, so it has to be declared…

I’ve updated the HABmin2 JAR on Github - hopefully this is now working again…

Ya I saw was update2hrs ago

Can confirm … Works !
Good job :slight_smile:

Yeah I had a chance to test this last night as well. Can confirm zwave devices work and habmin loads.
I do not see an option to see the zwave network though in habmin. Is this function not working yet in habmin2 on OH2? If not, that’s understandable, just want to be sure.

Dear @chris

I actually face that issue in current latest version HABmin2 and OH2 latest snapshot…

I would like to test if HABmin2 matches my needs, especially I would like to test other templates.

Kind regards
Stefan

Can you please describe your problem so we can be sure it is “the same”.

Hi Chris

Please find the diag output below:

168 | Installed |  80 | 2.0.0.201506192315    | HABmin User Interface
openhab> bundle:diag 168
HABmin User Interface (168)
Status: Installed
Unsatisfied Requirements:
osgi.wiring.bundle; filter:="(osgi.wiring.bundle=javax.servlet)"

So the HABmin2 is listed as installed but is not accessable in the browser
If you need log excerpts let me know.

Regards,
Stefan

Hmmm - you are using a really old version of HABmin - about 9 months old. This version isn’t compatible (as you have found :sunglasses:) with latest versions of OH2. Once Karaf was introduced, dependancies changed…

I’d suggest updating to a new version - hopefully you’ll have better luck.

That’s strange because I took it from your description on github https://github.com/cdjackson/HABmin2

actually not the latest snapshot. because I was not able to see it on oh2 bundle:list at all

If you’re taking a file and putting it in the addons folder, this CAN work, but it’s not uncommon for Karaf to keep old versions so you need to be careful and check in Karaf. From the Karaf list you showed above, the version is from June last year (201506192315).

yes but that’s the version you’re pointing to as the last stable release …

What do you mean? The OH2 ZWave binding is included in the highly build and is therefore installed by PaperUI. This is the recommended way.

Dear Chris

I was able to get it working!! As written in post 41 by @laohixdxm2016 the regular download (snapshot in the working folder) from github is incomplete and therefore one fails to get it running. Only clicking the raw download works…

Thanks
Stefan

Ok, that’s good. But you should really use PaperUI as it has the most up to date version. The one on Github not up to date and will be deleted soon.