[Qbus] - Initial contribution - Unable to resolve root: missing requirement [root]

Dear openHAB developpers,

I’m running in some problems wit the freshly released binding for Qbus.
@fwolter released the binding yesterday.
I’m not sure, but i suppose that the Milestone M3 relaese has something to do with it.

When I’ve updated to this release (when i was still runing the testing JAR file - wich worked fine on M2) the following error was shown on my testing device:

[ERROR] [core.karaf.internal.FeatureInstaller] - Failed installing 'openhab-persistence-rrd4j, openhab-ui-basic, openhab-ui-habpanel': Unable to resolve root: missing requirement [root] osgi.identity; osgi.identity=openhab-ui-basic; type=karaf.feature; version="[3.1.0.SNAPSHOT,3.1.0.SNAPSHOT]"; filter:="(&(osgi.identity=openhab-ui-basic)(type=karaf.feature)(version>=3.1.0.SNAPSHOT)(version<=3.1.0.SNAPSHOT))" [caused by: Unable to resolve openhab-ui-basic/3.1.0.SNAPSHOT: missing requirement [openhab-ui-basic/3.1.0.SNAPSHOT] osgi.identity; osgi.identity=org.openhab.ui.basic; type=osgi.bundle; version="[3.1.0.202104021356,3.1.0.202104021356]"; resolution:=mandatory [caused by: Unable to resolve org.openhab.ui.basic/3.1.0.202104021356: missing requirement [org.openhab.ui.basic/3.1.0.202104021356] osgi.wiring.package; filter:="(&(osgi.wiring.package=org.osgi.framework)(version>=1.9.0)(!(version>=2.0.0)))"]]

I’ve searched this forum, but could not find a answer for my problem. I did a purge of openHAB and a fresh install - then everything worked as usual.

Now that the binding is released, i wanted to fix some small issues. The binding was made with Eclipse. When I test the binding, everything is fine. The binding works. And to be sure, without making any changes, I tried to build it again.

When I execute ‘mvn clean install -pl :org.openhab.binding.qbus’ as i did before, I get these errors:

[ERROR] Failed to execute goal org.apache.karaf.tooling:karaf-maven-plugin:4.2.7:verify (karaf-feature-verification) on project org.openhab.binding.qbus: Feature resolution failed for [openhab-binding-qbus/3.1.0.SNAPSHOT]
[ERROR] Message: Unable to resolve root: missing requirement [root] osgi.identity; osgi.identity=openhab-binding-qbus; type=karaf.feature; version=3.1.0.SNAPSHOT; filter:="(&(osgi.identity=openhab-binding-qbus)(type=karaf.feature)(version>=3.1.0.SNAPSHOT))" [caused by: Unable to resolve openhab-binding-qbus/3.1.0.SNAPSHOT: missing requirement [openhab-binding-qbus/3.1.0.SNAPSHOT] osgi.identity; osgi.identity=openhab-runtime-base; type=karaf.feature [caused by: Unable to resolve openhab-runtime-base/3.1.0.SNAPSHOT: missing requirement [openhab-runtime-base/3.1.0.SNAPSHOT] osgi.identity; osgi.identity=openhab-core-model-thing; type=karaf.feature [caused by: Unable to resolve openhab-core-model-thing/3.1.0.SNAPSHOT: missing requirement [openhab-core-model-thing/3.1.0.SNAPSHOT] osgi.identity; osgi.identity=org.openhab.core.model.thing; type=osgi.bundle; version="[3.1.0.202104110758,3.1.0.202104110758]"; resolution:=mandatory [caused by: Unable to resolve org.openhab.core.model.thing/3.1.0.202104110758: missing requirement [org.openhab.core.model.thing/3.1.0.202104110758] osgi.wiring.package; filter:="(&(osgi.wiring.package=org.openhab.core.config.core)(version>=3.1.0)(!(version>=4.0.0)))" [caused by: Unable to resolve org.openhab.core.config.core/3.1.0.202104110753: missing requirement [org.openhab.core.config.core/3.1.0.202104110753] osgi.wiring.package; filter:="(&(osgi.wiring.package=org.openhab.core.common)(version>=3.1.0)(!(version>=4.0.0)))" [caused by: Unable to resolve org.openhab.core/3.1.0.202104110749: missing requirement [org.openhab.core/3.1.0.202104110749] osgi.wiring.package; filter:="(&(osgi.wiring.package=org.osgi.framework)(version>=1.9.0)(!(version>=2.0.0)))"]]]]]]

I notice the same message: Unable to resolve root: missing requirement [root]

Then, to find out what’s wrong, I open Eclipse again and there I find this error:

Description	Resource	Path	Location	Type
Failed to execute goal on project e[36morg.openhab.binding.qbuse[m: e[1;31mCould not resolve dependencies for project org.openhab.addons.bundles:org.openhab.binding.qbus:jar:3.1.0-SNAPSHOT: The following artifacts could not be resolved: org.eclipse.emf:org.eclipse.emf.mwe.core:jar:1.6.1, org.eclipse.emf:org.eclipse.emf.mwe2.runtime:jar:2.12.1, org.eclipse.emf:org.eclipse.emf.mwe2.language:jar:2.12.1: Could not find artifact org.eclipse.emf:org.eclipse.emf.mwe.core:jar:1.6.1e[m (biz.aQute.bnd:bnd-maven-plugin:5.1.2:bnd-process:default:process-classes)

org.apache.maven.lifecycle.LifecycleExecutionException: Failed to execute goal on project e[36morg.openhab.binding.qbuse[m: e[1;31mCould not resolve dependencies for project org.openhab.addons.bundles:org.openhab.binding.qbus:jar:3.1.0-SNAPSHOT: The following artifacts could not be resolved: org.eclipse.emf:org.eclipse.emf.mwe.core:jar:1.6.1, org.eclipse.emf:org.eclipse.emf.mwe2.runtime:jar:2.12.1, org.eclipse.emf:org.eclipse.emf.mwe2.language:jar:2.12.1: Could not find artifact org.eclipse.emf:org.eclipse.emf.mwe.core:jar:1.6.1e[m
	at org.apache.maven.lifecycle.internal.LifecycleDependencyResolver.getDependencies(LifecycleDependencyResolver.java:269)
	at org.apache.maven.lifecycle.internal.LifecycleDependencyResolver.resolveProjectDependencies(LifecycleDependencyResolver.java:147)
	at org.apache.maven.lifecycle.internal.MojoExecutor.ensureDependenciesAreResolved(MojoExecutor.java:248)
	at org.eclipse.m2e.core.internal.embedder.MavenImpl.execute(MavenImpl.java:331)
	at org.eclipse.m2e.core.internal.embedder.MavenImpl.lambda$8(MavenImpl.java:1380)
	at org.eclipse.m2e.core.internal.embedder.MavenExecutionContext.executeBare(MavenExecutionContext.java:179)
	at org.eclipse.m2e.core.internal.embedder.MavenExecutionContext.execute(MavenExecutionContext.java:114)
	at org.eclipse.m2e.core.internal.embedder.MavenImpl.execute(MavenImpl.java:1379)
	at org.eclipse.m2e.core.project.configurator.MojoExecutionBuildParticipant.build(MojoExecutionBuildParticipant.java:54)
	at bndtools.m2e.BndConfigurator$1.build(BndConfigurator.java:135)
	at org.eclipse.m2e.core.internal.builder.MavenBuilderImpl.build(MavenBuilderImpl.java:135)
	at org.eclipse.m2e.core.internal.builder.MavenBuilder$1.method(MavenBuilder.java:169)
	at org.eclipse.m2e.core.internal.builder.MavenBuilder$1.method(MavenBuilder.java:1)
	at org.eclipse.m2e.core.internal.builder.MavenBuilder$BuildMethod.lambda$1(MavenBuilder.java:114)
	at org.eclipse.m2e.core.internal.embedder.MavenExecutionContext.executeBare(MavenExecutionContext.java:179)
	at org.eclipse.m2e.core.internal.embedder.MavenExecutionContext.execute(MavenExecutionContext.java:114)
	at org.eclipse.m2e.core.internal.builder.MavenBuilder$BuildMethod.lambda$0(MavenBuilder.java:105)
	at org.eclipse.m2e.core.internal.embedder.MavenExecutionContext.executeBare(MavenExecutionContext.java:179)
	at org.eclipse.m2e.core.internal.embedder.MavenExecutionContext.execute(MavenExecutionContext.java:153)
	at org.eclipse.m2e.core.internal.embedder.MavenExecutionContext.execute(MavenExecutionContext.java:101)
	at org.eclipse.m2e.core.internal.builder.MavenBuilder$BuildMethod.execute(MavenBuilder.java:88)
	at org.eclipse.m2e.core.internal.builder.MavenBuilder.build(MavenBuilder.java:197)
	at org.eclipse.core.internal.events.BuildManager$2.run(BuildManager.java:846)
	at org.eclipse.core.runtime.SafeRunner.run(SafeRunner.java:45)
	at org.eclipse.core.internal.events.BuildManager.basicBuild(BuildManager.java:229)
	at org.eclipse.core.internal.events.BuildManager.basicBuild(BuildManager.java:277)
	at org.eclipse.core.internal.events.BuildManager$1.run(BuildManager.java:330)
	at org.eclipse.core.runtime.SafeRunner.run(SafeRunner.java:45)
	at org.eclipse.core.internal.events.BuildManager.basicBuild(BuildManager.java:333)
	at org.eclipse.core.internal.events.BuildManager.basicBuildLoop(BuildManager.java:385)
	at org.eclipse.core.internal.events.BuildManager.build(BuildManager.java:406)
	at org.eclipse.core.internal.events.AutoBuildJob.doBuild(AutoBuildJob.java:154)
	at org.eclipse.core.internal.events.AutoBuildJob.run(AutoBuildJob.java:244)
	at org.eclipse.core.internal.jobs.Worker.run(Worker.java:63)
Caused by: org.apache.maven.project.DependencyResolutionException: Could not resolve dependencies for project org.openhab.addons.bundles:org.openhab.binding.qbus:jar:3.1.0-SNAPSHOT: The following artifacts could not be resolved: org.eclipse.emf:org.eclipse.emf.mwe.core:jar:1.6.1, org.eclipse.emf:org.eclipse.emf.mwe2.runtime:jar:2.12.1, org.eclipse.emf:org.eclipse.emf.mwe2.language:jar:2.12.1: Could not find artifact org.eclipse.emf:org.eclipse.emf.mwe.core:jar:1.6.1
	at org.apache.maven.project.DefaultProjectDependenciesResolver.resolve(DefaultProjectDependenciesResolver.java:209)
	at org.apache.maven.lifecycle.internal.LifecycleDependencyResolver.getDependencies(LifecycleDependencyResolver.java:243)
	... 33 more
Caused by: org.eclipse.aether.resolution.DependencyResolutionException: The following artifacts could not be resolved: org.eclipse.emf:org.eclipse.emf.mwe.core:jar:1.6.1, org.eclipse.emf:org.eclipse.emf.mwe2.runtime:jar:2.12.1, org.eclipse.emf:org.eclipse.emf.mwe2.language:jar:2.12.1: Could not find artifact org.eclipse.emf:org.eclipse.emf.mwe.core:jar:1.6.1
	at org.eclipse.aether.internal.impl.DefaultRepositorySystem.resolveDependencies(DefaultRepositorySystem.java:357)
	at org.apache.maven.project.DefaultProjectDependenciesResolver.resolve(DefaultProjectDependenciesResolver.java:202)
	... 34 more
Caused by: org.eclipse.aether.resolution.ArtifactResolutionException: The following artifacts could not be resolved: org.eclipse.emf:org.eclipse.emf.mwe.core:jar:1.6.1, org.eclipse.emf:org.eclipse.emf.mwe2.runtime:jar:2.12.1, org.eclipse.emf:org.eclipse.emf.mwe2.language:jar:2.12.1: Could not find artifact org.eclipse.emf:org.eclipse.emf.mwe.core:jar:1.6.1
	at org.eclipse.aether.internal.impl.DefaultArtifactResolver.resolve(DefaultArtifactResolver.java:424)
	at org.eclipse.aether.internal.impl.DefaultArtifactResolver.resolveArtifacts(DefaultArtifactResolver.java:229)
	at org.eclipse.aether.internal.impl.DefaultRepositorySystem.resolveDependencies(DefaultRepositorySystem.java:340)
	... 35 more
Caused by: org.eclipse.aether.transfer.ArtifactNotFoundException: Could not find artifact org.eclipse.emf:org.eclipse.emf.mwe.core:jar:1.6.1
	at org.eclipse.aether.internal.impl.DefaultArtifactResolver.resolve(DefaultArtifactResolver.java:414)
	... 37 more
	pom.xml	/org.openhab.binding.qbus	line 7	Maven Build Problem

Then I execute Maven - Update project. And everything is fine again for Eclipse.

What could cause this problem, and how can I avoid it in the future?

Kind regards,
Koen Schockaert

It’s related to the karaf update. A rebase should solve the problem: git rebase upstream/main

Thank for your answer, @fwolter
Unfortunately the rebase produces a lot of errors, looks like the rebase takes the binding back from 3.1.0 snapshot to 3.0.0 snapshot.

For example in pom.xml:

<<<<<<< HEAD

    <version>3.1.0-SNAPSHOT</version>

=======

    <version>3.0.0-SNAPSHOT</version>

>>>>>>> 3970141614 (First commit)

I’m having some issues here with github. I’ve noticed that my binding is in de docs, witch is good :slight_smile: But when i install openhab (i’ve got the 3 versions installed on windows for testing) i don’t find my binding.

I guess I’v got to to a rebase upstream/main.

I’ve searched the forum and found this topic:

So, i followed the steps as described in the last post.
This is what i get:

git remote -v
origin  https://github.com/QbusKoen/openhab-addons.git (fetch)
origin  https://github.com/QbusKoen/openhab-addons.git (push)
upstream        https://github.com/openhab/openhab-addons.git (fetch)
upstream        https://github.com/openhab/openhab-addons.git (push)

git fetch upstream

git checkout main
Already on 'main'
Your branch is up to date with 'origin/main'.

So far so good. But when i enter

git rebase -i upstream/main

The output troubles me:

pick 66b69a30d5 First commit
pick 01a083b0e0 Revert "First commit"
pick b39bfcc9dd First Commit
pick 1726331524 Second commit
pick c09fc81bcf Solved issues
pick 2d2bba81f1 Code fixing
pick 374d9605f5 Updated requested changes
pick bc309ed6b9 Updated code
pick 6064470bce Updated requested changes
pick fbe619cbb1 Updated requested changes
pick 9fbd182d84 Updated requested changes
pick 5a2ad915fc Update requested changes
pick a66cd0a424 Updated logo
pick 149fde2b8a [homematic] Additional check for convert to double (#10207) # empty
pick 058139d505 [Qbus] Initial contribution (#9191)
pick 84b24d0057 Fixed communication
pick 84b3bf0940 Fixed issueus
pick c5605f407f Update QbusCommunication.java
pick c4a5e2a672 [epsonprojector] Fix keycode channel to allow non-numeric characters (#9698)
pick 084f699971 [tr064] Fixed parameter patterns (#9749)
pick 8f7dd8766a [tr064] Merge duplicate phone book entries (#9739)
pick 4da4c4c837 [tr064] reduce network load and improve XML handling (#9693)
pick d4fc771fc7 First commit
pick e518f0e175 Revert "First commit"
pick e86f6a866b First Commit
pick 324fc7daa8 Second commit
pick dd75ad155d Solved issues
pick f1d5c3305e Update README.md
pick 9b386d6581 Updated requested changes
pick 279a469a15 Updated headers
pick fe7b54777b Code fixing
pick de928291b4 Updated requested changes
pick 0c80cb55fd Updated code
pick 6b2bf56220 Updated requested changes
pick f227029eba Updated requested changes
pick 34b2f3ee8d Updated requested changes
pick c638e175d7 Updated requested changes
pick 5dacb6d57c Update requested changes
pick 73f11a1786 Update thing-types.xml
pick 9e8de0ef69 Updated logo
pick 2c79e31fc5 [deconz] Added channel to enable / disable motion sensor (#9686)
pick f2b825dbf0 Fixes #9673 (#9762)
pick 34e1cae0f6 [homekit] fix pairing after update (#9769)
pick f8848f0443 [mqtt] Only unsubscribe if we subscribed before (#9758)
pick 0997c62b63 [smartmeter] Fix flooding logs with warnings if serial port is not accesible (#9781)
pick ad6e94f3d9 [pidcontroller] Remove limits, make Ki dependent from the loop time, add reset command (#9759)
pick 9906aad18d Update bnd to 5.2.0 (#9785)
pick cc0bc65bb0 [lcn] Fix displaying of "not enough licenses" message (#9761)
.....

The list contiues with allmost every binding available.
Then I close this file without saving. And i get:

error: could not apply a66cd0a424... Updated logo
Resolve all conflicts manually, mark them as resolved with
"git add/rm <conflicted_files>", then run "git rebase --continue".
You can instead skip this commit: run "git rebase --skip".
To abort and get back to the state before "git rebase", run "git rebase --abort".
Could not apply a66cd0a424... Updated logo
CONFLICT (rename/delete): bundles/org.openhab.binding.qbus/doc/Logo.JPG deleted in HEAD and renamed to bundles/org.openhab.binding.qbus/doc/qbus.JPG in a66cd0a424 (Updated logo). Version a66cd0a424 (Updated logo) of bundles/org.openhab.binding.qbus/doc/qbus.JPG left in tree.hanges
Auto-merging bundles/org.openhab.binding.qbus/README.md
CONFLICT (content): Merge conflict in bundles/org.openhab.binding.qbus/README.md

The erros here where fixed in the last commit. If i continue, i can easely acceptc the changes for my binding. But as the rebase continues, I get a lot of errors about the other mentioned bindings.

So i abort the rebase: git rebase --abort

It would be nice to have my binding in the latest release of openhab, since it is mentioned in the docs.

Can anybody advice me on how to continue and correcly rebase to the upstream (because i guess tha’s what i’ve got to do to get my binding in the list) , without causing problems for the other bindings?

Many thanks,
Koen Schockaert

You don’t need to rebase your local Git repo to make your new binding available in the openHAB release. It will be released with the next milestone release of OH.

As you finished your development on the new binding and don’t have any intended local changes, you can clone a fresh addons repo to easily fix your local merge conflicts.