This discussion is archived
5 Replies Latest reply: Apr 9, 2011 4:04 PM by EJP RSS

javax.comm -- completely lost

853363 Newbie
Currently Being Moderated
I am trying to write a GUI using netbeans 6.9.1 that can read and write information to a com serial port, but I keep getting some very strange errors. This is my first time using the javax.comm so I think the problem might have to do with the location of my .jar and .so files.

The error I'm running into right now goes somthing like this:

java.lang.UnsatisfiedLinkError: /usr/jdk1.6.0_24/jre/lib/i386/libSerial.so:
/usr/jdk1.6.0_24/jre/lib/i386/libSerial.so: ELF file data encoding not little-endian (Possible cause: endianness mismatch)
at java.lang.ClassLoader$NativeLibrary.load(Native Method)
at java.lang.ClassLoader.loadLibrary0(ClassLoader.java:1803)
at java.lang.ClassLoader.loadLibrary(ClassLoader.java:1720)
at java.lang.Runtime.loadLibrary0(Runtime.java:823)
at java.lang.System.loadLibrary(System.java:1028)
at gnu.io.RXTXCommDriver.<clinit>(RXTXCommDriver.java)
at java.lang.Class.forName0(Native Method)
at java.lang.Class.forName(Class.java:169)
at javax.comm.CommPortIdentifier.loadDriver(CommPortIdentifier.java:237)
at javax.comm.CommPortIdentifier.<clinit>(CommPortIdentifier.java:109)
at comtogui.Main.main(Main.java:8)
Exception in thread "main" java.lang.UnsatisfiedLinkError: com.sun.comm.SunrayInfo.isSessionActive()Z
at com.sun.comm.SunrayInfo.isSessionActive(Native Method)
at com.sun.comm.Portmapping.registerCommPorts(Portmapping.java:155)
at com.sun.comm.Portmapping.refreshPortDatabase(Portmapping.java:100)
at javax.comm.CommPortIdentifier.<clinit>(CommPortIdentifier.java:138)
at comtogui.Main.main(Main.java:8)
Java Result: 1


Just some info that might help:
I'm using Linux OS (ubuntu 32 bit)
I have linux installed in windows vista (I read on another forum that javax.comm only works with linux so i installed it while running vista)
I'm not at all sure that any of the required files are in the right place. I've tried moving the jar and .so files to fix errors as the show up.
Also, the com serial port is a USB/Serial converter. Although its usb, its sending data just as a serial port and I have used tera term to verify that.
  • 1. Re: javax.comm -- completely lost
    tschodt Pro
    Currently Being Moderated
    Brock SVB wrote:
    java.lang.UnsatisfiedLinkError: /usr/jdk1.6.0_24/jre/lib/i386/libSerial.so:
    /usr/jdk1.6.0_24/jre/lib/i386/libSerial.so: ELF file data encoding not little-endian (Possible cause: endianness mismatch)
    endianness mismatch:
    libSerial.so is big-endian and you are trying to use it in a little-endian context.

    or possibly a 32-bit/64-bit mismatch but the loader detection did not identify it as such.

    What CPU do you have?
    The javax.comm library you are trying to use is intended for what CPU?
    I'm using Linux OS (ubuntu 32 bit)
    I have linux installed in windows vista (I read on another forum that javax.comm only works with linux so i installed it while running vista)
    Not sure what you are trying to say there.
  • 2. Re: javax.comm -- completely lost
    853363 Newbie
    Currently Being Moderated
    Im using an AMD Turion x2 64 bit processor
    I have linux installed in windows vista (I read on another forum that javax.comm only works with linux so i installed it while running vista)
    Not sure what you are trying to say there.
    This was just some info i thought might help.
  • 3. Re: javax.comm -- completely lost
    EJP Guru
    Currently Being Moderated
    The .so file you are trying to use doesn't match your hardware.
  • 4. Re: javax.comm -- completely lost
    853363 Newbie
    Currently Being Moderated
    EJP wrote:
    The .so file you are trying to use doesn't match your hardware.
    Even though I'm running it on a 32bit version of linux?
  • 5. Re: javax.comm -- completely lost
    EJP Guru
    Currently Being Moderated
    Hardware. Processor. CPU. Not just the number of bits. See the error message.

Legend

  • Correct Answers - 10 points
  • Helpful Answers - 5 points