Oracle FAQ Your Portal to the Oracle Knowledge Grid
HOME | ASK QUESTION | ADD INFO | SEARCH | E-MAIL US
 

Home -> Community -> Usenet -> c.d.o.server -> Re: oc4j native library load error ...

Re: oc4j native library load error ...

From: Laurenz Albe <invite_at_spam.to.invalid>
Date: 30 Mar 2006 08:30:29 GMT
Message-ID: <1143707427.96689@proxy.dienste.wien.at>


tintincat1977_at_yahoo.com wrote:
> I have a standalone oc4j (10g) installation on Solaris 9 and when I run
> my servlet (which instantiates another class that uses native code), I
> get an java.lang.UnsatisfiedLinkError even though the native library is
> on the path specified when running the oc4j instance using
> (-Djava.library.path= ...)
>
> When the System.loadLibrary() fails on the native library, I print out
> the java.library.path and it is as expected and contains the native
> library but the error says:
> ld.so.1 java fatal mylibrary.so open failed No such file or directory
>
> If I remove the app server from my environment and test it using an
> "equivalent" scenario of just calling it from a java client program
> from the command line (instead of a web client) then it works (i.e.,
> the native library is loaded etc). So in this case the
> classloader/nativeloader did not complain about this (very same)
> library.
>
> What could be the difference when the native library is getting loaded
> as part of the oc4j/web app versus when I run a simple java client
> program from the command line?

One thing that I can think of is that mylibrary.so depends on another shared library that cannot be found.

What does 'ldd mylibrary.so' tell you?

I noticed, but did not investigate, that Java does use the whole shared library lookup path on Linux: the ld.so.conf mechanism seems not to apply to Java.

Yours,
Laurenz Albe Received on Thu Mar 30 2006 - 02:30:29 CST

Original text of this message

HOME | ASK QUESTION | ADD INFO | SEARCH | E-MAIL US