CM11a binding failed to initialize, null pointer exception

I tried openhab2.2 and now tried openhab2.3 snapshot, I still cannot make my cm11a work. When openhab starts, it gives the following error.
I still see the cm11a controller online in the Thing list. But if I define some X10 things with house and unit codes, they have an error saying UNINITIALIZED - HANDLER_INITIALIZING_ERROR

There is on catch though, I am using RCA HC60CRX which is re-branded by RCA and it should use the same interface. Not sure this is the problem.

2018-01-28 11:36:47.420 [ERROR] [nal.common.AbstractInvocationHandler] - An error occurred while calling method ‘ThingHandler.initialize()’ on ‘org.openhab.binding.cm11a.handler.Cm11aApplianceHandler@2409be3b’: null
java.lang.NullPointerException: null
at org.openhab.binding.cm11a.handler.Cm11aAbstractHandler.initialize(Cm11aAbstractHandler.java:85) [211:org.openhab.binding.cm11a:2.3.0.201801252322]
at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method) ~[?:?]
at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:62) ~[?:?]
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.201801231340]
at org.eclipse.smarthome.core.internal.common.Invocation.call(Invocation.java:53) [109:org.eclipse.smarthome.core:0.10.0.201801231340]
at java.util.concurrent.FutureTask.run(FutureTask.java:266) [?:?]
at java.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1142) [?:?]
at java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:617) [?:?]
at java.lang.Thread.run(Thread.java:745) [?:?]
2018-01-28 11:36:47.443 [ERROR] [ome.core.thing.internal.ThingManager] - Exception occurred while initializing handler of thing ‘cm11a:switch:77c6c76f’: null
java.lang.NullPointerException: null
at org.openhab.binding.cm11a.handler.Cm11aAbstractHandler.initialize(Cm11aAbstractHandler.java:85) [211:org.openhab.binding.cm11a:2.3.0.201801252322]
at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method) ~[?:?]
at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:62) ~[?:?]
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.201801231340]
at org.eclipse.smarthome.core.internal.common.Invocation.call(Invocation.java:53) [109:org.eclipse.smarthome.core:0.10.0.201801231340]
at java.util.concurrent.FutureTask.run(FutureTask.java:266) [?:?]
at java.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1142) [?:?]
at java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:617) [?:?]
at java.lang.Thread.run(Thread.java:745) [?:?]
2018-01-28 11:36:51.541 [INFO ] [ing.cm11a.handler.Cm11aBridgeHandler] - Initialized CM11A X10 interface on: COM7

Looks like a defect to me.

This line makes calls to the bridge without checking if it exists.

However, this could be getting exposed by a configuration error in your setup.

The configuration is simply COM port number, right? Not much need to be configured.

I suspect HC60CRX behaves differently from cm11a or my device doesn’t work at all. It has been sitting in my garage for long time. I saw openHab has the binding. It’s worth trying.

Sound like even you fix the problem, it will still not work…
Any suggestion before I put it back to garage? :slight_smile:

Er, maybe. But depending on your configuration, there could be problems in the thing or item definitions.

Here’s an updated jar that should eliminate the null pointer exception, if you’d like to try it out.