Missing requirement (osgi.wiring.package=com.google.gson.internal)

I freshly installed an Eclipse setup for OH3, added the Shelly binding to the dependencies and start the Debug - OH3 starts, but Shelly binding is not loading at all. Removed dependency, added again same. Complete new install of IDE, same.

mvn clean install reports

[ERROR] Failed to execute goal org.apache.karaf.tooling:karaf-maven-plugin:4.2.7:verify (karaf-feature-verification) on project org.openhab.binding.shelly: Feature resolution failed for [openhab-binding-shelly/3.1.0.SNAPSHOT]
[ERROR] Message: Unable to resolve root: missing requirement [root] osgi.identity; osgi.identity=openhab-binding-shelly; type=karaf.feature; version=3.1.0.SNAPSHOT; filter:="(&(osgi.identity=openhab-binding-shelly)(type=karaf.feature)(version>=3.1.0.SNAPSHOT))" [caused by: Unable to resolve openhab-binding-shelly/3.1.0.SNAPSHOT: missing requirement [openhab-binding-shelly/3.1.0.SNAPSHOT] osgi.identity; osgi.identity=org.openhab.binding.shelly; type=osgi.bundle; version="[,]"; resolution:=mandatory [caused by: Unable to resolve org.openhab.binding.shelly/ missing requirement [org.openhab.binding.shelly/] osgi.wiring.package; filter:="(osgi.wiring.package=com.google.gson.internal)"]]

tried Clean Project etc., same problem

Sometimes Resolve brings up
Bildschirmfoto 2021-03-20 um 17.42.37

I also tried a different binding, same

any idea?

It’s probably due to the Gson upgrade. The new bundle no longer exports the com.google.gson.internal package. That package is considered internal, i.e. not part of the API so it should never have been exported by the bundle or used by any add-on. The classes in this package can have breaking changes with any release.

I removed the import com.google.gson.internal.Primitives; in ShellyUtils in:

So maybe it helps to use (or rebase on) the current main branch?

1 Like


1 Like