no email please
-----Mensaje original-----
De: Tim Penhey [mailto:[EMAIL PROTECTED]
Enviado el: Mi�rcoles 7 de Julio de 2004 14:33
Para: Tomcat Users List
Asunto: Re: UnsatisfiedLinkError - JNI
Josef Henryson wrote:
> Hi!
>
> I get an UnsatisfiedLinkError when trying to System.loadLibrary("foo")
> from a class instantiated within a Servlet. The library libFoo.jnilib
> is in a folder within java.library.path and the class loading it is
> inside a JAR in $CATALINA_HOME/shared/lib. Beside the JNI library is a
> native library libBar.dylib.
>
> I'm running Tomcat 5.0.25 on Mac OS X 10.3.4
>
> Here's the exception:
>
> UnsatisfiedLinkError:
> /Users/henryson/Library/Java/Extensions/libFoo.jnilib:
> java.lang.UnsatisfiedLinkError:
> /Users/henryson/Library/Java/Extensions/libFoo.jnilib:
> at java.lang.ClassLoader$NativeLibrary.load(Native Method)
> at java.lang.ClassLoader.loadLibrary0(ClassLoader.java:1560)
> at java.lang.ClassLoader.loadLibrary(ClassLoader.java:1485)
> at java.lang.Runtime.loadLibrary0(Runtime.java:788)
> at java.lang.System.loadLibrary(System.java:834)
>
> I have tried loading the library from a small Java application outside
> the Tomcat server and it works fine when all classes/libraries are
> within the same folder.
>
> Of course I have searched for a solution on Google and I have also
> search old entries on this list (in an archive on a website) but there
> just don't seem to be a solution available out there... =(
>
> Anyone that have a clue? I would be VERY thankful =)
>
> Regards,
>
> Josef Henryson
>
Well given the fact that the JNI library works fine when in a stand
alone environment, it sounds like a load path problem. I'm not sure
what OS X uses, but on unix it is the LD_LIBRARY_PATH, or on Windows the
PATH. Try and get the code to output the environment before it does the
load library call and make sure that the locations for all the dependant
libraries are there.
Hope that helps,
Tim
---------------------------------------------------------------------
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]
AVISO LEGAL:
Esta informaci�n es privada y confidencial y est� dirigida �nicamente a su
destinatario. Si usted no es el destinatario original de este mensaje y por este medio
pudo acceder a dicha informaci�n por favor elimine el mensaje. La distribuci�n o copia
de este mensaje est� estrictamente prohibida. Esta comunicaci�n es s�lo para
prop�sitos de informaci�n y no debe ser considerada como propuesta, aceptaci�n ni como
una declaraci�n de voluntad oficial de REPSOL YPF S.A. y/o subsidiarias y/o afiliadas.
La transmisi�n de e-mails no garantiza que el correo electr�nico sea seguro o libre de
error. Por consiguiente, no manifestamos que esta informaci�n sea completa o precisa.
Toda informaci�n est� sujeta a alterarse sin previo aviso.
This information is private and confidential and intended for the recipient only. If
you are not the intended recipient of this message you are hereby notified that any
review, dissemination, distribution or copying of this message is strictly prohibited.
This communication is for information purposes only and shall not be regarded neither
as a proposal, acceptance nor as a statement of will or official statement from REPSOL
YPF S.A. and/or subsidiaries and/or affiliates. Email transmission cannot be
guaranteed to be secure or error-free. Therefore, we do not represent that this
information is complete or accurate and it should not be relied upon as such. All
information is subject to change without notice.
---------------------------------------------------------------------
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]