• Status: Solved
  • Priority: Medium
  • Security: Public
  • Views: 1150
  • Last Modified:

RXTX Comm Library Problem on Mandriva Linux

I have an Application that I got from callerid.com that is supposed to listen to the comm port and basically tell me the
phone numbers coming across my blackbox.  I got the program working in Windows which does me no good whatsoever except to tell me the jar file works.  I am really trying to get it to work under Mandriva Linux.  I have tried every avenue to insall the RXTX and Commapi but to no avail I started with a few different errors I am pretty sure that once this error is solved it will work.  it seems like a permissions problem but I've granted permissions to EVERYONE on ttyS0 but it still won't work... any help??

java.io.IOException: Error instantiating class gnu.io.RXTXCommDriver
gnu.io.RXTXCommDriver
        at javax.comm.CommPortIdentifier.loadDriver(CommPortIdentifier.java:239)
        at javax.comm.CommPortIdentifier.<clinit>(CommPortIdentifier.java:109)
        at SerialConnection.openConnection(SerialConnection.java:92)
        at WCListener.<init>(WCListener.java:137)
        at WCListener.main(WCListener.java:49)
Exception in thread "main" java.lang.UnsatisfiedLinkError: isSessionActive
        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 SerialConnection.openConnection(SerialConnection.java:92)
        at WCListener.<init>(WCListener.java:137)
        at WCListener.main(WCListener.java:49)

Thanks In advance
Stephen
0
scogger1974
Asked:
scogger1974
  • 11
  • 5
  • 5
  • +1
1 Solution
 
CEHJCommented:
Looks more like a native linking error to me. Are you sure you have all the binaries installed properly and loadable?
0
 
scogger1974Author Commented:
I have read the documentation several times and re-attemped several times to install the binaries.  it seems that I get different errors when I don't have the binaries in place so I'm not sure if thats it.   I really just don't know what to put where..  I have info for install on SUSE using jre1.4  and thats about it.  I followed that to the letter including changing permissions and setting the CLASSPATH and making the javax.comm.properties file.  still to no avail
0
 
Mayank SAssociate Director - Product EngineeringCommented:
>> Exception in thread "main" java.lang.UnsatisfiedLinkError: isSessionActive

The DLL has to be present in one of the directories mentioned in "java.library.path". Try putting it in your Windows
System32 folder.
0
Independent Software Vendors: We Want Your Opinion

We value your feedback.

Take our survey and automatically be enter to win anyone of the following:
Yeti Cooler, Amazon eGift Card, and Movie eGift Card!

 
scogger1974Author Commented:
Well Since it works on Windows already I don't think that will do anything for Linux
0
 
Mayank SAssociate Director - Product EngineeringCommented:
Oh sorry forgot to read that. Can you print the value of java.library.path using System.getProperty ()?
0
 
scogger1974Author Commented:
This is whats returned.
System is running: /usr/java/jre1.5.0_06/lib/i386/client:/usr/java/jre1.5.0_06/lib/i386:/usr/java/jre1.5.0_06/../lib/i386
0
 
Mayank SAssociate Director - Product EngineeringCommented:
>> /usr/java/jre1.5.0_06/lib/i386/client

Put the DLL there
0
 
scogger1974Author Commented:
you mean the .so files from the commapi?
0
 
Mayank SAssociate Director - Product EngineeringCommented:
Damn, too used to DLL ;-) yeah you are right
0
 
scogger1974Author Commented:
Ok done I still get the same error However I get something new above the error

Experimental:  JNI_OnLoad called.
Stable Library
=========================================
Native lib Version = RXTX-2.1-7
Java lib Version   = RXTX-2.1-7

java.io.IOException: Error instantiating class gnu.io.RXTXCommDriver
gnu.io.RXTXCommDriver
        at javax.comm.CommPortIdentifier.loadDriver(CommPortIdentifier.java:239)
        at javax.comm.CommPortIdentifier.<clinit>(CommPortIdentifier.java:109)
        at SerialConnection.openConnection(SerialConnection.java:92)
        at WCListener.<init>(WCListener.java:139)
        at WCListener.main(WCListener.java:51)
Exception in thread "main" java.lang.UnsatisfiedLinkError: isSessionActive
        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 SerialConnection.openConnection(SerialConnection.java:92)
        at WCListener.<init>(WCListener.java:139)
        at WCListener.main(WCListener.java:51)
0
 
Mayank SAssociate Director - Product EngineeringCommented:
Not sure, my guess is some files are still missing and need to be added to that directory.
0
 
scogger1974Author Commented:
I've tried multiple versions of everything to no avail. I've put every file in every java folder there is ... .. just in case even put the jar in those folders and executed from there... nothing has worked yet
0
 
CEHJCommented:
0
 
scogger1974Author Commented:
I know that site I've followed those instructions completely several times..
thanks though
0
 
scogger1974Author Commented:
Its obvious that the program is seeing the drivers.  the error is really saying it cannot create the object for the driver thats why originally i thought it may be a permissions problem.  need help..

Thanks
0
 
scogger1974Author Commented:
here is exactly what happens
I run the command

[root@localhost administrator]# /usr/java/jre1.5.0_06/bin/java -jar /bak/WCL.jar -s -p /dev/ttyS0

which tells it to be a Server and the port address

Output:
System is running: /usr/java/jre1.5.0_06/lib/i386/client:/usr/java/jre1.5.0_06/lib/i386:/usr/java/jre1.5.0_06/../lib/i386
SETTING PROGRAM FOR SERVER MODE

Experimental:  JNI_OnLoad called.
Stable Library
=========================================
Native lib Version = RXTX-2.1-7
Java lib Version   = RXTX-2.1-7

java.io.IOException: Error instantiating class gnu.io.RXTXCommDriver
gnu.io.RXTXCommDriver
        at javax.comm.CommPortIdentifier.loadDriver(CommPortIdentifier.java:239)
        at javax.comm.CommPortIdentifier.<clinit>(CommPortIdentifier.java:109)
        at SerialConnection.openConnection(SerialConnection.java:92)
        at WCListener.<init>(WCListener.java:139)
        at WCListener.main(WCListener.java:51)
Exception in thread "main" java.lang.UnsatisfiedLinkError: isSessionActive
        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 SerialConnection.openConnection(SerialConnection.java:92)
        at WCListener.<init>(WCListener.java:139)
        at WCListener.main(WCListener.java:51)

cannot find any references to this error online ...
0
 
CEHJCommented:
What does

ls -l $( locate gnu.io.RXTXCommDriver )

give you? You may have to run

# updatedb
0
 
CEHJCommented:
Sorry - forget that, although you could run


ls -l $(  /bak/WCL.jar )
0
 
CEHJCommented:
Forget that too - sorry i'm getting distracted as i have to go out ;-)
0
 
scogger1974Author Commented:
n/p
I am getting this error btw on all the examples I have from the javax package that I installed.  so its not just this app
0
 
objectsCommented:
Looks like the shared lib it finds does not contain a native method it expects to be there.
0
 
scogger1974Author Commented:
Thats exactly what the problem is.  You cannot use the same code as you do for windows in the java program as you would for linux Finally realized that after sleeping on it last night.  That comment would have done the same though so .. You get the points.

Thanks
0

Featured Post

New feature and membership benefit!

New feature! Upgrade and increase expert visibility of your issues with Priority Questions.

  • 11
  • 5
  • 5
  • +1
Tackle projects and never again get stuck behind a technical roadblock.
Join Now