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 15:00:58 GMT
I'll check it, but I don't think the dependencies are the problem. Shouldn't
the dependencies be okay, when it works with jserv?

In jserv I had to insert a line into the properties-file of the apropriate
context:
'wrapper.classpath=/export/home/inetroot/Focus/Inetroot/PM3DC/classes' to
make the JNI find the interface-definitions.
In Tomcat it should be enough, to put these classes into WEB-INF/classes of
the context. Am I right?
Do I have to insert special lines into web.xml?

Once again: THX, Tom

> -----Original Message-----
> From: Amos Shapira [mailto:amos.shapira@webcollage.com]
> Sent: Wednesday, July 26, 2000 11:33 AM
> To: 'tomcat-user@jakarta.apache.org'
> Subject: RE: JNI & Tomcat
>
>
> Hi,
>
> I use JNI with Tomcat, but on Windows 2000.  No problems so
> far, though
> I use Tomcat as stand-alone environment for development under
> JBuilder 3.5.
> (it also works with ServletExec 3.0 under IIS on Windows 2000 and
> Windows NT).
>
> What I'd suggest you to double-check would be to see if there are any
> unsatisfied dependencies for libNativeCalculator.so, use
> "ldd" (I think)
> to see if all its dependencies are resolved as well.
>
> Hope this helps,
>
> --Amos Shapira
> WebCollage
>
> > -----Original Message-----
> > From: Thomas Bilz [mailto:thomas.bilz@xplain.de]
> > Sent: Wednesday, July 26, 2000 11:46 AM
> > To: tomcat-user@jakarta.apache.org
> > Subject: RE: JNI & Tomcat
> >
> >
> > 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(Compi
> > led Code)
> > 	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)
> >       .....
> > -------------
> > 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