Potential problem with Eclipse and latest Core

At the time of writing, latest is 6764b6d94ce054a5976731781a9bc1141cd53c7b

I’ve been working in Eclipse for quite a while, and while “demo.app”/bnd/OSGi (I’m not exactly sure what’s causing the problems) has its hickups, I’ve usually been able to get it going with some combination of compiling selected packages and doing “Maven Update”. That was different this time around, and I still have no idea what the problem was, but that’s irrelevant in this context.

After fighting with it for a while, I figured that I should rebase my work onto latest master and hope that things would magically fix itself. So I did on Core and UI, and checked out the latest on Addons and Distro.

While this “solved” the original hickup, I got a new one. No matter what I did, it would not resolve. I have compiled the whole Core twice, I’ve done all the tricks I know - and I’ve probably spent 5-6 hours on this. Nothing helped. The errors are confusing to me, so I’m not quite sure what the problem was. However, gson and jackson came up frequently.

In the end I reverted to the pre-rebased version of my work, which is based on f00c7700cb13b4ab6dbc6a8e493f226d8099689c. After doing yet another full build and various refreshing and Maven Update, it finally resolved and works again. After being “trapped” in this for hours, I’m not tempted to go back to the latest and have things stop working again.

While I have no reason to claim that the problem is in latest Core, the way it all resolved when I switched back to the previous commits, gives me atleast a hint that something could be off - which is why I’m posting this.

I was so frustrated and focused on solving this, that I didn’t “document” neither what I did not all the error messages. I’ve only managed to salvage two that I had pasted into notepad:

Resolution failed. Capabilities satisfying the following requirements could not be found:
    [<<INITIAL>>]
      ⇒ osgi.identity: (osgi.identity=org.openhab.ui.basic)
          ⇒ [org.openhab.ui.basic version=5.0.0.202501261605]
              ⇒ osgi.wiring.package: (&(osgi.wiring.package=com.google.gson)(version>=2.11.0)(!(version>=3.0.0)))
    [tech.units.indriya__9 version=2.2.0 type=bnd.synthetic]
      ⇒ osgi.ee: (&(osgi.ee=JavaSE)(&(version>=9.0.0)(!(version>=12.0.0))))
    [com.sun.xml.bind.jaxb-osgi__8 version=2.3.8 type=bnd.synthetic]
      ⇒ osgi.ee: (&(osgi.ee=JavaSE)(&(version>=1.8.0)(!(version>=9.0.0))))
    [org.apache.commons.lang3__8 version=3.14.0 type=bnd.synthetic]
      ⇒ osgi.ee: (&(osgi.ee=JavaSE)(&(version>=1.8.0)(!(version>=9.0.0))))
    [tech.units.indriya__8 version=2.2.0 type=bnd.synthetic]
      ⇒ osgi.ee: (&(osgi.ee=JavaSE)(&(version>=1.8.0)(!(version>=9.0.0))))
    [com.google.gson__7 version=2.10.1.v20230109-0753 type=bnd.synthetic]
      ⇒ osgi.ee: (&(osgi.ee=JavaSE)(&(version>=1.7.0)(!(version>=9.0.0))))
    [org.apache.aries.jax.rs.whiteboard__8 version=2.0.2 type=bnd.synthetic]
      ⇒ osgi.ee: (&(osgi.ee=JavaSE)(&(version>=1.8.0)(!(version>=9.0.0))))
    [com.fasterxml.jackson.core.jackson-core__17 version=2.17.1 type=bnd.synthetic]
      ⇒ osgi.ee: (&(osgi.ee=JavaSE)(&(version>=17.0.0)(!(version>=21.0.0))))
    [jaxb-api__7 version=2.3.0 type=bnd.synthetic]
      ⇒ osgi.ee: (&(osgi.ee=JavaSE)(&(version>=1.7.0)(!(version>=9.0.0))))
    [com.sun.istack.commons-runtime__8 version=3.0.12 type=bnd.synthetic]
      ⇒ osgi.ee: (&(osgi.ee=JavaSE)(&(version>=1.8.0)(!(version>=9.0.0))))
    [com.fasterxml.jackson.core.jackson-core__8 version=2.17.1 type=bnd.synthetic]
      ⇒ osgi.ee: (&(osgi.ee=JavaSE)(&(version>=1.8.0)(!(version>=9.0.0))))
    [com.fasterxml.jackson.dataformat.jackson-dataformat-yaml__8 version=2.17.1 type=bnd.synthetic]
      ⇒ osgi.ee: (&(osgi.ee=JavaSE)(&(version>=1.8.0)(!(version>=9.0.0))))
    [javax.measure.unit-api__8 version=2.2.0 type=bnd.synthetic]
      ⇒ osgi.ee: (&(osgi.ee=JavaSE)(&(version>=1.8.0)(!(version>=9.0.0))))
    [com.fasterxml.jackson.datatype.jackson-datatype-jsr310__8 version=2.17.1 type=bnd.synthetic]
      ⇒ osgi.ee: (&(osgi.ee=JavaSE)(&(version>=1.8.0)(!(version>=9.0.0))))
    [org.ops4j.pax.logging.pax-logging-api__8 version=2.2.7 type=bnd.synthetic]
      ⇒ osgi.ee: (&(osgi.ee=JavaSE)(&(version>=1.8.0)(!(version>=9.0.0))))
    [tech.units.indriya__12 version=2.2.0 type=bnd.synthetic]
      ⇒ osgi.ee: (&(osgi.ee=JavaSE)(&(version>=12.0.0)(!(version>=14.0.0))))
    [jakarta.xml.bind-api__8 version=2.3.3 type=bnd.synthetic]
      ⇒ osgi.ee: (&(osgi.ee=JavaSE)(&(version>=1.8.0)(!(version>=9.0.0))))
    [org.apache.commons.commons-io__8 version=2.15.1 type=bnd.synthetic]
      ⇒ osgi.ee: (&(osgi.ee=JavaSE)(&(version>=1.8.0)(!(version>=9.0.0))))
    [com.fasterxml.jackson.core.jackson-core__11 version=2.17.1 type=bnd.synthetic]
      ⇒ osgi.ee: (&(osgi.ee=JavaSE)(&(version>=11.0.0)(!(version>=17.0.0))))
    [com.fasterxml.jackson.core.jackson-core__9 version=2.17.1 type=bnd.synthetic]
      ⇒ osgi.ee: (&(osgi.ee=JavaSE)(&(version>=9.0.0)(!(version>=11.0.0))))
    [com.fasterxml.jackson.core.jackson-databind__8 version=2.17.1 type=bnd.synthetic]
      ⇒ osgi.ee: (&(osgi.ee=JavaSE)(&(version>=1.8.0)(!(version>=9.0.0))))
    [org.yaml.snakeyaml__7 version=2.2.0 type=bnd.synthetic]
      ⇒ osgi.ee: (&(osgi.ee=JavaSE)(&(version>=1.7.0)(!(version>=9.0.0))))
    [com.fasterxml.jackson.dataformat.jackson-dataformat-xml__8 version=2.17.1 type=bnd.synthetic]
      ⇒ osgi.ee: (&(osgi.ee=JavaSE)(&(version>=1.8.0)(!(version>=9.0.0))))
    [io.github.classgraph.classgraph__7 version=4.8.174 type=bnd.synthetic]
      ⇒ osgi.ee: (&(osgi.ee=JavaSE)(&(version>=1.7.0)(!(version>=9.0.0))))
    [org.glassfish.jaxb.runtime__8 version=2.3.5 type=bnd.synthetic]
      ⇒ osgi.ee: (&(osgi.ee=JavaSE)(&(version>=1.8.0)(!(version>=9.0.0))))
    [org.openhab.transform.bin2json version=5.0.0.202501270251]
      ⇒ osgi.wiring.package: (&(osgi.wiring.package=com.google.gson)(version>=2.11.0)(!(version>=3.0.0)))
    [org.openhab.transform.jinja version=5.0.0.202501270251]
      ⇒ osgi.wiring.package: (&(osgi.wiring.package=com.fasterxml.jackson.databind)(version>=2.18.0)(!(version>=3.0.0)))
Error executing jar goal: Failed to execute mojo org.apache.maven.plugins:maven-jar-plugin:3.4.2:jar {execution: default-jar}
Failed to execute mojo org.apache.maven.plugins:maven-jar-plugin:3.4.2:jar {execution: default-jar}
Failed to execute goal on project e[36morg.openhab.core.uie[m: e[1;31mCould not collect dependencies for project org.openhab.core.bundles:org.openhab.core.ui:jar:5.0.0-SNAPSHOT
Failed to read artifact descriptor for org.osgi:org.osgi.service.prefs:jar:1.1.1-SNAPSHOT
	Caused by: The following artifacts could not be resolved: org.osgi:org.osgi.service.prefs:pom:1.1.1-SNAPSHOT (absent): org.osgi:org.osgi.service.prefs:pom:1.1.1-SNAPSHOT failed to transfer from https://oss.sonatype.org/content/repositories/snapshots during a previous attempt. This failure was cached in the local repository and resolution is not reattempted until the update interval of sonatype-snapshots has elapsed or updates are forced. Original error: Could not transfer artifact org.osgi:org.osgi.service.prefs:pom:1.1.1-SNAPSHOT from/to sonatype-snapshots (https://oss.sonatype.org/content/repositories/snapshots): PKIX path building failed: sun.security.provider.certpath.SunCertPathBuilderException: unable to find valid certification path to requested target
e[m

My Eclipse installation is 2024-12 (4.34.0) and my Bndtools is 7.0.0.REL-2023100609. Java 21. I saw OSGI Resolve gives error, but although that was definitely true for me too, it doesn’t seem like the Bndtools version was the culprit for me.

This might be a total shot in the dark, and be some strangeness that nobody else will ever encounter. I’m completely speculating, but I happened to notice 4da70a2ed800f3e58afd017492ad419abeca8fef. I won’t even pretend to understand how Karaf, OSGi and Bndtools go together, but as far as I can understand, the “demo.app” doesn’t run Karaf, but Apache Felix Gogo instead. Could it be that upgrading Karaf without also upgrading Felix to a “corresponding version” could cause a problem?

Regardless, this is just a “possible problem alert” - my installation is working fine now, and I plan to stay on the working version for the foreseeable future :slight_smile:

Hello,

Same on my side, was unable to start my development environment this morning after an upgrade.
It was working ok yesterday.

I take long time try to struggle with dependency in app.bdrun today, but without success.
I thing main reason is missing dependency : … com.ctc.wstx.stax)(version>=6.4.0)(!(version>=7.0.0))), but not totally sure.

@holgerf , @wborn:
this is perhaps related to yesterday commit 981f13cb576ae6bdbcab563136c883a191d63620 on openhab-distro, and also commit 4da70a2ed800f3e58afd017492ad419abeca8fef on openhab-core.

Can you help us on resolving this ?

Thanks,
Laurent.

1 Like

Hi,

we have upgraded Karaf, the most important of our base libraries. This comes along with dozens of changes on other dependencies. As those versions are set in several pom files and for the itests in the bndrun files, all existing PR branches need to be rebased.

Rebasing can be done with something like

git fetch upstream
git rebase upstream/main

We have now different Karaf versions on 4.3 and 5.0-SNAPSHOT branches, which may lead to further problems when deploying to your dev installation. If you already run 5.0 on your dev setup, make sure you get the latest snapshot installed.

That should typically do the job, but unfortunately now th

The problem you are facing right now seems to be caused by broken dependencies in the demo app. I also see some issues and get a lot of dependency errors, but was not able to fix it yet.

I did rebase, and that’s when the problem started. I even tried checking out the latest commit from main (thus with none of my changes) and had the same problem. Only after I “reverted my rebase” (I had made a backup branch before rebase) did things start to work again.

This is understood but good you confirmed it.
It seems that I broke the demo app during the upgrade.
Sorry for that.

1 Like

This already helps a bit, makes the app start at least. Still at least one dependency missing…

Hello @holgerf ,

Thanks for the fix.
It’s far better, but still does not work.
On startup in eclipse, it complains about two dependency:

  • com.fasterxml.jackson.annotation;version=‘[2.18.2,2.18.3)’,\
    That does not seems to exist, I dont’ see it on maven.

  • com.fasterxml.woodstox.woodstox-core;version=‘[6.6.2,6.6.3)’,
    I only see a version 7.0

If I try to fixes this two one, I can launch openhab, but have the following failure at runtime:

could not resolve the bundles: [org.apache.aries.jax.rs.whiteboard-2.0.2 org.osgi.framework.BundleException: Could not resolve module: org.apache.aries.jax.rs.whiteboard [32]
  Unresolved requirement: Import-Package: com.ctc.wstx.stax; version="[6.4.0,7.0.0)"

, org.openhab.core.automation.rest-5.0.0.202501280301 org.osgi.framework.BundleException: Could not resolve module: org.openhab.core.automation.rest [130]
  Unresolved requirement: Require-Capability: osgi.implementation; filter:="(&(osgi.implementation=osgi.jaxrs)(version>=1.0.0)(!(version>=2.0.0)))"
    -> Provide-Capability: osgi.implementation; version:Version="1.0.0"; osgi.implementation="osgi.jaxrs"; uses:="javax.ws.rs,javax.ws.rs.core,javax.ws.rs.ext,javax.ws.rs.client,javax.ws.rs.container,javax.ws.rs.sse,org.osgi.service.jaxrs.whiteboard"
       org.apache.aries.jax.rs.whiteboard [32]
         Unresolved requirement: Import-Package: com.ctc.wstx.stax; version="[6.4.0,7.0.0)"
  Unresolved requirement: Import-Package: org.openhab.core.io.rest; version="[5.0.0,6.0.0)"
    -> Export-Package: org.openhab.core.io.rest; bundle-symbolic-name="org.openhab.core.io.rest"; bundle-version="5.0.0.202501280252"; version="5.0.0"; uses:="javax.ws.rs.core,javax.ws.rs.ext,javax.ws.rs.sse,org.openhab.core.i18n"
       org.openhab.core.io.rest [143]
         Unresolved requirement: Require-Capability: osgi.implementation; filter:="(&(osgi.implementation=osgi.jaxrs)(version>=1.0.0)(!(version>=2.0.0)))"
           -> Provide-Capability: osgi.implementation; version:Version="1.0.0"; osgi.implementation="osgi.jaxrs"; uses:="javax.ws.rs,javax.ws.rs.core,javax.ws.rs.ext,javax.ws.rs.client,javax.ws.rs.container,javax.ws.rs.sse,org.osgi.service.jaxrs.whiteboard"

, org.openhab.core.id-5.0.0.202501280253 org.osgi.framework.BundleException: Could not resolve module: org.openhab.core.id [136]
  Unresolved requirement: Import-Package: org.openhab.core.io.rest; version="[5.0.0,6.0.0)"
    -> Export-Package: org.openhab.core.io.rest; bundle-symbolic-name="org.openhab.core.io.rest"; bundle-version="5.0.0.202501280252"; version="5.0.0"; uses:="javax.ws.rs.core,javax.ws.rs.ext,javax.ws.rs.sse,org.openhab.core.i18n"
       org.openhab.core.io.rest [143]
         Unresolved requirement: Require-Capability: osgi.implementation; filter:="(&(osgi.implementation=osgi.jaxrs)(version>=1.0.0)(!(version>=2.0.0)))"
           -> Provide-Capability: osgi.implementation; version:Version="1.0.0"; osgi.implementation="osgi.jaxrs"; uses:="javax.ws.rs,javax.ws.rs.core,javax.ws.rs.ext,javax.ws.rs.client,javax.ws.rs.container,javax.ws.rs.sse,org.osgi.service.jaxrs.whiteboard"
              org.apache.aries.jax.rs.whiteboard [32]
                Unresolved requirement: Import-Package: com.ctc.wstx.stax; version="[6.4.0,7.0.0)"
  Unresolved requirement: Require-Capability: osgi.implementation; filter:="(&(osgi.implementation=osgi.jaxrs)(version>=1.0.0)(!(version>=2.0.0)))"
    -> Provide-Capability: osgi.implementation; version:Version="1.0.0"; osgi.implementation="osgi.jaxrs"; uses:="javax.ws.rs,javax.ws.rs.core,javax.ws.rs.ext,javax.ws.rs.client,javax.ws.rs.container,javax.ws.rs.sse,org.osgi.service.jaxrs.whiteboard"

...

Failed to start bundle org.apache.aries.jax.rs.whiteboard-2.0.2, exception Could not resolve module: org.apache.aries.jax.rs.whiteboard [32]
  Unresolved requirement: Import-Package: com.ctc.wstx.stax; version="[6.4.0,7.0.0)"

org.osgi.framework.BundleException: Could not resolve module: org.apache.aries.jax.rs.whiteboard [32]
  Unresolved requirement: Import-Package: com.ctc.wstx.stax; version="[6.4.0,7.0.0)"
	at org.eclipse.osgi.container.Module.start(Module.java:463)
	at org.eclipse.osgi.internal.framework.EquinoxBundle.start(EquinoxBundle.java:445)
	at aQute.launcher.Launcher.start(Launcher.java:699)
	at aQute.launcher.Launcher.startBundles(Launcher.java:679)
	at aQute.launcher.Launcher.activate(Launcher.java:585)
	at aQute.launcher.Launcher.launch(Launcher.java:403)
	at aQute.launcher.Launcher.run(Launcher.java:185)
	at aQute.launcher.Launcher.main(Launcher.java:161)
	at aQute.launcher.pre.EmbeddedLauncher.executeWithRunPath(EmbeddedLauncher.java:170)
	at aQute.launcher.pre.EmbeddedLauncher.findAndExecute(EmbeddedLauncher.java:135)
	at aQute.launcher.pre.EmbeddedLauncher.main(EmbeddedLauncher.java:52)

Laurent.

Now it has stopped working for me again, and I’m still on my reverted (pre karaf upgrade) branch. The error I get now when trying to resolve is:

Resolution failed. Capabilities satisfying the following requirements could not be found:
    [<<INITIAL>>]
      ⇒ osgi.identity: (osgi.identity=org.openhab.ui.basic)
          ⇒ [org.openhab.ui.basic version=5.0.0.202501261605]
              ⇒ osgi.wiring.package: (&(osgi.wiring.package=com.google.gson)(version>=2.11.0)(!(version>=3.0.0)))
    [tech.units.indriya__9 version=2.2.0 type=bnd.synthetic]
      ⇒ osgi.ee: (&(osgi.ee=JavaSE)(&(version>=9.0.0)(!(version>=12.0.0))))
    [com.sun.xml.bind.jaxb-osgi__8 version=2.3.8 type=bnd.synthetic]
      ⇒ osgi.ee: (&(osgi.ee=JavaSE)(&(version>=1.8.0)(!(version>=9.0.0))))
    [org.apache.commons.lang3__8 version=3.14.0 type=bnd.synthetic]
      ⇒ osgi.ee: (&(osgi.ee=JavaSE)(&(version>=1.8.0)(!(version>=9.0.0))))
    [tech.units.indriya__8 version=2.2.0 type=bnd.synthetic]
      ⇒ osgi.ee: (&(osgi.ee=JavaSE)(&(version>=1.8.0)(!(version>=9.0.0))))
    [com.google.gson__7 version=2.10.1.v20230109-0753 type=bnd.synthetic]
      ⇒ osgi.ee: (&(osgi.ee=JavaSE)(&(version>=1.7.0)(!(version>=9.0.0))))
    [org.apache.aries.jax.rs.whiteboard__8 version=2.0.2 type=bnd.synthetic]
      ⇒ osgi.ee: (&(osgi.ee=JavaSE)(&(version>=1.8.0)(!(version>=9.0.0))))
    [com.fasterxml.jackson.core.jackson-core__17 version=2.17.1 type=bnd.synthetic]
      ⇒ osgi.ee: (&(osgi.ee=JavaSE)(&(version>=17.0.0)(!(version>=21.0.0))))
    [jaxb-api__7 version=2.3.0 type=bnd.synthetic]
      ⇒ osgi.ee: (&(osgi.ee=JavaSE)(&(version>=1.7.0)(!(version>=9.0.0))))
    [com.sun.istack.commons-runtime__8 version=3.0.12 type=bnd.synthetic]
      ⇒ osgi.ee: (&(osgi.ee=JavaSE)(&(version>=1.8.0)(!(version>=9.0.0))))
    [com.fasterxml.jackson.core.jackson-core__8 version=2.17.1 type=bnd.synthetic]
      ⇒ osgi.ee: (&(osgi.ee=JavaSE)(&(version>=1.8.0)(!(version>=9.0.0))))
    [com.fasterxml.jackson.dataformat.jackson-dataformat-yaml__8 version=2.17.1 type=bnd.synthetic]
      ⇒ osgi.ee: (&(osgi.ee=JavaSE)(&(version>=1.8.0)(!(version>=9.0.0))))
    [javax.measure.unit-api__8 version=2.2.0 type=bnd.synthetic]
      ⇒ osgi.ee: (&(osgi.ee=JavaSE)(&(version>=1.8.0)(!(version>=9.0.0))))
    [com.fasterxml.jackson.datatype.jackson-datatype-jsr310__8 version=2.17.1 type=bnd.synthetic]
      ⇒ osgi.ee: (&(osgi.ee=JavaSE)(&(version>=1.8.0)(!(version>=9.0.0))))
    [org.ops4j.pax.logging.pax-logging-api__8 version=2.2.7 type=bnd.synthetic]
      ⇒ osgi.ee: (&(osgi.ee=JavaSE)(&(version>=1.8.0)(!(version>=9.0.0))))
    [tech.units.indriya__12 version=2.2.0 type=bnd.synthetic]
      ⇒ osgi.ee: (&(osgi.ee=JavaSE)(&(version>=12.0.0)(!(version>=14.0.0))))
    [jakarta.xml.bind-api__8 version=2.3.3 type=bnd.synthetic]
      ⇒ osgi.ee: (&(osgi.ee=JavaSE)(&(version>=1.8.0)(!(version>=9.0.0))))
    [org.apache.commons.commons-io__8 version=2.15.1 type=bnd.synthetic]
      ⇒ osgi.ee: (&(osgi.ee=JavaSE)(&(version>=1.8.0)(!(version>=9.0.0))))
    [com.fasterxml.jackson.core.jackson-core__11 version=2.17.1 type=bnd.synthetic]
      ⇒ osgi.ee: (&(osgi.ee=JavaSE)(&(version>=11.0.0)(!(version>=17.0.0))))
    [com.fasterxml.jackson.core.jackson-core__9 version=2.17.1 type=bnd.synthetic]
      ⇒ osgi.ee: (&(osgi.ee=JavaSE)(&(version>=9.0.0)(!(version>=11.0.0))))
    [com.fasterxml.jackson.core.jackson-databind__8 version=2.17.1 type=bnd.synthetic]
      ⇒ osgi.ee: (&(osgi.ee=JavaSE)(&(version>=1.8.0)(!(version>=9.0.0))))
    [org.yaml.snakeyaml__7 version=2.2.0 type=bnd.synthetic]
      ⇒ osgi.ee: (&(osgi.ee=JavaSE)(&(version>=1.7.0)(!(version>=9.0.0))))
    [com.fasterxml.jackson.dataformat.jackson-dataformat-xml__8 version=2.17.1 type=bnd.synthetic]
      ⇒ osgi.ee: (&(osgi.ee=JavaSE)(&(version>=1.8.0)(!(version>=9.0.0))))
    [io.github.classgraph.classgraph__7 version=4.8.174 type=bnd.synthetic]
      ⇒ osgi.ee: (&(osgi.ee=JavaSE)(&(version>=1.7.0)(!(version>=9.0.0))))
    [org.glassfish.jaxb.runtime__8 version=2.3.5 type=bnd.synthetic]
      ⇒ osgi.ee: (&(osgi.ee=JavaSE)(&(version>=1.8.0)(!(version>=9.0.0))))
    [org.openhab.transform.bin2json version=5.0.0.202501270359]
      ⇒ osgi.wiring.package: (osgi.wiring.package=com.igormaznitsa.jbbp)
    [org.openhab.transform.jinja version=5.0.0.202501270359]
      ⇒ osgi.wiring.package: (&(osgi.wiring.package=com.fasterxml.jackson.databind)(version>=2.18.0)(!(version>=3.0.0)))

When I try to launch, I get a long list of missing dependencies, which for some stupid reason isn’t possible to copy. The “trend” seems to be that it’s related to .pax.logging, fasterxml.jackson, gson, jna and jollyday. There are many others too, but it’s difficult to say what is the source of the problem, and what are just consequences.

This is similar to what happened initially which made me to the rebase to latest and start this whole “journey”. I’m not sure why this happens, but I have a theory:

Since the whole “project” is set to use the latest SNAPSHOT, I think Maven keeps polling the snapshot repo for updates. Whenever a new snapshot of some bundle has been uploaded, I think Maven automatically updates my local artifact - which means that the results of these problems are pulled in even if I stay to a previous commit. To solve this, I then have to rebuild the whole of Core, which will take 15-20 minutes. It will then work until the next time one of the artifacts are updated (probably just with a new timestamp).

If my theory is correct, I’m wondering if there’s anything we can do to prevent this until the problem is solved. It might be something I can do locally to stop Maven updating snapshots, but I’m not sure how I should do that. Or, maybe something could be done centrally to stop publishing new snapshots until this is solved?

I assume that the reason it works after I compile/install everything, is that then “my snapshots” have a more recent timestamp than those in the snapshot repo.

I’ve now rebuilt/installed all bundles in Core, and it works again, which supports my theory of what’s happening.

I’ve also modified to “master pom” with:

    <snapshotRepository>
      <id>jfrog</id>
      <url>${oh.repo.snapshotBaseUrl}/libs-snapshot-local</url>
      <snapshots>
        <updatePolicy>never</updatePolicy>
      </snapshots>
    </snapshotRepository>

It remains to be seen if this is an effective way to prevent “updated” snapshots being pulled in again.

I don’t use Eclipse, but chdir to launch\app and run mvn bnd-run:run.

It looks like I found a solution (which requires a change in core as well, in addition to the PR mentioned above)

:+1:

I’m not eager to check out the PR and test/confirm, because it takes so long to recompile + refresh + Maven update etc. to get things working again.

But, one would assume that if it runs from the command line, it should work from Eclipse too, hopefully at least.

You can skip a few steps when compiling core to make it install faster:

 mvn clean install -T1C -DskipChecks -DskipTests -Dspotless.check.skip=true

What does this do? I already use the other options, or it would probably never finish :wink:

Parallel build with N parallel executions, where N is 1* the number of cores.
Not always working as there are some time-sensitive tests. You may need to resume a broken test without that option. No problem, as you can always resume using the -rf option as shown by mvn tool.

1 Like

As long as we’re skipping tests, that shouldn’t be a problem…?

Why do you suggest running “parallel” with only one core? Won’t that in reality be sequential then?

Maybe I was not clear, “C” is the number of available cores. So “1C” means one thread per available core. You can also use fixed numbers suitable for your system.
And for this case, yes, not relevant as you skip the tests.

1 Like

It just happened again (so it seems that my POM tweak didn’t prevent snapshots from updating). The -T1C option at least increased the speed significantly: 07:36 min. It’s about half what it takes without it.

Hello holgerf,

I’ve test this fix this morning.
After updating the app.bdrun with your modification, and reupdating core depencies, I confirm that everything is now fully functionnal.

I can even trigger the resolve button in eclipse (bndrun 7.0) without having any error, and of cource launch my openhab as well.

Thanks for all your work.
Great to see we are now have all the dependencies / karaf 7.1 ready for openhab 5 :slight_smile:

Laurent.

2 Likes

Hello @holgerf,

It seems that I’ve also have a little problem with com.google.gson dependency.

I’m not sure where it’s comming from, but some of my binding won’t start if I don’t add a dependency in the pom.xml. That was not the case before:

<dependency>
  <groupId>com.google.code.gson</groupId>
  <artifactId>gson</artifactId>
  <version>${gson.version}</version>
</dependency>

If I add it, it’s work, but I can see two version in app.bndrun : 2.9.1, and 2.11.0.
2.9.1 comming from the modification in pom.xml, that is an old versions !

app.bndrun show version 2.11.0, which seems correct : com.google.gson;version=‘[2.11.0,2.11.1)’,\

I don’t know from where come this ${gson.version}.
Perhaps it was not update to match last version ?

Laurent.

Hum, I’m not upgrade my openhab version on production.
Let me check before I bother you, I will deploy last snapshot to verify.

Laurent.