tomcat-users mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From "Thomas Bilz" <thomas.b...@xplain.de>
Subject RE: JNI & Tomcat
Date Wed, 26 Jul 2000 08:46:26 GMT
You are right, on Solaris you'll have to place it in LD_LIB.... So I placed
the file libNativeCalculator.so in /usr/local/lib, part of LD_LIB....
I think the library is found, because when I delete the library common.so in
/usr/local/lib the error changes to:
-------------
java.lang.UnsatisfiedLinkError: no NativeCalculator in shared library path
	at java.lang.Throwable.(Compiled Code)
	at java.lang.Error.(Compiled Code)
	at java.lang.LinkageError.(Compiled Code)
	at java.lang.UnsatisfiedLinkError.(Compiled Code)
	at java.lang.Runtime.loadLibrary(Compiled Code)
	at java.lang.System.loadLibrary(Compiled Code)
	at de.xplain.GenericCalculator.OutputParams.getErrorMessage(Compiled Code)
	at de.xplain.GenericCalculator.Calculator.computeInternal(Compiled Code)
	at de.xplain.GenericCalculator.Calculator.compute(Compiled Code)
	at
de.xplain.GenericCalculator.Calculators.BarwertCalculator.compute(Compiled
Code)
      .....
-------------
In my opinion the system can find the library, when it is placed in
/usr/local/lib, but JVM can't
get the right function 'compute'.
Do you work with JNI and Tomcat? No problems in that?

Thanks for spending your time on that problem,
	Tom


> -----Original Message-----
> From: Amos Shapira [mailto:amos.shapira@webcollage.com]
> Sent: Tuesday, July 25, 2000 7:18 PM
> To: 'tomcat-user@jakarta.apache.org'
> Subject: RE: JNI & Tomcat
>
>
> Hmm, how do you expect Tomcat to find the .so? (I assume this is
> UNIX).
>
> At least on Windows 2000, the .DLL files must be on the PATH
> in order to be found by JNI, I think for Solaris it is enough
> for them to
> be on LD_LIBRARYPATH (or somesuch).
>
> Hope this helps,
>
> --Amos Shapira
> WebCollage
>
> > -----Original Message-----
> > From: Thomas Bilz [mailto:thomas.bilz@xplain.de]
> > Sent: Tuesday, July 25, 2000 6:12 PM
> > To: tomcat-user@jakarta.apache.org
> > Subject: JNI & Tomcat
> >
> >
> > Yesterday I installed Tomcat and most things seem to work,
> > but I have a
> > problem with JNI in an old Servlet that ran on JServ before.
> > I have a shared library, which is loaded, and I have a
> > wrapper-class for it.
> > But I can't use this wrapper: every access to my servlet ends with a
> > java.lang.UnsatisfiedLinkError.
> > -------------
> > Error: 500
> > Location: servlet/de.rechentools.servlets.Barwert
> > Internal Servlet Error:
> >
> > java.lang.UnsatisfiedLinkError: compute
> > 	at
> >
> de.xplain.GenericCalculator.Calculator.computeInternal(Compiled Code)
> > 	at de.xplain.GenericCalculator.Calculator.compute(Compiled Code)
> > 	at
> > de.xplain.GenericCalculator.Calculators.BarwertCalculator.comp
> > ute(Compiled
> > Code)
> > 	at
> > de.rechentools.servlets.Barwert.createReplaceList(Compiled Code)
> > 	at
> > de.xplain.GenericServlets.RechenModulServlet.doGet(Compiled Code)
> > 	at
> > de.xplain.GenericServlets.RechenModulServlet.doPost(Compiled Code)
> > 	at javax.servlet.http.HttpServlet.service(Compiled Code)
> > 	at javax.servlet.http.HttpServlet.service(Compiled Code)
> > 	at
> > org.apache.tomcat.core.ServletWrapper.handleRequest(Compiled Code)
> > 	at org.apache.tomcat.core.ContextManager.service(Compiled Code)
> > 	at
> > org.apache.tomcat.service.connector.Ajp12ConnectionHandler.pro
> > cessConnection
> > (Compiled Code)
> > 	at
> > org.apache.tomcat.service.TcpConnectionThread.run(Compiled Code)
> > 	at java.lang.Thread.run(Compiled Code)


Mime
View raw message