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