----------------------------------------------------------------
BEFORE YOU POST, search the faq at <http://java.apache.org/faq/>
WHEN YOU POST, include all relevant version numbers, log files,
and configuration files.  Don't make us guess your problem!!!
----------------------------------------------------------------

Jerome,  what I found out was that the java.library.path property is a 1.2 specific
property. As I was using the IBM JDK 1.1.18 it did not help.  I then switched to the
Blackdown 1.2 pre-v2 JDK and it did help.  But only the first time the servlet was
run.  In order to run the servlet successfully one must shut Apache down and restart
it each time.

Obviously this is not acceptable.

The problem has something to do (IMHO) with the implementation of the Apache
"adaptable" classloader.  If I circumvent this classloader by splitting up the code
into 2 JAR's and put them in the wrapper.classpath things seem to work better.  My
understanding is that doing this allows the JDK to use the "system" classloader
rather than the Apache-Jserv classloader.  I could be all wet here but it does seem
to help.  The 2 JARs' contents are:
1st JAR: class that loads the JNI library;
2nd JAR: everything that is 100% Java (some classes use the class in the 1st JAR)

I am still looking for a "real" solution.  I will let you know if I find out
anything.
Kevin

Jerome Martin wrote:

> [snip]
>
> Dear Jon, dear Kevin
> Your discussions are very interesting but i didn't find a solution to my
> problem :
> I've tried all the solutions given by Kevin in the previous posts (a
> single JNI.jar in the wrapper.classpath, autoreload.class=false,
> autoreload.files=false).  Thanks Kevin, if it works for you, please
> email me your .properties or explain me how I must do because it doesn't
> work for me.
> I also try to use Jon's servlet. On my first try, java.library.path
> didn't exist in the default properties. So, I tried this :
>         Properties prop=new Properties();
>         prop=System.getProperties();
>         prop.put("java.library.path","/usr/lib/");
>         System.setProperties(prop);
> in my servlet. My dynamic library is in /usr/lib.
> In fact, on my second try of Jon's servlet, I saw
> "java.library.path=/usr/lib/" but I still have an UnsatisfiedLinkError
> when I call my native method.
> I don't understand anything...
>
> Thanks for your response
>
> Jerome



--
--------------------------------------------------------------
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]

Reply via email to