Hello together,
I’ve a new and bigger SD card installed and I’ve updated my Java to the version:
java version "1.8.0_151"
Java™ SE Runtime Environment (build 1.8.0_151-b12)
Java HotSpot™ Client VM (build 25.151-b12, mixed mode)
When I try the official Tankerkoenig Binding (Version 2.1.0) I get for the most stations a valid result, but only by one I get an exception. I remember me, that Jürgen has fixed this problem with the null value in the response JSON in an unofficial version.
@Jürgen:
Right?
I think, we can publish, that the java version is important for the binding. If the exception is fixed in an official binding, I will used it. Until then, I use my private binding.
13:53:42.812 [DEBUG] [ig.internal.data.TankerkoenigService] - getTankerkoenigDetailResult jsonData : {“ok”:true,“license”:“CC BY 4.0 - https://creativecommons.tankerkoenig.de”,“data”:“MTS-K”,“status”:“ok”,“station”:{“id”:“b4d96bec-b357-439e-bc21-d0fddd8ef843”,“name”:“KESSELSDORF, SACHSENALLEE.”,“brand”:“Shell”,“street”:“SACHSENALLEE 1”,“houseNumber”:"",“postCode”:1723,“place”:“KESSELSDORF”,“openingTimes”:[{“text”:“t\u00e4glich”,“start”:“02:00:00”,“end”:“01:30:00”}],“overrides”:[],“wholeDay”:false,“isOpen”:true,“e5”:1.369,“e10”:null,“diesel”:1.209,“lat”:51.035035,“lng”:13.584056,“state”:null}}
13:53:42.826 [DEBUG] [.tankerkoenig.handler.StationHandler] - Caught exception in ScheduledExecutorService of TankerkoenigHandler. RuntimeExcetion: {}
java.lang.UnsupportedOperationException: JsonNull
at com.google.gson.JsonElement.getAsDouble(JsonElement.java:204)[10:com.google.gson:2.3.1]
at org.openhab.binding.tankerkoenig.internal.serializer.CustomTankerkoenigDetailResultDeserializer.deserialize(CustomTankerkoenigDetailResultDeserializer.java:41)[256:org.openhab.binding.tankerkoenig:2.1.0]
at org.openhab.binding.tankerkoenig.internal.serializer.CustomTankerkoenigDetailResultDeserializer.deserialize(CustomTankerkoenigDetailResultDeserializer.java:1)[256:org.openhab.binding.tankerkoenig:2.1.0]
at com.google.gson.TreeTypeAdapter.read(TreeTypeAdapter.java:58)[10:com.google.gson:2.3.1]
at com.google.gson.Gson.fromJson(Gson.java:810)[10:com.google.gson:2.3.1]
at com.google.gson.Gson.fromJson(Gson.java:775)[10:com.google.gson:2.3.1]
at com.google.gson.Gson.fromJson(Gson.java:724)[10:com.google.gson:2.3.1]
at com.google.gson.Gson.fromJson(Gson.java:696)[10:com.google.gson:2.3.1]
at org.openhab.binding.tankerkoenig.internal.data.TankerkoenigService.getTankerkoenigDetailResult(TankerkoenigService.java:92)[256:org.openhab.binding.tankerkoenig:2.1.0]
at org.openhab.binding.tankerkoenig.internal.data.TankerkoenigService.getStationDetailData(TankerkoenigService.java:48)[256:org.openhab.binding.tankerkoenig:2.1.0]
at org.openhab.binding.tankerkoenig.handler.StationHandler.updateDetailData(StationHandler.java:133)[256:org.openhab.binding.tankerkoenig:2.1.0]
at org.openhab.binding.tankerkoenig.handler.StationHandler$1.run(StationHandler.java:90)[256:org.openhab.binding.tankerkoenig:2.1.0]
at java.util.concurrent.Executors$RunnableAdapter.call(Executors.java:511)[:1.8.0_151]
at java.util.concurrent.FutureTask.runAndReset(FutureTask.java:308)[:1.8.0_151]
at java.util.concurrent.ScheduledThreadPoolExecutor$ScheduledFutureTask.access$301(ScheduledThreadPoolExecutor.java:180)[:1.8.0_151]
at java.util.concurrent.ScheduledThreadPoolExecutor$ScheduledFutureTask.run(ScheduledThreadPoolExecutor.java:294)[:1.8.0_151]
at java.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1149)[:1.8.0_151]
at java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:624)[:1.8.0_151]
at java.lang.Thread.run(Thread.java:748)[:1.8.0_151]