1

I am trying to use smslib to send an sms. It works fine on windows but now I need to get it working under ubuntu 11.10. So I installed rxtx for a 64 bit os from here http://www.cloudhopper.com/opensource/rxtx/. Connected the mobile phones using usb which has been detected as /dev/ttyACM0 which I linked to /dev/ttyS32 (a free serial port). Then I try to run the program and I am getting the following error:

# A fatal error has been detected by the Java Runtime Environment:
#
#  SIGSEGV (0xb) at pc=0x00007f44f9a065da, pid=8875, tid=139934227818240
#
# JRE version: 7.0_147-b147
# Java VM: OpenJDK 64-Bit Server VM (21.0-b17 mixed mode linux-amd64 compressed oops)
# Derivative: IcedTea7 2.0
# Distribution: Ubuntu 11.10, package 7~b147-2.0-0ubuntu0.11.10.1
# Problematic frame:
# C  [librxtxSerial.so+0x75da]  Java_gnu_io_RXTXPort_nativeDrain+0xea
#
# Failed to write core dump. Core dumps have been disabled. To enable core dumping, try "ulimit -c unlimited" before starting Java again
#
# An error report file with more information is saved as:
# /home/radek/NetBeansProjects/sms/hs_err_pid8875.log
#
# If you would like to submit a bug report, please include
# instructions on how to reproduce the bug and visit:
#   https://bugs.launchpad.net/ubuntu/+source/openjdk-7/
#
Java Result: 134

I have no idea how to tackle this.

Radek
  • 1,403
  • 3
  • 25
  • 54

4 Answers4

3

I had similar problem on my ubuntu 11.10 64bit edition.

Problem was because I installed RXTX manually and it was incompatible with my architecture. I re-installed RXTX using

sudo apt-get install librxtx-java

and now it works. I hope this helps.

dino.keco
  • 1,401
  • 1
  • 12
  • 18
2

rxtx-java reportedly will crash with openjdk 7 on Ubuntu 64bit. I'm also getting the same with above said configuration (12.04LTS)

read here https://lists.launchpad.net/openjdk/msg08527.html

saif
  • 93
  • 7
1

I installed a newer version and it's working fine now.

Radek
  • 1,403
  • 3
  • 25
  • 54
0

Download the updated version on the site: http://jlog.org/rxtx-lin.html

"Download 'RXTXcomm.jar' and install it in the 'lib/ext' folder of the Java VM (e.g. for Ubuntu 11.04: '/usr/lib/jvm/java-6-sun-1.6.0.26/jre' and for RH9 with Sun's Java 1.6.0_04: '/usr/java/j2re1.6.0_04/lib/ext'). You may need to download the file to a temporary location (e.g. Desktop) and use a privileged command (or sudo from the command/terminal) to move it to the destination.

If you are upgrading from V 3.x or V4 Beta 2 (i.e. from an older version of RXTX), please remove the file 'librxtxSerial-2.1-x.so' in the '/lib/386' folder (or equivalent).

Download 'librxtxSerial.so' and install it in the 'lib/i386' or 'lib/amd64' folder of the Java VM (e.g. for Ubuntu 11.04: '/usr/lib/jvm/java-6-sun-1.6.0.26/jre' and for RH9 with Sun's Java 1.6.0_04: '/usr/java/j2re1.6.0_04/lib/i386'). Try the 'bin' folder for this file if the 'lib/i386' is not found (e.g. for IBM's Java 1.4.x). Make sure that 'librxtxSerial' has execute permissions for all. You may need to download the file to a temporary location (e.g. Desktop) and use a privileged command (or sudo from the command/terminal) to move it to the destination.

You may need to Log in as 'root' and add your jLog user to the group owning the '/var/lock' directory and the group owning the serial port (e.g. /dev/ttyS0) to be used. This is not needed for Ubuntu 11.04.

This would typically (e.g. for Red Hat 9 and Fedora Core) be users 'lock' and 'uucp' respectively.

Try running jLog as root if you experience problems, i.e. to find out if the problem is caused by improper access or improper installation of the files."

Clairton Luz
  • 2,116
  • 19
  • 15