www-apache-bugdb mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Ray Bellis <...@community.net.uk>
Subject mod_jserv/3908: Can't invoke JNI native method
Date Wed, 17 Feb 1999 10:14:21 GMT

>Number:         3908
>Category:       mod_jserv
>Synopsis:       Can't invoke JNI native method
>Confidential:   no
>Severity:       serious
>Priority:       medium
>Responsible:    jserv
>State:          open
>Class:          sw-bug
>Submitter-Id:   apache
>Arrival-Date:   Wed Feb 17 02:20:02 PST 1999
>Originator:     rpb@community.net.uk
>Release:        1.3.4
Digital Unix 4.0E, Digital JVM 1.1.7B, mod_jserv 1.0b2
I've written JNI code to access the Unix password database (getpwnam et al).  The code works
fine from standalone code, but won't work from a servlet.  The error is:

java.lang.UnsatisfiedLinkError: getpwnam
        at org.apache.jserv.JServConnection.run(Compiled Code)
        at java.lang.Thread.run(Thread.java)

I also found that I had to install the .so file in the system shared library directory otherwise
System.loadLibrary() couldn't find it.  With standalone code it can find the .so in the current
directory.  What is the cwd supposed to be when running a servlet?

I suspect that the JServ ClassLoader is to blame.  It looks as if the static invocation of
System.loadLibrary() worked but the subsequent binding of the native methods failed.
[In order for any reply to be added to the PR database, ]
[you need to include <apbugs@Apache.Org> in the Cc line ]
[and leave the subject line UNCHANGED.  This is not done]
[automatically because of the potential for mail loops. ]
[If you do not include this Cc, your reply may be ig-   ]
[nored unless you are responding to an explicit request ]
[from a developer.                                      ]
[Reply only with text; DO NOT SEND ATTACHMENTS!         ]

View raw message