Extend binding tr064 - Installation Error argument type mismatch


I try to extend the current tr064 binding. I started with openhab 4 weeks ago and want to add some functioinality to the standard tr064 binding. I want to test my changes in my openhabian instance before I add a pullrequest to the openhab-addon project.

But now I am struggeling with the installation of my new build of tr064 binding.
When I just build a new version of the binding without any code changes (with mvn clean install) and copy the 3.2.0-SNAPSHOT .jar to my "/usr/share/openhab/addons", I get the following error:

2021-06-28 20:01:06.240 [WARN ] [.thing.internal.GenericThingProvider] - bundle org.openhab.core.model.thing:3.1.0 (207)[org.openhab.core.model.thing.internal.GenericThingProvider(74)] : DependencyManager : invokeBindMethod : Service not available from service registry for ServiceReference {org.openhab.core.thing.binding.ThingHandlerFactory}={service.id=499, service.bundleid=258, service.scope=bundle, component.name=org.openhab.binding.tr064.internal.Tr064HandlerFactory, component.id=314} for reference ThingHandlerFactory
2021-06-28 20:01:06.244 [ERROR] [g.tr064.internal.Tr064HandlerFactory] - bundle org.openhab.binding.tr064: (258)[org.openhab.binding.tr064.internal.Tr064HandlerFactory(314)] : Error during instantiation of the implementation object
java.lang.IllegalArgumentException: argument type mismatch
        at jdk.internal.reflect.NativeConstructorAccessorImpl.newInstance0(Native Method) ~[?:?]
        at jdk.internal.reflect.NativeConstructorAccessorImpl.newInstance(NativeConstructorAccessorImpl.java:62) ~[?:?]
        at jdk.internal.reflect.DelegatingConstructorAccessorImpl.newInstance(DelegatingConstructorAccessorImpl.java:45) ~[?:?]
        at java.lang.reflect.Constructor.newInstance(Constructor.java:490) ~[?:?]
        at org.apache.felix.scr.impl.inject.internal.ComponentConstructorImpl.newInstance(ComponentConstructorImpl.java:316) ~[bundleFile:?]
        at org.apache.felix.scr.impl.manager.SingleComponentManager.createImplementationObject(SingleComponentManager.java:286) [bundleFile:?]
        at org.apache.felix.scr.impl.manager.SingleComponentManager.createComponent(SingleComponentManager.java:115) [bundleFile:?]
        at org.apache.felix.scr.impl.manager.SingleComponentManager.getService(SingleComponentManager.java:1000) [bundleFile:?]
        at org.apache.felix.scr.impl.manager.SingleComponentManager.getServiceInternal(SingleComponentManager.java:973) [bundleFile:?]
        at org.apache.felix.scr.impl.manager.SingleComponentManager.getService(SingleComponentManager.java:918) [bundleFile:?]
        at org.eclipse.osgi.internal.serviceregistry.ServiceFactoryUse$1.run(ServiceFactoryUse.java:216) [org.eclipse.osgi-3.16.200.jar:?]
        at java.security.AccessController.doPrivileged(Native Method) ~[?:?]

I tried to change the binding package and naming but this didn’t helped. Can someone help to fix this error? Or can someone give me a short “how to” to change or extend the standard bindings?

I am using openhabian (pi) in version 3.1.0.

Thanks in advance

It might not be the root cause of your issue, but I suggest to use matching versions for the OH base system and the codebase of your development of the binding. You will make your life easier that way as there might be incompatibilities when versions are mixed.

Hi Stefan,

thanks for your answer. And it seems that its true, cause I got it running. :slight_smile:
To get my custom build tr064 binding bundle running I had to do the steps in this manual: Addon (Binding) in openHAB 3 manuell installieren / deinstallieren | phenx.de

The key things to get it working for me was to first uninstall the tr064 binding, clean the cache of openhab and reboot everything. Now I can test my changes :slight_smile:

Hope this helps someone else with the same issue.

Kind regards

1 Like