Windows OH2 Z-Wave Configuration Crash (SOLVED)

I performed a new OH2 installation on a Windows 10 machine a few days ago and got everything but the Z-Wave functionality installed. Every time I set the serial port in the PaperUI, OH2 crashes. I’ve tried switching out the built-in nrjavaserial to the add-on version, I’ve tried adding “-Dgnu.io.rxtx.SerialPorts=COM2” to my JAVA_OPTS parameters in the setenv.bat file. I’ve tested my Aeotec Z-Stick with the Aeon Labs utility and it works fine there and on my old linux with my previous openhab2 install. Any ideas?

events.log

2019-01-06 11:57:14.817 [hingStatusInfoChangedEvent] - 'zwave:serial_zstick:7eb2b32f' changed from UNINITIALIZED to INITIALIZING
2019-01-06 11:57:14.817 [hingStatusInfoChangedEvent] - 'zwave:serial_zstick:7eb2b32f' changed from INITIALIZING to OFFLINE (BRIDGE_OFFLINE): Controller is offline
2019-01-06 11:57:14.848 [hingStatusInfoChangedEvent] - 'zwave:serial_zstick:7eb2b32f' changed from OFFLINE (BRIDGE_OFFLINE): Controller is offline to OFFLINE (COMMUNICATION_ERROR): Serial Error: Port {0} does not exist

openhab.log

2019-01-06 11:56:50.744 [DEBUG] [org.openhab.binding.zwave           ] - BundleEvent [unknown:512] - org.openhab.binding.zwave
2019-01-06 11:56:50.760 [DEBUG] [org.openhab.binding.zwave           ] - ServiceEvent REGISTERED - {org.eclipse.smarthome.core.thing.binding.ThingHandlerFactory}={service.id=123, service.bundleid=218, service.scope=bundle, component.name=org.openhab.binding.zwave.internal.ZWaveHandlerFactory, component.id=12} - org.openhab.binding.zwave
2019-01-06 11:56:50.760 [DEBUG] [org.openhab.binding.zwave           ] - BundleEvent STARTING - org.openhab.binding.zwave
2019-01-06 11:56:50.760 [DEBUG] [inding.zwave.internal.ZWaveActivator] - Z-Wave binding started. Version 2.4.0
2019-01-06 11:56:50.775 [DEBUG] [org.openhab.binding.zwave           ] - BundleEvent STARTED - org.openhab.binding.zwave
2019-01-06 11:56:51.354 [INFO ] [panel.internal.HABPanelDashboardTile] - Started HABPanel at /habpanel
2019-01-06 11:56:51.479 [DEBUG] [org.openhab.binding.zwave           ] - ServiceEvent REGISTERED - {org.eclipse.smarthome.core.events.EventFactory}={service.id=170, service.bundleid=218, service.scope=bundle, component.name=org.openhab.binding.zwave.event.BindingEventFactory, component.id=15} - org.openhab.binding.zwave
2019-01-06 11:56:51.869 [DEBUG] [org.openhab.binding.zwave           ] - ServiceEvent REGISTERED - {org.eclipse.smarthome.config.core.ConfigDescriptionProvider, org.eclipse.smarthome.config.core.ConfigOptionProvider}={service.id=210, service.bundleid=218, service.scope=bundle, component.name=org.openhab.binding.zwave.internal.ZWaveConfigProvider, component.id=14} - org.openhab.binding.zwave
2019-01-06 11:56:56.510 [DEBUG] [ing.zwave.handler.ZWaveSerialHandler] - Initializing ZWave serial controller.
2019-01-06 11:56:56.510 [DEBUG] [zwave.handler.ZWaveControllerHandler] - Initializing ZWave Controller zwave:serial_zstick:7eb2b32f.
2019-01-06 11:56:56.510 [DEBUG] [zwave.handler.ZWaveControllerHandler] - Scheduling network mesh heal for 15 hours time.
2019-01-06 11:56:56.526 [INFO ] [ing.zwave.handler.ZWaveSerialHandler] - Connecting to serial port 'COM2'
2019-01-06 11:56:56.631 [DEBUG] [ing.zwave.handler.ZWaveSerialHandler] - Starting receive thread
2019-01-06 11:56:56.631 [INFO ] [ing.zwave.handler.ZWaveSerialHandler] - Serial port is initialized
2019-01-06 11:56:56.631 [DEBUG] [zwave.handler.ZWaveControllerHandler] - Initialising ZWave controller
2019-01-06 11:56:56.631 [DEBUG] [WaveSerialHandler$ZWaveReceiveThread] - Starting ZWave thread: Receive
2019-01-06 11:56:56.647 [INFO ] [ve.internal.protocol.ZWaveController] - Starting ZWave controller
2019-01-06 11:56:56.647 [DEBUG] [nal.protocol.ZWaveTransactionManager] - ZWaveReceiveThread queue empty
2019-01-06 11:56:56.647 [DEBUG] [nal.protocol.ZWaveTransactionManager] - Transaction SendNextMessage 0 out at start. Holdoff false.
2019-01-06 11:56:56.647 [INFO ] [ve.internal.protocol.ZWaveController] - ZWave timeout is set to 5000ms. Soft reset is false.
2019-01-06 11:56:56.647 [TRACE] [nal.protocol.ZWaveTransactionManager] - Transaction SendNextMessage nothing
2019-01-06 11:56:56.647 [DEBUG] [ve.internal.protocol.ZWaveController] - Event listener added.
2019-01-06 11:56:56.647 [DEBUG] [wave.discovery.ZWaveDiscoveryService] - Creating ZWave discovery service for zwave:serial_zstick:7eb2b32f with scan time of 30
2019-01-06 11:56:56.647 [DEBUG] [wave.discovery.ZWaveDiscoveryService] - ZWave discovery: Active zwave:serial_zstick:7eb2b32f
2019-01-06 11:56:56.647 [DEBUG] [org.openhab.binding.zwave           ] - ServiceEvent REGISTERED - {org.eclipse.smarthome.config.discovery.DiscoveryService}={service.id=311, service.bundleid=218, service.scope=singleton} - org.openhab.binding.zwave
2019-01-06 11:57:09.027 [DEBUG] [org.openhab.binding.zwave           ] - BundleEvent [unknown:512] - org.openhab.binding.zwave
2019-01-06 11:57:09.043 [DEBUG] [org.openhab.binding.zwave           ] - ServiceEvent REGISTERED - {org.eclipse.smarthome.core.thing.binding.ThingHandlerFactory}={service.id=127, service.bundleid=218, service.scope=bundle, component.name=org.openhab.binding.zwave.internal.ZWaveHandlerFactory, component.id=12} - org.openhab.binding.zwave
2019-01-06 11:57:09.043 [DEBUG] [org.openhab.binding.zwave           ] - BundleEvent STARTING - org.openhab.binding.zwave
2019-01-06 11:57:09.058 [DEBUG] [inding.zwave.internal.ZWaveActivator] - Z-Wave binding started. Version 2.4.0
2019-01-06 11:57:09.058 [DEBUG] [org.openhab.binding.zwave           ] - BundleEvent STARTED - org.openhab.binding.zwave
2019-01-06 11:57:09.638 [INFO ] [panel.internal.HABPanelDashboardTile] - Started HABPanel at /habpanel
2019-01-06 11:57:09.732 [DEBUG] [org.openhab.binding.zwave           ] - ServiceEvent REGISTERED - {org.eclipse.smarthome.core.events.EventFactory}={service.id=171, service.bundleid=218, service.scope=bundle, component.name=org.openhab.binding.zwave.event.BindingEventFactory, component.id=15} - org.openhab.binding.zwave
2019-01-06 11:57:09.763 [INFO ] [.core.internal.i18n.I18nProviderImpl] - Location set to '34.1827584,-79.86872319999999'.
2019-01-06 11:57:10.279 [DEBUG] [org.openhab.binding.zwave           ] - ServiceEvent REGISTERED - {org.eclipse.smarthome.config.core.ConfigDescriptionProvider, org.eclipse.smarthome.config.core.ConfigOptionProvider}={service.id=214, service.bundleid=218, service.scope=bundle, component.name=org.openhab.binding.zwave.internal.ZWaveConfigProvider, component.id=14} - org.openhab.binding.zwave
2019-01-06 11:57:14.817 [DEBUG] [ing.zwave.handler.ZWaveSerialHandler] - Initializing ZWave serial controller.
2019-01-06 11:57:14.817 [DEBUG] [zwave.handler.ZWaveControllerHandler] - Initializing ZWave Controller zwave:serial_zstick:7eb2b32f.
2019-01-06 11:57:14.817 [DEBUG] [zwave.handler.ZWaveControllerHandler] - Scheduling network mesh heal for 15 hours time.
2019-01-06 11:57:14.817 [INFO ] [ing.zwave.handler.ZWaveSerialHandler] - Connecting to serial port 'COM2'
2019-01-06 11:57:15.395 [ERROR] [ome.io.transport.serial.rxtx.rfc2217] - FrameworkEvent ERROR - org.eclipse.smarthome.io.transport.serial.rxtx.rfc2217
org.osgi.framework.BundleException: Could not resolve module: org.eclipse.smarthome.io.transport.serial.rxtx.rfc2217 [217]
  Unresolved requirement: Import-Package: gnu.io.rfc2217

	at org.eclipse.osgi.container.Module.start(Module.java:444) ~[?:?]
	at org.eclipse.osgi.container.ModuleContainer$ContainerStartLevel.incStartLevel(ModuleContainer.java:1634) ~[?:?]
	at org.eclipse.osgi.container.ModuleContainer$ContainerStartLevel.incStartLevel(ModuleContainer.java:1614) ~[?:?]
	at org.eclipse.osgi.container.ModuleContainer$ContainerStartLevel.doContainerStartLevel(ModuleContainer.java:1585) ~[?:?]
	at org.eclipse.osgi.container.ModuleContainer$ContainerStartLevel.dispatchEvent(ModuleContainer.java:1528) ~[?:?]
	at org.eclipse.osgi.container.ModuleContainer$ContainerStartLevel.dispatchEvent(ModuleContainer.java:1) ~[?:?]
	at org.eclipse.osgi.framework.eventmgr.EventManager.dispatchEvent(EventManager.java:230) [?:?]
	at org.eclipse.osgi.framework.eventmgr.EventManager$EventThread.run(EventManager.java:340) [?:?]

cmdline crash log

#
# A fatal error has been detected by the Java Runtime Environment:
#
#  EXCEPTION_ACCESS_VIOLATION (0xc0000005) at pc=0x000000006af4862e, pid=6164, tid=2652
#
# JRE version: OpenJDK Runtime Environment (11.0.1+13) (build 11.0.1+13-LTS)
# Java VM: OpenJDK 64-Bit Server VM (11.0.1+13-LTS, mixed mode, tiered, compressed oops, g1 gc, windows-amd64)
# Problematic frame:
# C  [libNRJavaSerial.dll+0x862e]
#
# No core dump will be written. Minidumps are not enabled by default on client versions of Windows
#
# An error report file with more information is saved as:
# C:\OpenHAB2\userdata\hs_err_pid6164.log
#
# If you would like to submit a bug report, please visit:
#   http://www.azulsystems.com/support/
# The crash happened outside the Java Virtual Machine in native code.
# See problematic frame for where to report the bug.
#

This means you have not installed the serial driver. Normally this is installed by default unless you are manually installing addons? You can try to install the serial binding though PaperUI - it should resolve this issue.

Unplugged the stick, installed the Serial Binding in PaperUI, shut down OH2, plugged the stick in, started OH2, crash… Not quite there yet.

events.log

2019-01-06 12:22:29.368 [thome.event.ExtensionEvent] - Extension 'binding-serial1' has been installed.
2019-01-06 12:25:32.582 [hingStatusInfoChangedEvent] - 'zwave:serial_zstick:7eb2b32f' changed from UNINITIALIZED to INITIALIZING
2019-01-06 12:25:32.582 [hingStatusInfoChangedEvent] - 'zwave:serial_zstick:7eb2b32f' changed from INITIALIZING to OFFLINE (BRIDGE_OFFLINE): Controller is offline
2019-01-06 12:25:32.709 [hingStatusInfoChangedEvent] - 'harmonyhub:device:HarmonyHub:49905763' changed from UNINITIALIZED to UNINITIALIZED (BRIDGE_UNINITIALIZED)

openhab.log

2019-01-06 12:25:26.706 [DEBUG] [org.openhab.binding.zwave           ] - BundleEvent [unknown:512] - org.openhab.binding.zwave
2019-01-06 12:25:26.722 [DEBUG] [org.openhab.binding.zwave           ] - ServiceEvent REGISTERED - {org.eclipse.smarthome.core.thing.binding.ThingHandlerFactory}={service.id=123, service.bundleid=218, service.scope=bundle, component.name=org.openhab.binding.zwave.internal.ZWaveHandlerFactory, component.id=12} - org.openhab.binding.zwave
2019-01-06 12:25:26.722 [DEBUG] [org.openhab.binding.zwave           ] - BundleEvent STARTING - org.openhab.binding.zwave
2019-01-06 12:25:26.722 [DEBUG] [inding.zwave.internal.ZWaveActivator] - Z-Wave binding started. Version 2.4.0
2019-01-06 12:25:26.722 [DEBUG] [org.openhab.binding.zwave           ] - BundleEvent STARTED - org.openhab.binding.zwave
2019-01-06 12:25:27.362 [INFO ] [panel.internal.HABPanelDashboardTile] - Started HABPanel at /habpanel
2019-01-06 12:25:27.472 [INFO ] [.core.internal.i18n.I18nProviderImpl] - Location set to '34.1827584,-79.86872319999999'.
2019-01-06 12:25:27.519 [DEBUG] [org.openhab.binding.zwave           ] - ServiceEvent REGISTERED - {org.eclipse.smarthome.core.events.EventFactory}={service.id=171, service.bundleid=218, service.scope=bundle, component.name=org.openhab.binding.zwave.event.BindingEventFactory, component.id=15} - org.openhab.binding.zwave
2019-01-06 12:25:27.909 [DEBUG] [org.openhab.binding.zwave           ] - ServiceEvent REGISTERED - {org.eclipse.smarthome.config.core.ConfigDescriptionProvider, org.eclipse.smarthome.config.core.ConfigOptionProvider}={service.id=210, service.bundleid=218, service.scope=bundle, component.name=org.openhab.binding.zwave.internal.ZWaveConfigProvider, component.id=14} - org.openhab.binding.zwave
2019-01-06 12:25:32.582 [DEBUG] [ing.zwave.handler.ZWaveSerialHandler] - Initializing ZWave serial controller.
2019-01-06 12:25:32.582 [DEBUG] [zwave.handler.ZWaveControllerHandler] - Initializing ZWave Controller zwave:serial_zstick:7eb2b32f.
2019-01-06 12:25:32.582 [DEBUG] [zwave.handler.ZWaveControllerHandler] - Scheduling network mesh heal for 14 hours time.
2019-01-06 12:25:32.582 [INFO ] [ing.zwave.handler.ZWaveSerialHandler] - Connecting to serial port 'COM2'
2019-01-06 12:25:32.693 [DEBUG] [ing.zwave.handler.ZWaveSerialHandler] - Starting receive thread
2019-01-06 12:25:32.693 [INFO ] [ing.zwave.handler.ZWaveSerialHandler] - Serial port is initialized
2019-01-06 12:25:32.693 [DEBUG] [WaveSerialHandler$ZWaveReceiveThread] - Starting ZWave thread: Receive
2019-01-06 12:25:32.693 [DEBUG] [zwave.handler.ZWaveControllerHandler] - Initialising ZWave controller
2019-01-06 12:25:32.709 [INFO ] [ve.internal.protocol.ZWaveController] - Starting ZWave controller
2019-01-06 12:25:32.709 [DEBUG] [nal.protocol.ZWaveTransactionManager] - ZWaveReceiveThread queue empty
2019-01-06 12:25:32.709 [INFO ] [ve.internal.protocol.ZWaveController] - ZWave timeout is set to 5000ms. Soft reset is false.
2019-01-06 12:25:32.709 [DEBUG] [nal.protocol.ZWaveTransactionManager] - Transaction SendNextMessage 0 out at start. Holdoff false.
2019-01-06 12:25:32.709 [TRACE] [nal.protocol.ZWaveTransactionManager] - Transaction SendNextMessage nothing
2019-01-06 12:25:32.709 [DEBUG] [ve.internal.protocol.ZWaveController] - Event listener added.
2019-01-06 12:25:32.709 [DEBUG] [wave.discovery.ZWaveDiscoveryService] - Creating ZWave discovery service for zwave:serial_zstick:7eb2b32f with scan time of 30
2019-01-06 12:25:32.709 [DEBUG] [wave.discovery.ZWaveDiscoveryService] - ZWave discovery: Active zwave:serial_zstick:7eb2b32f
2019-01-06 12:25:32.709 [DEBUG] [org.openhab.binding.zwave           ] - ServiceEvent REGISTERED - {org.eclipse.smarthome.config.discovery.DiscoveryService}={service.id=311, service.bundleid=218, service.scope=singleton} - org.openhab.binding.zwave

cmdline crash log

#
# A fatal error has been detected by the Java Runtime Environment:
#
#  EXCEPTION_ACCESS_VIOLATION (0xc0000005) at pc=0x000000006af4862e, pid=396, tid=5480
#
# JRE version: OpenJDK Runtime Environment (11.0.1+13) (build 11.0.1+13-LTS)
# Java VM: OpenJDK 64-Bit Server VM (11.0.1+13-LTS, mixed mode, tiered, compressed oops, g1 gc, windows-amd64)
# Problematic frame:
# C  [libNRJavaSerial.dll+0x862e]
#
# No core dump will be written. Minidumps are not enabled by default on client versions of Windows
#
# An error report file with more information is saved as:
# C:\OpenHAB2\userdata\hs_err_pid396.log
#
# If you would like to submit a bug report, please visit:
#   http://www.azulsystems.com/support/
# The crash happened outside the Java Virtual Machine in native code.
# See problematic frame for where to report the bug.
#

Please read the prerequisites for openHAB regarding java version:

I have Zulu JDK installed per the recommendation. Are you saying that I need to downgrade my installation to OpenJDK 8 instead of OpenJDK11?

I have no idea if that solves your problem, but as you do not fulfil the prerequisites, I suggest to downgrade, yes.

Wow, I installed OpenJDK 8 and reset the JAVA_HOME parameter to the JDK 8 directory, restarted OH2 and if, by some arcane magic, it all works! Dude, that was a winner!.

1 Like

openHAB is not yet Java11 ready :slight_smile: but the maintainers are working hard on that issue…

I had the same problem and this worked great. thanks for the post :slight_smile: