KM200 on OpenHAB 3 last version Handler initialzing error

Hi @All,

i have a problem with install or better conect the Binding with my Heater Junkers Modul MB LAN1

Following error i have:

HANDLER_INITIALIZING_ERROR

class com.google.gson.JsonPrimitive cannot be cast to class com.google.gson.JsonObject (com.google.gson.JsonPrimitive and com.google.gson.JsonObject are in unnamed module of loader org.eclipse.osgi.internal.loader.EquinoxClassLoader @4bc10d1e)

2022-04-23 19:16:22.638 [ERROR] [core.thing.internal.ThingManagerImpl] - Exception occurred while initializing handler of thing ‘km200:kmdevice:cdcb2bb97b’: class com.google.gson.JsonPrimitive cannot be cast to class com.google.gson.JsonObject (com.google.gson.JsonPrimitive and com.google.gson.JsonObject are in unnamed module of loader org.eclipse.osgi.internal.loader.EquinoxClassLoader @4bc10d1e)

java.lang.ClassCastException: class com.google.gson.JsonPrimitive cannot be cast to class com.google.gson.JsonObject (com.google.gson.JsonPrimitive and com.google.gson.JsonObject are in unnamed module of loader org.eclipse.osgi.internal.loader.EquinoxClassLoader @4bc10d1e)

at org.openhab.binding.km200.internal.KM200Device.getServiceNode(KM200Device.java:362) ~[?:?]

at org.openhab.binding.km200.internal.handler.KM200ServiceHandler.initObject(KM200ServiceHandler.java:59) ~[?:?]

at org.openhab.binding.km200.internal.handler.KM200ServiceHandler.determineServiceObject(KM200ServiceHandler.java:178) ~[?:?]

at org.openhab.binding.km200.internal.handler.KM200ServiceHandler.initObject(KM200ServiceHandler.java:65) ~[?:?]

at org.openhab.binding.km200.internal.handler.KM200GatewayHandler.readCapabilities(KM200GatewayHandler.java:270) ~[?:?]

at org.openhab.binding.km200.internal.handler.KM200GatewayHandler.initialize(KM200GatewayHandler.java:120) ~[?:?]

at jdk.internal.reflect.NativeMethodAccessorImpl.invoke0(Native Method) ~[?:?]

at jdk.internal.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:62) ~[?:?]

at jdk.internal.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43) ~[?:?]

at java.lang.reflect.Method.invoke(Method.java:566) ~[?:?]

at org.openhab.core.internal.common.AbstractInvocationHandler.invokeDirect(AbstractInvocationHandler.java:154) [bundleFile:?]

at org.openhab.core.internal.common.Invocation.call(Invocation.java:52) [bundleFile:?]

at java.util.concurrent.FutureTask.run(FutureTask.java:264) [?:?]

at java.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1128) [?:?]

at java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:628) [?:?]

at java.lang.Thread.run(Thread.java:829) [?:?]

==> /var/log/openhab/events.log <==

2022-04-23 19:16:22.639 [INFO ] [ab.event.ThingStatusInfoChangedEvent] - Thing ‘km200:kmdevice:cdcb2bb97b’ changed from INITIALIZING to UNINITIALIZED (HANDLER_INITIALIZING_ERROR): class com.google.gson.JsonPrimitive cannot be cast to class com.google.gson.JsonObject (com.google.gson.JsonPrimitive and com.google.gson.JsonObject are in unnamed module of loader org.eclipse.osgi.internal.loader.EquinoxClassLoader @4bc10d1e)

Can someone help me and give me a tip.

Brgds
WiMa

It clearly indicates that reply format have changed. Part of JSON data which was an object is now a number or other plain type. Try logging data exchanges to see what’s going on. Then you can compare what really changed and how to fix it.

Thanks for the tip, unfortunately I don’t know that at all.
Then it will probably remain a dream that it works :-(.

It’s a shame that something changed and it wasn’t fixed.

I don’t know this hardware, but from looking at the code of getServiceNode - it calls a HTTP endpoint so its answer is likely subject of a change. It could also happen that IP address of your device was changed. Its not something which is impossible.

Hallo Max,
my KM200 connected to a Junkers heating ist running rock solid without this problem (OH 3.3 M3), so I doubt something has changed here from a binding perspective. Did your device receive a firmware update lately ? Have you cleaned the OH cache?
To find help to solve your problem it might be worth to give more detailed information like platform, OS, Java version, Gateway firmware version, model of heating, etc.
Then put you binding logger into DEBUG mode, disable the related things and restart start by putting the gateway online first. If the error occurs the log should give more information for the maintainer.
If not continue by enabling one of the km200 things to narrow down possible sources of the error - you may even be able to give the channel it occurs upon.
You then could try to drop and recreate that specific thing and check if the error still occurs afterwards.
In the end you might have a reproducible scenario you can describe in detail including a debug log that will help solving it.

So before blaming the binding maintainer that “it’s a shame” it may be worth checking your installation and providing more information.

Besides that you are always welcome to contribute to this open source project to get things fixed if something is wrong.

This topic was automatically closed 41 days after the last reply. New replies are no longer allowed.