XBee Java Issues

Hi, I am trying to use the Java API however I’ve faced several issues.
Using the latest release v1.3.2, code compiles however crashed with warning:

Summary

Jun 29, 2025 6:31:00 PM com.digi.xbee.api.AbstractXBeeDevice open
INFO: [COM9 - 9600/8/N/1/N] Opening the connection interface…
WARNING: RXTX Version mismatch
Jar version = RXTX-2.2pre1
native lib Version = RXTX-2.2pre2
Jun 29, 2025 6:31:01 PM com.digi.xbee.api.AbstractXBeeDevice open
INFO: [COM9 - 9600/8/N/1/N] Connection interface open.

A fatal error has been detected by the Java Runtime Environment:

EXCEPTION_ACCESS_VIOLATION (0xc0000005) at pc=0x00000001800044cb, pid=2924, tid=15492

JRE version: OpenJDK Runtime Environment Zulu17.58+21-CA (17.0.15+6) (build 17.0.15+6-LTS)

Java VM: OpenJDK 64-Bit Server VM Zulu17.58+21-CA (17.0.15+6-LTS, mixed mode, sharing, tiered, compressed oops, compressed class ptrs, g1 gc, windows-amd64)

Problematic frame:

C 0x00000001800044cb

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:

[thread 3936 also had an error]

If you would like to submit a bug report, please visit:

Customer Support for Platform Core & Platform Prime | Azul

The crash happened outside the Java Virtual Machine in native code.

See problematic frame for where to report the bug.

Process finished with exit code 1

I found the matching version on the internet somewhere and the warning disappeared, however the crashing issue is not being resolved.

I’ve tried JDK 8, 17, and 21 and same issues, Windows 10, IntelliJ.

Thanks in advance.

[quote=“Thomas7414, post:1, topic:37301”]
Jun 29, 2025 6:31:00 PM com.digi.xbee.api.AbstractXBeeDevice open
INFO: [COM9 - 9600/8/N/1/N] Opening the connection interface…
WARNING: RXTX Version mismatch
Jar version = RXTX-2.2pre1
native lib Version = RXTX-2.2pre2
Jun 29, 2025 6:31:01 PM com.digi.xbee.api.AbstractXBeeDevice open
INFO: [COM9 - 9600/8/N/1/N] Connection interface open.

A fatal error has been detected by the Java Runtime Environment:

EXCEPTION_ACCESS_VIOLATION (0xc0000005) at pc=0x00000001800044cb, pid=2924, tid=15492

JRE version: OpenJDK Runtime Environment Zulu17.58+21-CA (17.0.15+6) (build 17.0.15+6-LTS)

Java VM: OpenJDK 64-Bit Server VM Zulu17.58+21-CA (17.0.15+6-LTS, mixed mode, sharing, tiered, compressed oops, compressed class ptrs, g1 gc, windows-amd64)

Problematic frame:

C 0x00000001800044cb

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:

[thread 3936 also had an error]

If you would like to submit a bug report, please visit:

Customer Support for Platform Core & Platform Prime | Azul

The crash happened outside the Java Virtual Machine in native code.

See problematic frame for where to report the bug.

Process finished with exit code 1
[/quote] doing a quick search indicates that the .jar file (RXTXcom.jar and the native .dll (rxtxSerial.dll) are not from the same release.

The best way to address this is to replace both files with a trusted source or from the Digi SDK.

Hello, thank you for the reply.
I got all the library files from
GitHub - digidotcom/xbee-java: Set of Java APIs to interact with Digi International's XBee radio frequency modules. Release XBee Java Library v1.3.2
and had tested on a clean device, the same issue occurs.

I have to replace the rxtxSerial.dll to an older version (I can’t find the exact matching version), from XBee Java Library v1.0.0, November 2014.

The warning persists but now the program no longer crashes.

Thanks.

Just did a bit more testing today, I noticed that I cannot call open on an xbee device (XBeeDevice#open), otherwise it terminates without any errors.
This is the log, tested on both the example projects on the official github and my own project:

            XBeeDevice xbee = new XBeeDevice("COM3", 9600);
            xbee.open();
WARNING:  RXTX Version mismatch
	Jar version = RXTX-2.2pre1
	native lib Version = RXTX-2.2 (CVS snapshot 2011.02.03, modified by CMU CREATE Lab, http://code.google.com/p/create-lab-commons/)
Jul 24, 2025 4:06:42 PM com.digi.xbee.api.AbstractXBeeDevice open
INFO: [COM3 - 9600/8/N/1/N] Opening the connection interface...
Jul 24, 2025 4:06:42 PM com.digi.xbee.api.AbstractXBeeDevice open
INFO: [COM3 - 9600/8/N/1/N] Connection interface open.

Process finished with exit code -1073741571 (0xC00000FD)