Unresolved requirement: Import-Package: io.micrometer.core.lang

Can someone explain why I get this error when I try and start my binding.

org.osgi.framework.BundleException: Could not resolve module: org.openhab.binding.smartmeterosgp [325]
Unresolved requirement: Import-Package: io.micrometer.core.lang; version=“[3.4.0,4.0.0)”

at org.eclipse.osgi.container.Module.start(Module.java:463) ~[org.eclipse.osgi-3.17.200.jar:?]
at org.eclipse.osgi.internal.framework.EquinoxBundle.start(EquinoxBundle.java:445) ~[org.eclipse.osgi-3.17.200.jar:?]
at org.apache.felix.fileinstall.internal.DirectoryWatcher.startBundle(DirectoryWatcher.java:1260) [bundleFile:3.7.4]
at org.apache.felix.fileinstall.internal.DirectoryWatcher.startBundles(DirectoryWatcher.java:1233) [bundleFile:3.7.4]
at org.apache.felix.fileinstall.internal.DirectoryWatcher.doProcess(DirectoryWatcher.java:520) [bundleFile:3.7.4]
at org.apache.felix.fileinstall.internal.DirectoryWatcher.process(DirectoryWatcher.java:365) [bundleFile:3.7.4]
at org.apache.felix.fileinstall.internal.DirectoryWatcher.run(DirectoryWatcher.java:316) [bundleFile:3.7.4]

I do not think I changed any significant code from when it was build yesterday where it worked.

Binding code or some of its close dependencies use micrometer which is not found in requested version.


How can I understand where this dependancy is coming from ?
And what do I write to fix it?

If you have command line installation of Maven you can do mvn dependency:tree, if you rely on Eclipse then you need to find a way there. I suppose there is a way to find dependency tree there if you open pom.xml editor.

In essence what you see is missing runtime dependency which is available during build time. First is controlled by feature.xml file, later is defined in pom.xml.

1 Like