----------------------------- Please read the FAQ! <http://java.apache.org/faq/> ----------------------------- Hi, My apache server gives the following error when i try a -native- call from a servlet. java.lang.UnsatisfiedLinkError: authenticate at org.apache.jserv.JServConnection.processRequest(JServConnection.java:341) at org.apache.jserv.JServConnection.run(JServConnection.java:197) at java.lang.Thread.run(Thread.java) This authenticate stuff is declared in a servlet. I have made a javah -jni of this class and compiled the c code with these entries:(redhat 6.0 with apache 1.3.9) gcc -fPIC -c -I/usr/local/java/include hello.c -o hello.o and linked it with ld -shared hello.o -o libhello.so cp libhello.so /usr/lib cp libhello.so /lib (for grant) and finally ldconfig -n /usr/lib ldconfig -n /lib. This is all I know that's to be done in this subject. Yet i get that error message. Baris Acar Here I include for further info: Relevant part of Java code: --------------------------- import java.io.*; import javax.servlet.*; import javax.servlet..... ............. ....; public class saved2 extends HttpServlet { Connection con; int mu; public native int authenticate(); static { try { System.loadLibrary("hello"); } catch (Exception E) { } } and how i call this authenticate stuff: try mu=this.authenticate(); } catch(Exception e) { out.println("Error in JNI " + e ); } the relevant "hello.c" code: ---------------------------- #include <jni.h> #include "saved2.h" #include <stdio.h> JNIEXPORT jint JNICALL Java_saved2_authenticate(JNIEnv *a , jobject b) { return 100; } -- -------------------------------------------------------------- Please read the FAQ! <http://java.apache.org/faq/> To subscribe: [EMAIL PROTECTED] To unsubscribe: [EMAIL PROTECTED] Archives and Other: <http://java.apache.org/main/mail.html> Problems?: [EMAIL PROTECTED]
