Hi:
Well here's what I did for the developer:
-----
I have added the following to /usr/bin/.java_wrapper:
LD_LIBRARY_PATH="$JAVA_HOME/lib/$proc/$THREADS_TYPE:/data/httpd/jserv/cicmen
u:$LD_LIBRARY_PATH"
and this to /usr/local/apache/jserv/conf/zone_main.properties:
wrapper.classpath=/data/httpd/jserv/cicmenu
-----
Here's the developer's results:
-----
No change. If I comment out the call to the JNI method it works.
Otherwise I get an internal server error. The loadLibrary() command is
above
this and appears to work correctly. I originally had problems just getting
the loadLibrary() command to work, but that doesn't appear to be the
problem
anymore. It has to do with when I actually try to invoke the method that is
in the shared library. It appears to work fine in a stand alone Java
application, but when I convert it to a Servlet, the problem arises. I
wonder if the package protocol is causing a scoping problem. The java
utility that creates the header file for the shared library has the package
name imbedded in it.
-----
Here's the error messages from the JServ log:
-----
[04/03/1999 13:01:16:593] (ERROR) ajp11: Servlet Error:
java.lang.UnsatisfiedLinkError: cicmenu_decodeT
imeStamp: cicmenu_decodeTimeStamp
[04/03/1999 13:01:16:595] (ERROR) an error returned handling request via
protocol "ajpv11"
[04/03/1999 13:01:18:549] (ERROR) ajp11: Servlet Error:
java.lang.UnsatisfiedLinkError: cicmenu_decodeT
imeStamp: cicmenu_decodeTimeStamp
[04/03/1999 13:01:18:549] (ERROR) an error returned handling request via
protocol "ajpv11"
[04/03/1999 13:01:53:325] (INFO) Apache JServ Module was cleaned-up
(ap_child)
[04/03/1999 13:01:57:705] (INFO) Apache JServ Module was cleaned-up
(ap_child)
[04/03/1999 13:05:04:340] (ERROR) ajp11: Servlet Error:
java.lang.UnsatisfiedLinkError: decodeTimeStamp
: decodeTimeStamp
[04/03/1999 13:05:04:340] (ERROR) an error returned handling request via
protocol "ajpv11"
[04/03/1999 13:06:33:653] (INFO) Apache JServ Module was cleaned-up
(ap_child)
[04/03/1999 13:06:34:892] (ERROR) ajp11: Servlet Error:
java.lang.UnsatisfiedLinkError: decodeTimeStamp
: decodeTimeStamp
[04/03/1999 13:06:34:893] (ERROR) an error returned handling request via
protocol "ajpv11"
[04/03/1999 13:06:42:385] (INFO) Apache JServ Module was cleaned-up
(ap_child)
[04/03/1999 13:06:47:528] (INFO) Apache JServ Module was cleaned-up
(ap_child)
[04/03/1999 13:07:02:775] (INFO) Apache JServ Module was cleaned-up
(ap_child)
[04/03/1999 13:07:06:166] (INFO) Apache JServ Module was cleaned-up
(ap_child)
[04/03/1999 13:07:15:291] (INFO) Apache JServ Module was cleaned-up
(ap_child)
[04/03/1999 13:07:49:730] (INFO) Apache JServ Module was cleaned-up
(ap_child)
[04/03/1999 13:07:58:074] (INFO) Apache JServ Module was cleaned-up
(ap_child)
[04/03/1999 13:10:26:238] (ERROR) ajp11: Servlet Error:
java.lang.UnsatisfiedLinkError: decodeTimeStamp
: decodeTimeStamp
[04/03/1999 13:10:26:239] (ERROR) an error returned handling request via
protocol "ajpv11"
[
-----
Any ideas why the JNI is not working with JServ. It could be a Java
programming problem, but I'm only the system administrator, not a Java
programmer.
At 10:10 AM 3/4/99 -0500, you wrote:
>You need to have your shared libraries accessible. In other words, you
need
>to set your LD_LIBRARY_PATH environment variable to point to the directory
>where the shared libraries are kept on disk. Then you can make them
>accessible in two one of two ways:
>
>1) wrapper.env.copy=LD_LIBRARY_PATH
>2) wrapper.env.copyall=true
>
>Hope this helps.
>
>-Darryl
>
>-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=
>Darryl Campbell
>ProSTAR Development
>Nortel Networks
>ESN: 393-8729
>email: [EMAIL PROTECTED]
>-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=
>
>> -----Original Message-----
>> From: Brian S. Wallace [SMTP:[EMAIL PROTECTED]]
>> Sent: Thursday, March 04, 1999 9:53 AM
>> To: [EMAIL PROTECTED]
>> Subject: JServ/JNI Problem
>>
>> Hi:
>>
>> JServ installation: Stronghold 2.4/Apache 1.30, JServ 1.0b2, Oracle 7
>JDBC
>> Thin Drivers 7.3.4, JDK 1.1.7B, JSDK 2.0, DEC Unix 4.0D.
>>
>> I have a developer who is having a problem using JNI with JServ. From
>our
>> emails:
>>
>> Developer
>> ---------
>> I am still having trouble with JNI from a servlet. Here is what I found
>in
>> the FAQ - what do you think? It sounds like the servlet's directory must
>> be
>> in the class path (/data/httpd/jserv/cicmenu).
>>
>> ++++++++++++++++++++++++++
>> Why do I keep getting UnsatisfiedLinkError? (or) Why won't my servlets
>> using native code run?
>>
>> Servlets using native libraries must be put in the classpath, otherwise
>> you
>> will get a java.lang.UnsatisfiedLinkError because in JDK1.1 a class with
>> native methods can't be loaded by custom class loaders (servlet class
>> loader).
>> -----
>>
>> My Response
>> -----------
>> I've added the following statement to the zone_main.properties file:
>>
>> wrapper.classpath=/data/httpd/jserv/cicmenu
>>
>> See if this works. The only problem I see here is that this puts the
>> class
>> path into everyone's path. If it works, then I may need to put each
>> project back into its own zone. I had problems doing this before.
>> -----
>>
>> Developer
>> ---------
>> We are a little closer. It will now load the native library without
>> bombing, but I can't execute the native function - internal server
error.
>> I
>> am using the same techniques I used in the stand-alone Java application
-
>> which works - but doesn't from a servlet.
>> -----
>>
>> Any general suggestions about using JNI with JServ? The developer is
>> calling a C library to do some security related stuff.
>>
>> My concern here is that I had to add his class file to the class path.
>> This makes it available to anyone in the zone, right? It looks like
each
>> developer needs thier own zone. What is everyone else doing to keep
>> projects separated on a system? Another problem I ran into in setting
>> multiple zones was that after I setup more than 2 zones, JServ wouldn't
>> start up.
>>
>> Thanks,
>>
>>
>> Brian S. Wallace
>>
>> Oak Ridge National Laboratory
>> P. O. Box 2008, MS 6394
>> Oak Ridge, Tennessee 37831-6394
>>
>> Voice (423) 576-3193
>> Fax (423) 574-5323
>>
>> http://www-internal.ornl.gov/~xsw/
>>
>>
>>
>> ----------------------------------------------------------------
>> To subscribe: [EMAIL PROTECTED]
>> To unsubscribe: [EMAIL PROTECTED]
>> Archives and Other: <http://www.working-dogs.com/>
>> Problems?: [EMAIL PROTECTED]
>
>
>----------------------------------------------------------------
>To subscribe: [EMAIL PROTECTED]
>To unsubscribe: [EMAIL PROTECTED]
>Archives and Other: <http://www.working-dogs.com/>
>Problems?: [EMAIL PROTECTED]
>
Brian S. Wallace
Oak Ridge National Laboratory
P. O. Box 2008, MS 6394
Oak Ridge, Tennessee 37831-6394
Voice (423) 576-3193
Fax (423) 574-5323
http://www-internal.ornl.gov/~xsw/
----------------------------------------------------------------
To subscribe: [EMAIL PROTECTED]
To unsubscribe: [EMAIL PROTECTED]
Archives and Other: <http://www.working-dogs.com/>
Problems?: [EMAIL PROTECTED]