Hello i got this Error message after i try to run ./start_debug.sh for my optolink adapter.
How can i solve the “RXTX Version mismatch” Error?
Thank you.
Native lib Version = RXTX-2.2pre2
Java lib Version = RXTX-2.1-7
WARNING: RXTX Version mismatch
Jar version = RXTX-2.1-7
native lib Version = RXTX-2.2pre2
RXTX fhs_lock() Error: creating lock file: /var/lock/LCK..ttyAMA0: Die Datei e10:25:49.040 [main] ERROR de.myandres.optolink.Main main - Something is wrong not init
gnu.io.NoSuchPortException: null
at gnu.io.CommPortIdentifier.getPortIdentifier(CommPortIdentifier.java:218) ~[optolink-jar-with-dependencies.jar:na]
at de.myandres.optolink.OptolinkInterface.<init>(OptolinkInterface.java:44) ~[optolink-jar-with-dependencies.jar:na]
at de.myandres.optolink.Main.main(Main.java:39) ~[optolink-jar-with-dependencies.jar:na]
Exception in thread "main" java.lang.NullPointerException
at de.myandres.optolink.Main.main(Main.java:46)
java.lang.UnsatisfiedLinkError: no rxtxSerial in java.library.path thrown while loading gnu.io.RXTXCommDriver
Exception in thread “main” java.lang.UnsatisfiedLinkError: no rxtxSerial in java.library.path
i copy librxtxSerial-2.2pre1.so back and now i got this error massage
OpenJDK Client VM warning: You have loaded library /usr/lib/jni/librxtxSerial-2.2pre1.so which might have disabled stack guard. The VM will try to fix the stack guard now.
It’s highly recommended that you fix the library with ‘execstack -c <libfile>’, or link it with ‘-z noexecstack’.
java.lang.UnsatisfiedLinkError: /usr/lib/jni/librxtxSerial-2.2pre1.so: /usr/lib/jni/librxtxSerial-2.2pre1.so: falsche ELF-Klasse: ELFCLASS64 (Possible cause: architecture word width mismatch) thrown while loading gnu.io.RXTXCommDriver
Exception in thread “main” java.lang.UnsatisfiedLinkError: /usr/lib/jni/librxtxSerial-2.2pre1.so: /usr/lib/jni/librxtxSerial-2.2pre1.so: falsche ELF-Klasse: ELFCLASS64 (Possible cause: architecture word width mismatch)
What is OH running on and what version of java is installed? Looking above that message usually pops up when using 64-bit JVM on ARM platform. If thats the case you will need to install the 32-bit version of the JVM for ARM platforms.
now i delete the hole pages with apt-get purge librxtx-java and reinstall it again apt-get install librxtx-java.
Now i am the beginning with the same warning:
Native lib Version = RXTX-2.2pre2
Java lib Version = RXTX-2.1-7
WARNING: RXTX Version mismatch
Jar version = RXTX-2.1-7
native lib Version = RXTX-2.2pre2
RXTX Warning: Removing stale lock file. /var/lock/LCK…ttyAMA0
i leave it with your parameter and after a restart i got this message:
Native lib Version = RXTX-2.2pre2
Java lib Version = RXTX-2.1-7
WARNING: RXTX Version mismatch
Jar version = RXTX-2.1-7
native lib Version = RXTX-2.2pre2
RXTX fhs_lock() Error: creating lock file: /var/lock/LCK…ttyAMA0: Die Datei e17:08:06.738 [main] ERROR de.myandres.optolink.Main main - Something is wrong not init
Add or replace with this in extra java opts. Seems there was a bug fix and this worked, just not sure when. Its worth a try
-Dgnu.io.rxtx.NoVersionOutput=true
I also noticed this on the link you provided…Unless you have any specific reasons, this is the recommended download. If you need to be compatible with javax.comm.* then download RXTX 2.0. Not sure what javax.comm is, maybe it means generic?
See if this works but keep in mind that a restart will recreate the run/lock. If this does work let me know and we can make a config change to keep these settings permanently.