Not exactly... the browser get stuck for some minutes, as if it was trying
to access the library methods; but when it finish, the error is: The page
cannot be displayed. I think this is because Tomcat is crashing, but I donīt
know why.

-----Mensaje original-----
De: Manish Bhatnagar [mailto:[EMAIL PROTECTED]]
Enviado el: Friday, February 15, 2002 10:45 AM
Para: Tomcat Users List
Asunto: RE: Problem with JNI, Tomcat 4.0.1 and FreeBSD


We have NOT made any changes to jni wrokers. What is the error that is being
displayed? Is it 500 Internal Server Error?

-----Original Message-----
From: Mario Fernandez [mailto:[EMAIL PROTECTED]]
Sent: Friday, February 15, 2002 2:02 PM
To: 'Tomcat Users List'
Subject: RE: Problem with JNI, Tomcat 4.0.1 and FreeBSD


Iīve my library there, in $CATALINA_HOME\lib, and thereīs mo way to make it
works... The System.loadLibrary() call works fine, but the problem is when I
call some native method. Iīve reading some responses in the mailing list
talking about jni workers or something like this, but always with Tomcat
3.2.3. In Tomcat 4.0.1, should I do something special in any configuration
file??

-----Mensaje original-----
De: Manish Bhatnagar [mailto:[EMAIL PROTECTED]]
Enviado el: Friday, February 15, 2002 5:29 AM
Para: Tomcat Users List
Asunto: RE: Problem with JNI, Tomcat 4.0.1 and FreeBSD


Where are you putting your mylib.so library? It should be in
$CATALINA_HOME\lib.

-----Original Message-----
From: Mario Fernandez [mailto:[EMAIL PROTECTED]]
Sent: Friday, February 15, 2002 1:40 AM
To: [EMAIL PROTECTED]
Subject: Problem with JNI, Tomcat 4.0.1 and FreeBSD



> Hi everybody,
> 
> Iīve got an annoying error working with JNI and Tomcat 4.0.1 in a FreeBSD
> machine. I call a native method from a servlet and it doesnīt work. I get
> a core dumped... What do I have to do to make it works in Tomcat 4.0.1???
> My classes an native code are below:
> Is it necessary to do something in Tomcat to work with JNI??
> 
> From the servlet i make the following call:
> 
> ....
> 
> Library.list(null, 0);
> 
> ....
> 
> My class Library is like this:
> 
> public class Library{
> 
> static {
> 
> System.loadLibrary("mylib"); // The sahred library is called libmylib.so
> and this works fine
> }
> 
> public native static void list(String name, int num);
> 
> }
> 
> 
> The function header in Library.h (generated by javah -jni Library) is:
> 
> JNIEXPORT void JNICALL_Library_list(JNIEnv *,jobject,jobject,jint);
> 
> And I use this header in mylib.c
> 
> Thanks in advance
> 
> 

Reply via email to