Problem when I build the openhab-distro project and when I run OpenHAB to test it

Hi everyone,

I am currently developing the role based access control model for openhab users. I managed to test my project several times with intelliJ following the explanations in this post and using the openhab-distro project.

I don’t know why for some time the openHAB Core :: Bundles :: Core bundle remains in the Waiting state as shown in the image below:

And because many other bundles depend on this core bundle, many other bundles are in the Waiting state too.

I have this problem since I updated the openhab-distro project (I think) because when I try to build the openhab-distro project I get the following error (that I didn’t have before):

 Feature resolution failed for [openhab-core-base/3.3.0.SNAPSHOT]
[ERROR] Message: Unable to resolve root: missing requirement [root] osgi.identity; osgi.identity=openhab-core-base; type=karaf.feature; version=3.3.0.SNAPSHOT; filter:="(&(osgi.identity=openhab-core-base)(type=karaf.feature)(version>=3.3.0.SNAPSHOT))" [caused by: Unable to resolve openhab-core-base/3.3.0.SNAPSHOT: missing requirement [openhab-core-base/3.3.0.SNAPSHOT] osgi.identity; osgi.identity=org.openhab.core.io.rest.core; type=osgi.bundle; version="[3.3.0.202203281041,3.3.0.202203281041]"; resolution:=mandatory [caused by: Unable to resolve org.openhab.core.io.rest.core/3.3.0.202203281041: missing requirement [org.openhab.core.io.rest.core/3.3.0.202203281041] osgi.wiring.package; filter:="(&(osgi.wiring.package=org.openhab.core.io.rest.auth)(version>=3.3.0)(!(version>=4.0.0)))"]]
[ERROR] Repositories: {
[ERROR]         mvn:org.apache.karaf.features/framework/4.3.6/xml/features
[ERROR]         mvn:org.apache.karaf.features/standard/4.3.6/xml/features
[ERROR]         mvn:org.openhab.distro/addons/3.3.0-SNAPSHOT/xml/features
[ERROR]         mvn:org.openhab.distro/distro/3.3.0-SNAPSHOT/xml/features
[ERROR]         mvn:org.ops4j.pax.web/pax-web-features/7.3.23/xml/features
[ERROR] }
[ERROR] Resources: {
[ERROR]         mvn:com.fasterxml.woodstox/woodstox-core/6.2.6
[ERROR]         mvn:com.google.code.gson/gson/2.8.9
[ERROR]         mvn:com.google.guava/failureaccess/1.0.1
[ERROR]         mvn:com.google.guava/guava/30.1-jre
[ERROR]         mvn:com.sun.xml.bind/jaxb-osgi/2.3.3
[ERROR]         mvn:com.thoughtworks.xstream/xstream/1.4.19
[ERROR]         mvn:de.jollyday/jollyday/0.5.10
[ERROR]         mvn:jakarta.annotation/jakarta.annotation-api/2.0.0
[ERROR]         mvn:jakarta.inject/jakarta.inject-api/2.0.0
[ERROR]         mvn:jakarta.jws/jakarta.jws-api/2.1.0
[ERROR]         mvn:jakarta.xml.bind/jakarta.xml.bind-api/2.3.3
[ERROR]         mvn:jakarta.xml.ws/jakarta.xml.ws-api/2.3.3
[ERROR]         mvn:javax.annotation/javax.annotation-api/1.2
[ERROR]         mvn:javax.annotation/javax.annotation-api/1.3.2
[ERROR]         mvn:javax.el/javax.el-api/3.0.0
[ERROR]         mvn:javax.mail/mail/1.4.7
[ERROR]         mvn:javax.measure/unit-api/2.1.3
[ERROR]         mvn:javax.servlet/javax.servlet-api/3.1.0
[ERROR]         mvn:org.apache.aries.component-dsl/org.apache.aries.component-dsl.component-dsl/1.2.2
[ERROR]         mvn:org.apache.aries.jax.rs/org.apache.aries.jax.rs.whiteboard/2.0.0
[ERROR]         mvn:org.apache.aries.spec/org.apache.aries.javax.jax.rs-api/1.0.1
[ERROR]         mvn:org.apache.aries.spifly/org.apache.aries.spifly.dynamic.bundle/1.3.2
[ERROR]         mvn:org.apache.aries/org.apache.aries.util/1.1.3
[ERROR]         mvn:org.apache.commons/commons-lang3/3.12.0
[ERROR]         mvn:org.apache.cxf/cxf-core/3.4.5
[ERROR]         mvn:org.apache.cxf/cxf-rt-frontend-jaxrs/3.4.5
[ERROR]         mvn:org.apache.cxf/cxf-rt-rs-client/3.4.5
[ERROR]         mvn:org.apache.cxf/cxf-rt-rs-sse/3.4.5
[ERROR]         mvn:org.apache.cxf/cxf-rt-security/3.4.5
[ERROR]         mvn:org.apache.cxf/cxf-rt-transports-http/3.4.5
[ERROR]         mvn:org.apache.felix/org.apache.felix.cm.json/1.0.6
[ERROR]         mvn:org.apache.felix/org.apache.felix.configadmin.plugin.interpolation/1.1.4
[ERROR]         mvn:org.apache.felix/org.apache.felix.configadmin/1.9.22
[ERROR]         mvn:org.apache.felix/org.apache.felix.configurator/1.0.14
[ERROR]         mvn:org.apache.felix/org.apache.felix.converter/1.0.14
[ERROR]         mvn:org.apache.felix/org.apache.felix.coordinator/1.0.2
[ERROR]         mvn:org.apache.felix/org.apache.felix.fileinstall/3.7.4
[ERROR]         mvn:org.apache.felix/org.apache.felix.inventory/1.0.6
[ERROR]         mvn:org.apache.felix/org.apache.felix.metatype/1.2.4
[ERROR]         mvn:org.apache.felix/org.apache.felix.scr/2.1.30
[ERROR]         mvn:org.apache.felix/org.apache.felix.webconsole.plugins.ds/2.1.0
[ERROR]         mvn:org.apache.felix/org.apache.felix.webconsole.plugins.event/1.1.8
[ERROR]         mvn:org.apache.geronimo.specs/geronimo-jaspic_1.0_spec/1.1
[ERROR]         mvn:org.apache.geronimo.specs/geronimo-jta_1.1_spec/1.1.1
[ERROR]         mvn:org.apache.karaf.features/org.apache.karaf.features.core/4.3.6
[ERROR]         mvn:org.apache.karaf.features/org.apache.karaf.features.extension/4.3.6
[ERROR]         mvn:org.apache.karaf.http/org.apache.karaf.http.core/4.3.6
[ERROR]         mvn:org.apache.karaf.log/org.apache.karaf.log.core/4.3.6
[ERROR]         mvn:org.apache.karaf.scr/org.apache.karaf.scr.management/4.3.6
[ERROR]         mvn:org.apache.karaf.scr/org.apache.karaf.scr.state/4.3.6
[ERROR]         mvn:org.apache.karaf.services/org.apache.karaf.services.eventadmin/4.3.6
[ERROR]         mvn:org.apache.karaf.webconsole/org.apache.karaf.webconsole.http/4.3.6
[ERROR]         mvn:org.apache.karaf/org.apache.karaf.event/4.3.6
[ERROR]         mvn:org.apache.servicemix.bundles/org.apache.servicemix.bundles.javax-inject/1_2
[ERROR]         mvn:org.apache.servicemix.bundles/org.apache.servicemix.bundles.javax-websocket-api/1.1_1
[ERROR]         mvn:org.apache.servicemix.bundles/org.apache.servicemix.bundles.saaj-impl/1.4.0_2
[ERROR]         mvn:org.apache.servicemix.specs/org.apache.servicemix.specs.activation-api-1.1/2.9.0
[ERROR]         mvn:org.apache.servicemix.specs/org.apache.servicemix.specs.activation-api-1.2.1/1.2.1_3
[ERROR]         mvn:org.apache.servicemix.specs/org.apache.servicemix.specs.jaxb-api-2.2/2.9.0
[ERROR]         mvn:org.apache.servicemix.specs/org.apache.servicemix.specs.saaj-api-1.4/1.4_2
[ERROR]         mvn:org.apache.sling/org.apache.sling.commons.johnzon/1.2.6
[ERROR]         mvn:org.apache.ws.xmlschema/xmlschema-core/2.2.5
[ERROR]         mvn:org.apache.xbean/xbean-bundleutils/4.20
[ERROR]         mvn:org.apache.xbean/xbean-finder/4.20
[ERROR]         mvn:org.apache.xbean/xbean-reflect/4.20
[ERROR]         mvn:org.codehaus.woodstox/stax2-api/4.2.1
[ERROR]         mvn:org.eclipse.emf/org.eclipse.emf.common/2.17.0
[ERROR]         mvn:org.eclipse.emf/org.eclipse.emf.ecore.change/2.14.0
[ERROR]         mvn:org.eclipse.emf/org.eclipse.emf.ecore.xmi/2.16.0
[ERROR]         mvn:org.eclipse.emf/org.eclipse.emf.ecore/2.20.0
[ERROR]         mvn:org.eclipse.jdt.core.compiler/ecj/4.6.1
[ERROR]         mvn:org.eclipse.jetty.websocket/javax-websocket-client-impl/9.4.43.v20210629
[ERROR]         mvn:org.eclipse.jetty.websocket/javax-websocket-server-impl/9.4.43.v20210629
[ERROR]         mvn:org.eclipse.jetty.websocket/websocket-api/9.4.43.v20210629
[ERROR]         mvn:org.eclipse.jetty.websocket/websocket-client/9.4.43.v20210629
[ERROR]         mvn:org.eclipse.jetty.websocket/websocket-common/9.4.43.v20210629
[ERROR]         mvn:org.eclipse.jetty.websocket/websocket-server/9.4.43.v20210629
[ERROR]         mvn:org.eclipse.jetty.websocket/websocket-servlet/9.4.43.v20210629
[ERROR]         mvn:org.eclipse.jetty/jetty-client/9.4.43.v20210629
[ERROR]         mvn:org.eclipse.jetty/jetty-continuation/9.4.43.v20210629
[ERROR]         mvn:org.eclipse.jetty/jetty-deploy/9.4.43.v20210629
[ERROR]         mvn:org.eclipse.jetty/jetty-http/9.4.43.v20210629
[ERROR]         mvn:org.eclipse.jetty/jetty-io/9.4.43.v20210629
[ERROR]         mvn:org.eclipse.jetty/jetty-jaas/9.4.43.v20210629
[ERROR]         mvn:org.eclipse.jetty/jetty-jaspi/9.4.43.v20210629
[ERROR]         mvn:org.eclipse.jetty/jetty-jmx/9.4.43.v20210629
[ERROR]         mvn:org.eclipse.jetty/jetty-jndi/9.4.43.v20210629
[ERROR]         mvn:org.eclipse.jetty/jetty-plus/9.4.43.v20210629
[ERROR]         mvn:org.eclipse.jetty/jetty-proxy/9.4.43.v20210629
[ERROR]         mvn:org.eclipse.jetty/jetty-rewrite/9.4.43.v20210629
[ERROR]         mvn:org.eclipse.jetty/jetty-security/9.4.43.v20210629
[ERROR]         mvn:org.eclipse.jetty/jetty-server/9.4.43.v20210629
[ERROR]         mvn:org.eclipse.jetty/jetty-servlet/9.4.43.v20210629
[ERROR]         mvn:org.eclipse.jetty/jetty-servlets/9.4.43.v20210629
[ERROR]         mvn:org.eclipse.jetty/jetty-util-ajax/9.4.43.v20210629
[ERROR]         mvn:org.eclipse.jetty/jetty-util/9.4.43.v20210629
[ERROR]         mvn:org.eclipse.jetty/jetty-webapp/9.4.43.v20210629
[ERROR]         mvn:org.eclipse.jetty/jetty-xml/9.4.43.v20210629
[ERROR]         mvn:org.eclipse.orbit.bundles/com.google.inject/5.0.1.v20210324-2015
[ERROR]         mvn:org.eclipse.orbit.bundles/io.github.classgraph/4.8.138.v20211212-1642
[ERROR]         mvn:org.eclipse.orbit.bundles/org.antlr.runtime/3.2.0.v201101311130
[ERROR]         mvn:org.eclipse.orbit.bundles/org.aopalliance/1.0.0.v201105210816
[ERROR]         mvn:org.eclipse.platform/org.eclipse.equinox.common/3.13.0
[ERROR]         mvn:org.eclipse.platform/org.eclipse.equinox.registry/3.9.0
[ERROR]         mvn:org.eclipse.platform/org.eclipse.equinox.supplement/1.9.0
[ERROR]         mvn:org.eclipse.xtend/org.eclipse.xtend.lib.macro/2.26.0
[ERROR]         mvn:org.eclipse.xtend/org.eclipse.xtend.lib/2.26.0
[ERROR]         mvn:org.eclipse.xtext/org.eclipse.xtext.common.types/2.26.0
[ERROR]         mvn:org.eclipse.xtext/org.eclipse.xtext.smap/2.26.0
[ERROR]         mvn:org.eclipse.xtext/org.eclipse.xtext.util/2.26.0
[ERROR]         mvn:org.eclipse.xtext/org.eclipse.xtext.xbase.lib/2.26.0
[ERROR]         mvn:org.eclipse.xtext/org.eclipse.xtext.xbase/2.26.0
[ERROR]         mvn:org.eclipse.xtext/org.eclipse.xtext/2.26.0
[ERROR]         mvn:org.fusesource.jansi/jansi/2.4.0
[ERROR]         mvn:org.glassfish.hk2/osgi-resource-locator/1.0.3
[ERROR]         mvn:org.jvnet.staxex/stax-ex/1.7.4
[ERROR]         mvn:org.openhab.core.bundles/org.openhab.core.audio/3.3.0-SNAPSHOT
[ERROR]         mvn:org.openhab.core.bundles/org.openhab.core.automation/3.3.0-SNAPSHOT
[ERROR]         mvn:org.openhab.core.bundles/org.openhab.core.binding.xml/3.3.0-SNAPSHOT
[ERROR]         mvn:org.openhab.core.bundles/org.openhab.core.config.core/3.3.0-SNAPSHOT
[ERROR]         mvn:org.openhab.core.bundles/org.openhab.core.config.discovery/3.3.0-SNAPSHOT
[ERROR]         mvn:org.openhab.core.bundles/org.openhab.core.config.dispatch/3.3.0-SNAPSHOT
[ERROR]         mvn:org.openhab.core.bundles/org.openhab.core.config.xml/3.3.0-SNAPSHOT
[ERROR]         mvn:org.openhab.core.bundles/org.openhab.core.ephemeris/3.3.0-SNAPSHOT
[ERROR]         mvn:org.openhab.core.bundles/org.openhab.core.id/3.3.0-SNAPSHOT
[ERROR]         mvn:org.openhab.core.bundles/org.openhab.core.io.console/3.3.0-SNAPSHOT
[ERROR]         mvn:org.openhab.core.bundles/org.openhab.core.io.http/3.3.0-SNAPSHOT
[ERROR]         mvn:org.openhab.core.bundles/org.openhab.core.io.monitor/3.3.0-SNAPSHOT
[ERROR]         mvn:org.openhab.core.bundles/org.openhab.core.io.net/3.3.0-SNAPSHOT
[ERROR]         mvn:org.openhab.core.bundles/org.openhab.core.io.rest.core/3.3.0-SNAPSHOT
[ERROR]         mvn:org.openhab.core.bundles/org.openhab.core.io.rest.sse/3.3.0-SNAPSHOT
[ERROR]         mvn:org.openhab.core.bundles/org.openhab.core.io.rest/3.3.0-SNAPSHOT
[ERROR]         mvn:org.openhab.core.bundles/org.openhab.core.persistence/3.3.0-SNAPSHOT
[ERROR]         mvn:org.openhab.core.bundles/org.openhab.core.semantics/3.3.0-SNAPSHOT
[ERROR]         mvn:org.openhab.core.bundles/org.openhab.core.storage.json/3.3.0-SNAPSHOT
[ERROR]         mvn:org.openhab.core.bundles/org.openhab.core.thing.xml/3.3.0-SNAPSHOT
[ERROR]         mvn:org.openhab.core.bundles/org.openhab.core.thing/3.3.0-SNAPSHOT
[ERROR]         mvn:org.openhab.core.bundles/org.openhab.core.transform/3.3.0-SNAPSHOT
[ERROR]         mvn:org.openhab.core.bundles/org.openhab.core.voice/3.3.0-SNAPSHOT
[ERROR]         mvn:org.openhab.core.bundles/org.openhab.core/3.3.0-SNAPSHOT
[ERROR]         mvn:org.openhab.osgiify/si.uom.si-units/2.1
[ERROR]         mvn:org.ops4j.pax.logging/pax-logging-api/2.0.14
[ERROR]         mvn:org.ops4j.pax.logging/pax-logging-log4j2/2.0.14
[ERROR]         mvn:org.ops4j.pax.url/pax-url-aether/2.6.10
[ERROR]         mvn:org.ops4j.pax.web/pax-web-api/7.3.23
[ERROR]         mvn:org.ops4j.pax.web/pax-web-extender-whiteboard/7.3.23
[ERROR]         mvn:org.ops4j.pax.web/pax-web-jetty/7.3.23
[ERROR]         mvn:org.ops4j.pax.web/pax-web-jsp/7.3.23
[ERROR]         mvn:org.ops4j.pax.web/pax-web-runtime/7.3.23
[ERROR]         mvn:org.ops4j.pax.web/pax-web-spi/7.3.23
[ERROR]         mvn:org.osgi/org.osgi.service.jaxrs/1.0.0
[ERROR]         mvn:org.osgi/org.osgi.util.function/1.1.0
[ERROR]         mvn:org.osgi/org.osgi.util.function/1.2.0
[ERROR]         mvn:org.osgi/org.osgi.util.promise/1.1.1
[ERROR]         mvn:org.osgi/org.osgi.util.promise/1.2.0
[ERROR]         mvn:org.ow2.asm/asm-analysis/9.2
[ERROR]         mvn:org.ow2.asm/asm-commons/9.2
[ERROR]         mvn:org.ow2.asm/asm-tree/9.2
[ERROR]         mvn:org.ow2.asm/asm-util/9.2
[ERROR]         mvn:org.ow2.asm/asm/9.2
[ERROR]         mvn:org.threeten/threeten-extra/1.5.0
[ERROR]         mvn:si.uom/si-quantity/2.1
[ERROR]         mvn:tech.units/indriya/2.1.2
[ERROR]         mvn:tech.uom.lib/uom-lib-common/2.1
[ERROR] }

So I tried to build the openhab-distro project with the command that ignores Feature Verification as follows:
mvn clean install -Dfeatures.verify.skip=true

And it works fine but it is strange because it only takes 48.278 sec as shown below:

and in this post it takes 7:23 min. So there is something missing right?

To test the project, I followed the following steps (as explained in this post):

  1. Build the openhab-distro project with the Maven command mvn clean install -Dfeatures.verify.skip=true which allows you to skip the Feature Verification.
  2. Extract the zip file openhab-3.3.0-SNAPSHOT.zip at the location openhab-distro/distributions/openhab/target to the openhab-test-distro folder.
  3. Start OpenHAB with the ./start.sh' or ./start_debug.sh’ script.

I had already done these steps a lot of times and normally it works fine. I haven’t changed anything, I haven’t added any other bundle in the openhab-test-distro folder and it doesn’t work. The bundle openHAB Core :: Bundles :: Core bundle remains in the Waiting state.

I don’t know what the problem is, anyone know what it could be?

I hope someone can help me because actually I can’t test my project.

Thank you,

Nicolas Gennart.

Can you post a link to your code? It looks like your changes no require the org.openhab.core.bundles/org.openhab.core.io.rest.auth bundle when resolving the org.openhab.core.bundles/org.openhab.core.io.rest.core bundle. Since the first is not available in the openhab-core-base feature, it’ll fail.

Here you can see my code. But it is strange because it does not work without my code… I don’t understand why the Feature Verification fails when I build the openhab-distro project. But maybe it is an another error I don’t know. I’m a little bit lost.

Unfortunately you linked the openhab/openhab-core repository, not your changes. Or do you have problems compiling the plain sources without modifications?

But I modify the openhab-core repository, you can see my commits. My problem is when I build the openhab-distro project with maven by doing mvn clean install, the Framework Verification fails. But it’s strange because I don’t change anything, it just appears after cloning the openhab-distro repository. And when I extract the zip file openhab-3.3.0-SNAPSHOT.zip at the location openhab-distro/distributions/openhab/target to the folder openhab-test-distro and then I run OpenHAB with start.sh or start_debug.sh the bundle openHAB Core :: Bundles :: Core remains in the Waiting state as I explained above. I have an older version of the openhab-distro project and it works fine with it. The problem appears since I updated the openhab-distro project.

Do you know what could be the problem since the last update of the openhab-distro project?

Thank you,

Nicolas Gennart.

Maybe try rebasing your code on latest core and build again. I just checked out of openhab-core and openhab-distro, did a man clean install for core and then for bistro and it works fine:

[INFO] Reactor Summary for openHAB Distribution 3.3.0-SNAPSHOT:
[INFO] 
[INFO] openHAB Distribution ............................... SUCCESS [  0.230 s]
[INFO] openHAB Features ................................... SUCCESS [  0.009 s]
[INFO] openHAB Distro Feature ............................. SUCCESS [  1.646 s]
[INFO] openHAB Distro Feature KAR ......................... SUCCESS [ 14.234 s]
[INFO] openHAB Add-ons .................................... SUCCESS [  1.646 s]
[INFO] openHAB Distributions .............................. SUCCESS [  0.009 s]
[INFO] openHAB Add-ons Aggregator ......................... SUCCESS [07:40 min]
[INFO] openHAB Demo ....................................... SUCCESS [  0.349 s]
[INFO] openHAB Distribution ............................... SUCCESS [ 12.076 s]
[INFO] openHAB Feature Verification ....................... SUCCESS [ 55.576 s]
[INFO] ------------------------------------------------------------------------
[INFO] BUILD SUCCESS
[INFO] ------------------------------------------------------------------------
[INFO] Total time:  08:38 min (Wall Clock)
[INFO] Finished at: 2022-03-29T10:40:05+02:00
[INFO] ------------------------------------------------------------------------

I can’t see your commits, because they are in your fork which I can’t see (and I don’t know your GitHub username).

1 Like

Ha ok thank you very much I will try that and for my commits it is not the problem because the problem is not in my code normally.

I still have the same error… I cloned the openhab-distro project to get the latest version and a clean repository, then I did mvn clean install at the location \openhab-distro and it doesn’t work. But what do you mean by building the core project? The core project and the distro project are not related if I just want to build them separately, no?

It depends on your local maven cache. If the version in the cache is newer than the one on the remote servers, the locally cached ones are used. So if you build openhab-core and then build openhab-distro, the artifacts created in your local openhab-core build are used.

1 Like

Yes, that was the problem, it works fine now, thank you very much.