• Post Reply Bookmark Topic Watch Topic
  • New Topic
programming forums Java Mobile Certification Databases Caching Books Engineering Micro Controllers OS Languages Paradigms IDEs Build Tools Frameworks Application Servers Open Source This Site Careers Other Pie Elite all forums
this forum made possible by our volunteer staff, including ...
Marshals:
  • Campbell Ritchie
  • Tim Cooke
  • paul wheaton
  • Paul Clapham
  • Ron McLeod
Sheriffs:
  • Jeanne Boyarsky
  • Liutauras Vilda
Saloon Keepers:
  • Tim Holloway
  • Carey Brown
  • Roland Mueller
  • Piet Souris
Bartenders:

RMI vs JNI problem

 
Ranch Hand
Posts: 36
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • 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)
$
 
Ranch Hand
Posts: 178
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • 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
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • 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
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • 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
 
Don't get me started about those stupid light bulbs.
reply
    Bookmark Topic Watch Topic
  • New Topic