Silicon Technix Forums

Please login or register.

Author Topic: iaxclient loading error on linux  (Read 720 times)

Offline louie.nohay

  • Regular Memeber
  • ***
  • Posts: 16
  • Karma: +2/-0
    • View Profile
iaxclient loading error on linux
« on: May 10, 2011, 08:08:50 PM »
Hi,

I have a few concern to  ask to anyone who could help.. I got my projet using iaxclient working on windows, however, i am not able to run it on linux (ubuntu 10.10)..
Got an exception in loading library iaxclient.jar/ iaxclient.so.. For details on the exception trapped, please see logs below..


Code: [Select]
Exception in thread "thread applet-<package>.MyApplet.class-1" java.lang.UnsatisfiedLinkError: Unable to load library 'iaxclient': libiaxclient.so: cannot open shared object file: No such file or directory
at com.sun.jna.NativeLibrary.loadLibrary(NativeLibrary.java:145)
at com.sun.jna.NativeLibrary.getInstance(NativeLibrary.java:188)
at com.sun.jna.Library$Handler.<init>(Library.java:123)
at com.sun.jna.Native.loadLibrary(Native.java:255)
at com.sun.jna.Native.loadLibrary(Native.java:241)
at org.callino.jiaxc.IAXClient.<clinit>(IAXClient.java:192)
at org.callino.ojiaxc.OJIAXClient.<init>(OJIAXClient.java:33)
at org.callino.ojiaxc.OJIAXClient.getInstance(OJIAXClient.java:56)
at <package>.MyApplet.start(MyApplet.java:94)
at sun.plugin2.applet.Plugin2Manager$AppletExecutionRunnable.run(Plugin2Manager.java:1698)
at java.lang.Thread.run(Thread.java:662)


hope you could help me identify this.. also, same exception for loading library on mac osx was trapped..
Thanks in advance..
« Last Edit: May 20, 2011, 01:55:08 PM by louie.nohay »

Offline Babar Shafiq Nazmi

  • Administrator
  • Senior Member
  • *****
  • Posts: 152
  • Karma: +87/-0
    • View Profile
    • Silicon Technix
Re: iaxclient loading error on linux
« Reply #1 on: May 10, 2011, 08:21:08 PM »
Unable to load library 'iaxclient': libiaxclient.so: cannot open shared object file: No such file or directory
   at com.sun.jna.NativeLibrary.loadLibrary(NativeLibrary.java:145)

That shows path error, make sure the path of the .so file is correct.
....God is the greatest Programmer....

http://www.silicontechnix.com

Offline louie.nohay

  • Regular Memeber
  • ***
  • Posts: 16
  • Karma: +2/-0
    • View Profile
Re: iaxclient loading error on linux
« Reply #2 on: May 10, 2011, 10:42:29 PM »
got it babar.. i first thought it was the policy permission that causes the error.. but t'was not..
changed the original given code in IAXClient.java to this to work with my app..

Original code:
Code: [Select]
IAXClient INSTANCE = (IAXClient) Native.loadLibrary((Platform.isWindows() && FileExists.exists(System.getProperty("java.io.tmpdir") + "libiaxclient.dll"))
? System.getProperty("java.io.tmpdir") + "libiaxclient.dll"
: (Platform.isWindows() && FileExists.exists(System.getProperty("java.io.tmpdir") + "libiaxclient.dll"))
? System.getProperty("java.io.tmpdir") + "libiaxclient.so"
: "iaxclient"
, IAXClient.class);


Modified code:
Code: [Select]
IAXClient INSTANCE = (IAXClient) Native.loadLibrary(
                  (Platform.isWindows() && FileExists.exists(System.getProperty("java.io.tmpdir") + "lib/windows/libiaxclient.dll"))
                ? System.getProperty("java.io.tmpdir") + "lib/windows/libiaxclient.dll"               
                : (Platform.isLinux() && FileExists.exists(System.getProperty("java.io.tmpdir") + "lib/linux/libiaxclient.so"))
                ? System.getProperty("java.io.tmpdir") + "lib/linux/libiaxclient.so"
                : (Platform.isMac() && FileExists.exists(System.getProperty("java.io.tmpdir") + "lib/mac/libiaxclient.dylib"))
                ? System.getProperty("java.io.tmpdir") + "lib/mac/libiaxclient.dylib"
                :"iaxclient"
                , IAXClient.class);

Offline Babar Shafiq Nazmi

  • Administrator
  • Senior Member
  • *****
  • Posts: 152
  • Karma: +87/-0
    • View Profile
    • Silicon Technix
Re: iaxclient loading error on linux
« Reply #3 on: May 11, 2011, 08:20:49 PM »
Great  ;)
....God is the greatest Programmer....

http://www.silicontechnix.com

Offline louie.nohay

  • Regular Memeber
  • ***
  • Posts: 16
  • Karma: +2/-0
    • View Profile
Re: iaxclient loading error on linux
« Reply #4 on: May 16, 2011, 08:07:29 AM »
ouch.. i thought i already solved this.. same error still persist.. :(
so i modify the code for IAXClient INSTANCE in to this:
Code: [Select]
IAXClient INSTANCE = (IAXClient) Native.loadLibrary(
                  (Platform.isWindows() && FileExists.exists(System.getProperty("java.io.tmpdir") + "libiaxclient.dll"))
                ? System.getProperty("java.io.tmpdir") + "libiaxclient.dll"               
                : (Platform.isLinux() && FileExists.exists(System.getProperty("java.io.tmpdir") + File.separator + "libiaxclient.so"))
                ? System.getProperty("java.io.tmpdir") + File.separator + "libiaxclient.so"
                : (Platform.isMac() && FileExists.exists(System.getProperty("java.io.tmpdir") + File.separator + "libiaxclient.dylib"))
                ? System.getProperty("java.io.tmpdir") +  File.separator + "libiaxclient.dylib"
                :"iaxclient"
                , IAXClient.class);

EXCEPTION CAUGHT was this:
Code: [Select]
java.lang.UnsatisfiedLinkError: Unable to load library 'iaxclient': libiaxclient.so: cannot open shared object file: No such file or directory

I couldn't understand why .so files were not written in java.io.tmp.dir (/tmp for linux) even though it was loaded in java cache.. (checked in java cache viewer)..
:(

Offline Babar Shafiq Nazmi

  • Administrator
  • Senior Member
  • *****
  • Posts: 152
  • Karma: +87/-0
    • View Profile
    • Silicon Technix
Re: iaxclient loading error on linux
« Reply #5 on: May 17, 2011, 08:16:46 PM »
If you are testing applet then it must be in temporary internet files of Mozilla (or whatever browser you are using)
Still it shows path error.
....God is the greatest Programmer....

http://www.silicontechnix.com

Offline louie.nohay

  • Regular Memeber
  • ***
  • Posts: 16
  • Karma: +2/-0
    • View Profile
Re: iaxclient loading error on linux
« Reply #6 on: May 19, 2011, 07:13:13 AM »
I did a work around for loading libiaxclient files to java.io.tmpdir and successfully loaded it however i got this error.. is this an error on my client or is from the server configuration?

EXCEPTION CAUGHT:
Code: [Select]
Exception in thread "thread applet-<package>.MyApplet.class-1" java.lang.UnsatisfiedLinkError: Unable to load library '/tmp/libiaxclient.so': /tmp/libiaxclient.so: undefined symbol: speex_preprocess_ctl
at com.sun.jna.NativeLibrary.loadLibrary(NativeLibrary.java:145)
at com.sun.jna.NativeLibrary.getInstance(NativeLibrary.java:188)
at com.sun.jna.Library$Handler.<init>(Library.java:123)
at com.sun.jna.Native.loadLibrary(Native.java:255)
at com.sun.jna.Native.loadLibrary(Native.java:241)
at org.callino.jiaxc.IAXClient.<clinit>(IAXClient.java:209)
at org.callino.ojiaxc.OJIAXClient.<init>(OJIAXClient.java:33)
at org.callino.ojiaxc.OJIAXClient.getInstance(OJIAXClient.java:56)
at <package>.MyApplet.start(MyApplet.java:93)
at sun.plugin2.applet.Plugin2Manager$AppletExecutionRunnable.run(Plugin2Manager.java:1698)
at java.lang.Thread.run(Thread.java:662)

line 209 of IAXClient.class
Code: [Select]
    IAXClient INSTANCE = (IAXClient) Native.loadLibrary(
            (Platform.isWindows() && FileExists.exists(System.getProperty("java.io.tmpdir") + "libiaxclient.dll"))
            ? System.getProperty("java.io.tmpdir") + "libiaxclient.dll"
            : (Platform.isLinux() && FileExists.exists(System.getProperty("java.io.tmpdir") + File.separator + "libiaxclient.so"))
            ? System.getProperty("java.io.tmpdir") + File.separator + "libiaxclient.so"
            : (Platform.isMac() && FileExists.exists(System.getProperty("java.io.tmpdir") + File.separator + "libiaxclient.dylib"))
            ? System.getProperty("java.io.tmpdir") + File.separator + "libiaxclient.dylib"
            : "iaxclient", IAXClient.class);

« Last Edit: May 20, 2011, 01:57:18 PM by louie.nohay »

Offline louie.nohay

  • Regular Memeber
  • ***
  • Posts: 16
  • Karma: +2/-0
    • View Profile
Re: iaxclient loading error on linux
« Reply #7 on: May 25, 2011, 08:09:34 AM »
Does anyone here know where i can get the least updated source code for libiaxclient. The error below seems to look for a missing code that is calling speex codec.

Quote
Exception in thread "thread applet-<package>.MyApplet.class-1" java.lang.UnsatisfiedLinkError: Unable to load library '/tmp/libiaxclient.so': /tmp/libiaxclient.so: undefined symbol: speex_preprocess_ctl

 

Page created in 0.203 seconds with 16 queries.