File APIs for Java Developers
Manipulate DOC, XLS, PPT, PDF and many others from your application.
http://aspose.com/file-tools
  • Post Reply
  • Bookmark Topic Watch Topic
  • New Topic

RMI vs JNI problem

 
wip siva
Ranch Hand
Posts: 36
  • 0
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
hi friends.
i am calling a simple c function from java.i created a .so file
from some othere m/c.and i copied all necessary files.while
starting the rmi registry.its trying to load the library.i am getting the follwoing exceptions.
plz let me know the problem.
thanx in advance
Exception in thread "main" java.lang.UnsatisfiedLinkError: no my_lib in java.lib
rary.path
at java.lang.Throwable.fillInStackTrace(Native Method)
at java.lang.Throwable.fillInStackTrace(Compiled Code)
at java.lang.Throwable.<init>(Compiled Code)
at java.lang.Error.<init>(Error.java:50)
at java.lang.LinkageError.<init>(LinkageError.java:43)
at java.lang.UnsatisfiedLinkError.<init>(UnsatisfiedLinkError.java:42)
at java.lang.ClassLoader.loadLibrary(Compiled Code)
at java.lang.Runtime.loadLibrary0(Runtime.java:470)
at java.lang.System.loadLibrary(System.java:778)
at <Unloaded Method>
at com.wipro.osssmart.config.MainServer.main(MainServer.java:39)
$
 
Aleksey Matiychenko
Ranch Hand
Posts: 178
  • 0
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Well,
First of all check your LD_LIBRARY_PATH.
The naming convention on UNIX is lib(libraryname).so so make sure that your library is named correctly.
Also do ldd -r libmy_lib.so. This would tell you if you have unsatisfied links within the library
 
wip siva
Ranch Hand
Posts: 36
  • 0
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
hi friend
thanx for ur reply.
i have set LD_LIBRARY_PATH also.i am working on solaris.
now its not giving this problem while starting the rmiregistry.
now its giving while calling the native function from my GUI.
like java.rmi.server error
and unsatisfiedlinkerror
plz help me in this.
i am in a critical situation
thanx
 
wip siva
Ranch Hand
Posts: 36
  • 0
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
hi friend
i did ldd -r libGetBackup.so
its giving like this
warning: ldd: libGetBackup.so: is not executable
symbol not found: printf (./libGetBackup.so)
symbol not found: system (./libGetBackup.so)
wheather the .so file should be in executable mode or what
this is from solaris m/c
plz let me know
thanx
 
I agree. Here's the link: http://aspose.com/file-tools
  • Post Reply
  • Bookmark Topic Watch Topic
  • New Topic