Getting Framework Errors when Using Marketplase to Install Newly Developed Binding

I have recently created a new binding for a Tailwind Smart Garage Controller. It was developed following the OpenHab guidelines using the Eclipse IDE. The code is on Github here: TailWind

Used mvn clean install to ensure there were no errors or warnings.

Binding was tested using the demo app for Eclipse, no errors occurred.

Binding jar copied to the addons-folder of a OpenHab environment running on an RPI produces no log errors messages and functions as it does with the demo app.

Release = Raspbian GNU/Linux 11 (bullseye)
Kernel = Linux 6.1.21-v8+
Platform = Raspberry Pi 4 Model B Rev 1.5
OpenHab Version = 4.1.2

I thoroughly removed the binding from the RPI OpenHab server, restarted Openhab to make sure it was clean before testing the Marketplace install.

I’ve created a post in the marketplace for the binding here: TailWind Binding. Set the post tag to published to make sure it shows up in the Addons Store in the Marketplace section.

When I select install from the Marketplace link, the binding is installed and shows that status on the Add-on Store UI. Thats were things go south, I see the following errors in the openhab.log.

Errors from the openhab.log

2024-05-18 16:07:01.880 [ERROR] [Events.Framework                    ] - FrameworkEvent ERROR
java.lang.NullPointerException: null
	at java.util.Objects.requireNonNull(Objects.java:209) ~[?:?]
	at io.micrometer.core.instrument.ImmutableTag.<init>(ImmutableTag.java:35) ~[?:?]
	at io.micrometer.core.instrument.Tag.of(Tag.java:29) ~[?:?]
	at org.openhab.core.io.monitor.internal.metrics.BundleStateMetric.createOrUpdateMetricForBundleState(BundleStateMetric.java:78) ~[?:?]
	at org.openhab.core.io.monitor.internal.metrics.BundleStateMetric.bundleChanged(BundleStateMetric.java:74) ~[?:?]
	at org.eclipse.osgi.internal.framework.BundleContextImpl.dispatchEvent(BundleContextImpl.java:949) [org.eclipse.osgi-3.18.0.jar:?]
	at org.eclipse.osgi.framework.eventmgr.EventManager.dispatchEvent(EventManager.java:234) [org.eclipse.osgi-3.18.0.jar:?]
	at org.eclipse.osgi.framework.eventmgr.EventManager$EventThread.run(EventManager.java:345) [org.eclipse.osgi-3.18.0.jar:?]
2024-05-18 16:07:01.893 [ERROR] [Events.Framework                    ] - FrameworkEvent ERROR
java.lang.NullPointerException: null
	at java.util.Objects.requireNonNull(Objects.java:209) ~[?:?]
	at io.micrometer.core.instrument.ImmutableTag.<init>(ImmutableTag.java:35) ~[?:?]
	at io.micrometer.core.instrument.Tag.of(Tag.java:29) ~[?:?]
	at org.openhab.core.io.monitor.internal.metrics.BundleStateMetric.createOrUpdateMetricForBundleState(BundleStateMetric.java:78) ~[?:?]
	at org.openhab.core.io.monitor.internal.metrics.BundleStateMetric.bundleChanged(BundleStateMetric.java:74) ~[?:?]
	at org.eclipse.osgi.internal.framework.BundleContextImpl.dispatchEvent(BundleContextImpl.java:949) [org.eclipse.osgi-3.18.0.jar:?]
	at org.eclipse.osgi.framework.eventmgr.EventManager.dispatchEvent(EventManager.java:234) [org.eclipse.osgi-3.18.0.jar:?]
	at org.eclipse.osgi.framework.eventmgr.EventManager$EventThread.run(EventManager.java:345) [org.eclipse.osgi-3.18.0.jar:?]
2024-05-18 16:07:01.897 [ERROR] [Events.Framework                    ] - FrameworkEvent ERROR
java.lang.NullPointerException: null
	at java.util.Objects.requireNonNull(Objects.java:209) ~[?:?]
	at io.micrometer.core.instrument.ImmutableTag.<init>(ImmutableTag.java:35) ~[?:?]
	at io.micrometer.core.instrument.Tag.of(Tag.java:29) ~[?:?]
	at org.openhab.core.io.monitor.internal.metrics.BundleStateMetric.createOrUpdateMetricForBundleState(BundleStateMetric.java:78) ~[?:?]
	at org.openhab.core.io.monitor.internal.metrics.BundleStateMetric.bundleChanged(BundleStateMetric.java:74) ~[?:?]
	at org.eclipse.osgi.internal.framework.BundleContextImpl.dispatchEvent(BundleContextImpl.java:949) [org.eclipse.osgi-3.18.0.jar:?]
	at org.eclipse.osgi.framework.eventmgr.EventManager.dispatchEvent(EventManager.java:234) [org.eclipse.osgi-3.18.0.jar:?]
	at org.eclipse.osgi.framework.eventmgr.EventManager$EventThread.run(EventManager.java:345) [org.eclipse.osgi-3.18.0.jar:?]

When looking at the bundle:list using the openab-cli console, I don’t see the tailwind binding, but I do see an entry that looks like it may have resulted from trying to install this binding.

01 │ Active │  80 │                        │ marketplace:156068

I can kind of add a tailwind thing via the UI by going to the Things screen and hitting the plus (+) sign. It displays a list that includes the tailwind binding, when I pick it, I am shown a screen that gives an option to manually install a thing.

When using the manual create, the thing is created but fails to go on-line with a handler missing message.

Based on the error messages, they could possibly be pointing to a problem with using java Objects tests in my code. The only place I do that is in class that starts a UDP connection and listens for/receives status updates. I’ve tried to modify the code to use requireNonNulll on those statements, but that did not help, or I just don’t know enough use this correctly.

Regardless I found a binding for Anel NET-PwrCtrls that has a UDP connector which is pretty similar to what I have coded. I assume this binding is working, can’t see what I should do differently to get this to work?

I’ve not had any luck finding an issue like this in the community posts, hoping someone can help get me pointed in the right direction to figure out why this is not working.

Issue comes from marketplace client itself. For some reason it pulls wrong link (source jar) instead of compiled addon. Error you see comes from metrics processor which then can’t extract module metadata from manifest.
Try maybe moving resource section to the end of post.

Thanks @splatch !! That did the trick :+1: :+1:

I found that if I linked to my git repository for the source, I could remove the link to the sources jar file altogether.

1 Like