After update from java 8.0.251 to java 8.0.261 OpenHAB 2.5.x crashes while accessing my zwave-usb-stick. when i disable the zwave-serial-controller-thin, everthing is fine (but zwave).
when i activate it again, then java generates an execption.
now i have downgraded my machine back to java 8.0.251 - now its working again. it seems to be a breaking change in the jre-environment for the zwave-binding 2.5.6…
It might help if you provide the information about the exception?
I don’t think there were any changes. The serial library is not part of the binding - it’s part of OH. I suspect there’s possibly an issue with your configuration - if it was really a breaking change in 2.5.6 (which was released a month or so ago) I think others would also have reported this.
the problem comes with change of the jre - not with change of OH or the binding.
in the oh-log i can see following:
2020-07-17 22:20:30.293 [INFO ] [zwave.handler.ZWaveControllerHandler] - Attempting to add listener when controller is null
2020-07-17 22:20:44.026 [WARN ] [mmon.WrappedScheduledExecutorService] - Scheduled runnable ended with an exception:
java.lang.NullPointerException: null
at org.openhab.binding.zwave.discovery.ZWaveDiscoveryService$1.run(ZWaveDiscoveryService.java:87) ~[?:?]
at java.util.concurrent.Executors$RunnableAdapter.call(Unknown Source) ~[?:1.8.0_261]
at java.util.concurrent.FutureTask.run(Unknown Source) ~[?:1.8.0_261]
at java.util.concurrent.ScheduledThreadPoolExecutor$ScheduledFutureTask.access$201(Unknown Source) ~[?:1.8.0_261]
at java.util.concurrent.ScheduledThreadPoolExecutor$ScheduledFutureTask.run(Unknown Source) ~[?:1.8.0_261]
at java.util.concurrent.ThreadPoolExecutor.runWorker(Unknown Source) [?:1.8.0_261]
at java.util.concurrent.ThreadPoolExecutor$Worker.run(Unknown Source) [?:1.8.0_261]
at java.lang.Thread.run(Unknown Source) [?:1.8.0_261]
2020-07-17 22:21:25.522 [INFO ] [zwave.handler.ZWaveControllerHandler] - Attempting to add listener when controller is null
2020-07-17 22:21:31.147 [INFO ] [ve.internal.protocol.ZWaveController] - Starting ZWave controller
2020-07-17 22:21:31.148 [INFO ] [ve.internal.protocol.ZWaveController] - ZWave timeout is set to 5000ms. Soft reset is false.
The exception in the memory dump is ERROR 0x000005 (Access violation)
now i can not reproduce it, because i have downgraded to java 8_0_251 again.
I doubt that there is an incompatibility with the ZWave binding and the JRE though - really - it’s very unlikely.
I think that probably there is an issue with configuration. This is a simple NPE - something isn’t right, but it’s not an issue with the JRE. I’d really need to see a full debug log to see what was happening though.
Can confirm exact same experience on a fresh install of OpenHAB on Win 10 Pro x64. Installed latest java (261) and get exception_access_violation when trying to use z-stick. Downgraded to 251 and now have no issues at all.
ok, i am not alone with this error. it seems to be an global issue with the zwave-binding and the newest jre-version of windows.
is somebody of the binding-developers able to take a look at this ?
i think, this should be fixed because in the next time more people will update their java-installations…
I agree - the error may not be in the serial driver - it could be the JRE, and my comment is only based on what I see in the debug posted above. It shows that the error is thrown in the serial driver - the issue could be in the JRE - or the serial driver though, but it doesn’t seem to be something in the binding that I can do anything about.
OpenHAB uses a serial driver to communicate with all devices - this is what I’m talking about. Under this there may be other OS specific drivers possibly, but that’s another issue and not related to the uzb driver - I’m not even sure if that is used.
I also have had a similar experience. Installed OpenHab on a windows 10 machine using a 64-bit jdk. Exactly the same crash symptoms. I tried numerous versions of the 64-bit java environment provided by AdoptOpenJDK, all failed in a similar fashion. I finally got the idea of using a 32-bit version of Java. It solved the problem.