Dependency not found when starting the bundle


I’m writing a new bundle for the Open Meteo service that you can see here:

While it compiles just fine, I get this error when openHAB tries to start it:

17:22:46.873 [WARN ] [org.apache.felix.fileinstall         ] - Error while starting bundle: file:/D:/Documents/prog/openhab-4.2.0-SNAPSHOT/addons/com.obones.binding.openmeteo-0.0.1.jar
org.osgi.framework.BundleException: Could not resolve module: com.obones.binding.openmeteo [267]
  Unresolved requirement: Import-Package:; version="[23.5.0,24.0.0)"

        at org.eclipse.osgi.container.Module.start( ~[org.eclipse.osgi-3.18.0.jar:?]
        at org.eclipse.osgi.internal.framework.EquinoxBundle.start( ~[org.eclipse.osgi-3.18.0.jar:?]
        at org.apache.felix.fileinstall.internal.DirectoryWatcher.startBundle( [bundleFile:3.7.4]
        at org.apache.felix.fileinstall.internal.DirectoryWatcher.startBundles( [bundleFile:3.7.4]
        at org.apache.felix.fileinstall.internal.DirectoryWatcher.doProcess( [bundleFile:3.7.4]
        at org.apache.felix.fileinstall.internal.DirectoryWatcher.process( [bundleFile:3.7.4]
        at [bundleFile:3.7.4]

At first, the flatbuffers package was not in the final jar file, so I added it via an explicit dependency in the pom.xml file.
But now that it is in the jar file, I still get the same error message.

Here is the content of the JAR file:

I must have done something wrong but I can’t figure out what despite reading lots of messages around here and trying quite a few things in both the pom.xmland feature.xml files

Any help would be most welcome.

PS: I know that the binding is still in its very early stages of development, but as I can’t get it to start in openHAB, there’s no point in trying to implement it further.

When embedded, you don’t need to add it to the feature.

And there it is, the combination that I did not try!
I removed it from feature.xml, cleared cache, rebuilt, and…
It works!

Thanks for pointing this out.

1 Like