Ubuntu 9.04 gnu.io.RXTXCommDriver problem

xens's picture

I've got a problem with BT747 and ubuntu 9.04 (tested with different versions),

When I connect the GPS using the "bluetooth" button I've got the following errors:

java.lang.UnsatisfiedLinkError: no rxtxSerial in java.library.path thrown while loading gnu.io.RXTXCommDriver
java.lang.UnsatisfiedLinkError: no rxtxSerial in java.library.path
at java.lang.ClassLoader.loadLibrary(ClassLoader.java:1709)
at java.lang.Runtime.loadLibrary0(Runtime.java:823)
at java.lang.System.loadLibrary(System.java:1030)
at gnu.io.CommPortIdentifier.(CommPortIdentifier.java:83)
at gps.connection.GPSRxTxPort.openPort(Unknown Source)
at gps.connection.GPSrxtx.setBluetoothAndOpen(Unknown Source)
at bt747.model.Controller.setBluetooth(Unknown Source)
at bt747.waba_view.GPSconctrl.GPS_setChannel(Unknown Source)
at bt747.waba_view.GPSconctrl.onEvent(Unknown Source)
at waba.ui.Control.postEvent(Control.java:611)
at waba.ui.Button.onEvent(Button.java:203)
at waba.ui.Control.postEvent(Control.java:611)
at waba.ui.Window._postEvent(Window.java:574)
at waba.applet.SWEventThread.handleOneEvent(SWEventThread.java:84)
at waba.applet.SWEventThread.run(SWEventThread.java:48)
at java.lang.Thread.run(Thread.java:619)

With older versions of ubuntu it works fine. (my device is under /dev/ttyUSB0 and using sun jre 6.0)


mdeweerd's picture

Could be wrong 'native library' path.

The startup script for BT747 (run_j2se.sh) tries to select the best location for the 'RXTXcomm.jar' and the native libs.

In your case, the RXTXcomm.jar is found, because 'gnu.io.CommPortIdentifier' seems to be found.
The problem probably lies with the native library. If 'RXTXcomm.jar' is found in the system installation (/usr/share/java) then the native libraries are expected in '/usr/lib'. The latter location could be wrong.

Otherwise the scripts selects one of the directories in 'lib/rxtx-2.1-7-bins-r2/Linux' from the installation. That could be wrong too.

I suppose that you did not try the webstart (althought that might not be working, but it does not rely on the system RXTX library at all).

My suggestion is to change the first line of 'run_j2se.sh' to '#/bin/sh -vx' to find out what paths are set up.
To dig further, you can start java as indicated in that script by prepending strace:

strace -e trace=file -f -o trace.log $JAVA $MEM_HEAP_OPTION ...

Report whatever you find usefull either here or on my mail address (in the application under the 'About' text).

you were right, a second time... :)

Ok according to run_rxtx.sh: if [ -e /usr/share/java/RXTXcomm.jar ]

this file was on my system, so as you said I modified the startup script and used the RXTXcomm.jar bundled with BT747 and now it works fine.

If you need more info you can contact me: r dot aviolat at gmail dot com

Thanks for your help and this great software :)


I had also the same problem running run_j2se.sh, it was the same problem

mdeweerd's picture

Hi As

As /usr/share/java/RXTXcomm.jar is on your system, it would be nice to know where 'librxtxSerial.so' is located on the system. That way I can update the script to check that location and point the appropriate environment variable over there.

If this is unanswered please

If this is unanswered please find for future reference.

$ yum -y install rxtx

$ ll /usr/lib/rxtx

total 132

-rwxr-xr-x 1 root root 19792 Jul 15 13:29 librxtxI2C-2.2pre1.so

lrwxrwxrwx 1 root root    21 Oct 31 20:29 librxtxI2C.so -> librxtxI2C-2.2pre1.so

-rwxr-xr-x 1 root root 11748 Jul 15 13:29 librxtxParallel-2.2pre1.so

lrwxrwxrwx 1 root root    26 Oct 31 20:29 librxtxParallel.so -> librxtxParallel-2.2pre1.so

-rwxr-xr-x 1 root root 19940 Jul 15 13:29 librxtxRaw-2.2pre1.so

lrwxrwxrwx 1 root root    21 Oct 31 20:29 librxtxRaw.so -> librxtxRaw-2.2pre1.so

-rwxr-xr-x 1 root root 20352 Jul 15 13:29 librxtxRS485-2.2pre1.so

lrwxrwxrwx 1 root root    23 Oct 31 20:29 librxtxRS485.so -> librxtxRS485-2.2pre1.so

-rwxr-xr-x 1 root root 58040 Jul 15 13:29 librxtxSerial-2.2pre1.so

lrwxrwxrwx 1 root root    24 Oct 31 20:29 librxtxSerial.so -> librxtxSerial-2.2pre1.so