tomcat-users mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Astrid Wagner <>
Subject Re: java.lang.UnsatisfiedLinkError
Date Mon, 15 Sep 2003 15:15:17 GMT
Thanks for the hint.
But I do not quite understand the proposal:

the shared libraries state should be reinitialized.

How do I do that?


Something which could help is to avoid putting classes which would be 
referenced by a shared static field in the web application classloader, 
and put them in the shared classloader instead (the JARs should be put in the 
"lib" folder, and classes should be put in the "classes" folder).


Maybe you can tell me what this means in my example.
My webapps use the class IprShellInterface which is in a shared library the following way:
            String shellResponse = IprShellInterface.executeCommand(...);

Here a snippet from

  static {

     System.out.println("IprShellInterface@static: The library path is set to: " +

     try {
        System.out.println("IprShellInterface@static: Done loading library IprShellInterface");
     catch (Exception e) {
        System.out.println("IprShellInterface@static: Exception loading library IprShellInterface
... "

  public static String executeCommand(...)

I compile the class into the shared library and right now 
install it in lib of the DB installation (included in the java.library.path variable).
This means that all webapps take the same. If that is the reason for the problem wouldn't
it be a solution to
install it into the different webapps lib directories:

and have the java.library.path path be set individually for the webapps. Or is there only
one for all applications?
Where do I set the library path anyway?
Sorry I just have too little info about how this works ...


Tim Funk wrote:

> See the RELEASE NOTES under the section of shared libraries ...

> -Tim
> Astrid Wagner wrote:
>> Hi,
>> Where do I set the java.library.path property for different webapps?
>> Thanks.
>> Astrid
>> Astrid Wagner wrote:
>>> Hi,
>>> I have three different web applications installed and running in 
>>> three different modes (e.g. test, training )
>>> but basically based on the same code otherwise. In all of them I use 
>>> a native c library to call shell commands.
>>> When I test one web app everything works fine.
>>> When I switch to another web application I eventually receive the 
>>> following error:
>>> root cause
>>> java.lang.UnsatisfiedLinkError: Native Library 
>>> /home/oraedt/app/oracle/product/9iAS_1.0.2.2/lib/ 
>>> already loaded in another classloader
>>>        at java.lang.ClassLoader.loadLibrary0(
>>>        at java.lang.ClassLoader.loadLibrary(
>>>        at java.lang.Runtime.loadLibrary0(
>>>        at java.lang.System.loadLibrary(
>>> I installed the shared library  into the 
>>> databases lib directory which is included in the library path
>>> and where it is - normally - found.
>>> Does anyone know why I receive this error and how I can solve this 
>>> problem?
>>> Thanks.
>>> Astrid
>>> ---------------------------------------------------------------------
>>> To unsubscribe, e-mail:
>>> For additional commands, e-mail:
>> ---------------------------------------------------------------------
>> To unsubscribe, e-mail:
>> For additional commands, e-mail:
> ---------------------------------------------------------------------
> To unsubscribe, e-mail:
> For additional commands, e-mail:

View raw message