So I had recently updated to the OpenHAB 2.2 Build as it included new bindings I needed to work with some of my home automation system. Today I noticed while doing some modifications to my files that the Kodi manual setup I had done in the Things file has stopped working (Auto Discovery works though oddly). For some reason it refuses to set the ports needed and returns with the two following errors in Karaf.
17:50:52.234 [WARN ] [e.smarthome.config.core.Configuration] - Could not set field value for field 'port': Can not set java.lang.Integer field org.openhab.binding.kodi.internal.config.KodiConfig.port to java.lang.String
java.lang.IllegalArgumentException: Can not set java.lang.Integer field org.openhab.binding.kodi.internal.config.KodiConfig.port to java.lang.String
at sun.reflect.UnsafeFieldAccessorImpl.throwSetIllegalArgumentException(UnsafeFieldAccessorImpl.java:167) [?:?]
at sun.reflect.UnsafeFieldAccessorImpl.throwSetIllegalArgumentException(UnsafeFieldAccessorImpl.java:171) [?:?]
at sun.reflect.UnsafeObjectFieldAccessorImpl.set(UnsafeObjectFieldAccessorImpl.java:81) [?:?]
at java.lang.reflect.Field.set(Field.java:764) [?:?]
at org.apache.commons.lang.reflect.FieldUtils.writeField(FieldUtils.java:523) [41:org.apache.commons.lang:2.6.0]
at org.apache.commons.lang.reflect.FieldUtils.writeField(FieldUtils.java:500) [41:org.apache.commons.lang:2.6.0]
at org.apache.commons.lang.reflect.FieldUtils.writeField(FieldUtils.java:560) [41:org.apache.commons.lang:2.6.0]
at org.eclipse.smarthome.config.core.Configuration.as(Configuration.java:106) [103:org.eclipse.smarthome.config.core:0.10.0.b1]
at org.eclipse.smarthome.core.thing.binding.BaseThingHandler.getConfigAs(BaseThingHandler.java:284) [116:org.eclipse.smarthome.core.thing:0.10.0.b1]
at org.openhab.binding.kodi.handler.KodiHandler.getImageBaseUrl(KodiHandler.java:228) [214:org.openhab.binding.kodi:2.2.0]
at org.openhab.binding.kodi.handler.KodiHandler.initialize(KodiHandler.java:276) [214:org.openhab.binding.kodi:2.2.0]
at org.eclipse.smarthome.core.thing.binding.BaseThingHandler.thingUpdated(BaseThingHandler.java:228) [116:org.eclipse.smarthome.core.thing:0.10.0.b1]
at sun.reflect.GeneratedMethodAccessor53.invoke(Unknown Source) ~[?:?]
at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43) ~[?:?]
at java.lang.reflect.Method.invoke(Method.java:498) ~[?:?]
at org.eclipse.smarthome.core.internal.common.AbstractInvocationHandler.invokeDirect(AbstractInvocationHandler.java:153) [109:org.eclipse.smarthome.core:0.10.0.b1]
at org.eclipse.smarthome.core.internal.common.Invocation.call(Invocation.java:53) [109:org.eclipse.smarthome.core:0.10.0.b1]
at java.util.concurrent.FutureTask.run(FutureTask.java:266) [?:?]
at java.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1149) [?:?]
at java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:624) [?:?]
at java.lang.Thread.run(Thread.java:748) [?:?]
17:50:54.369 [WARN ] [e.smarthome.config.core.Configuration] - Could not set field value for field 'httpPort': Can not set java.lang.Integer field org.openhab.binding.kodi.internal.config.KodiConfig.httpPort to java.lang.String
java.lang.IllegalArgumentException: Can not set java.lang.Integer field org.openhab.binding.kodi.internal.config.KodiConfig.httpPort to java.lang.String
at sun.reflect.UnsafeFieldAccessorImpl.throwSetIllegalArgumentException(UnsafeFieldAccessorImpl.java:167) [?:?]
at sun.reflect.UnsafeFieldAccessorImpl.throwSetIllegalArgumentException(UnsafeFieldAccessorImpl.java:171) [?:?]
at sun.reflect.UnsafeObjectFieldAccessorImpl.set(UnsafeObjectFieldAccessorImpl.java:81) [?:?]
at java.lang.reflect.Field.set(Field.java:764) [?:?]
at org.apache.commons.lang.reflect.FieldUtils.writeField(FieldUtils.java:523) [41:org.apache.commons.lang:2.6.0]
at org.apache.commons.lang.reflect.FieldUtils.writeField(FieldUtils.java:500) [41:org.apache.commons.lang:2.6.0]
at org.apache.commons.lang.reflect.FieldUtils.writeField(FieldUtils.java:560) [41:org.apache.commons.lang:2.6.0]
at org.eclipse.smarthome.config.core.Configuration.as(Configuration.java:106) [103:org.eclipse.smarthome.config.core:0.10.0.b1]
at org.eclipse.smarthome.core.thing.binding.BaseThingHandler.getConfigAs(BaseThingHandler.java:284) [116:org.eclipse.smarthome.core.thing:0.10.0.b1]
at org.openhab.binding.kodi.handler.KodiHandler.getImageBaseUrl(KodiHandler.java:228) [214:org.openhab.binding.kodi:2.2.0]
at org.openhab.binding.kodi.handler.KodiHandler.initialize(KodiHandler.java:276) [214:org.openhab.binding.kodi:2.2.0]
at org.eclipse.smarthome.core.thing.binding.BaseThingHandler.thingUpdated(BaseThingHandler.java:228) [116:org.eclipse.smarthome.core.thing:0.10.0.b1]
at sun.reflect.GeneratedMethodAccessor53.invoke(Unknown Source) ~[?:?]
at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43) ~[?:?]
at java.lang.reflect.Method.invoke(Method.java:498) ~[?:?]
at org.eclipse.smarthome.core.internal.common.AbstractInvocationHandler.invokeDirect(AbstractInvocationHandler.java:153) [109:org.eclipse.smarthome.core:0.10.0.b1]
at org.eclipse.smarthome.core.internal.common.Invocation.call(Invocation.java:53) [109:org.eclipse.smarthome.core:0.10.0.b1]
at java.util.concurrent.FutureTask.run(FutureTask.java:266) [?:?]
at java.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1149) [?:?]
at java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:624) [?:?]
at java.lang.Thread.run(Thread.java:748) [?:?]
My current things file uses the this entry for kodi, which according to documentation should be correct (It still accurately gets the username and password, but not the rest).
Thing kodi:kodi:Kodi "Kodi" [ipAddress="192.168.2.102", httpUser="BLANK", httpPassword="BLANK", port="9090", httpPort="8080"]
While auto discovery works and will set the ports correctly (And I can enter the username and password for them), I prefer to use manual setup in the configuration files so if I ever have to rebuild I can do so easily by just dropping in backups of the configuration files. Any help would be appreciated, and if any more information is needed, let me know.