Hi,
i am using Tomcat 4.1.24 and in our web application we use JNI like
below
static
{
System.loadLibrary("optimizer_dll");
}
optimizer_dll.dll resides in c:\code\bin; This path is also in the the
"PATH environment"
When i start Tomcat, every think is fine but after some times passes,
tomcat gives error like below
"dll is already loaded in another classloader"
I searched that error on the web and i found that this :
************************************************************************
********************
Applications that require native libraries must ensure that the
libraries have
been loaded prior to use. Typically, this is done with a call like:
static {
System.loadLibrary("path-to-library-file");
}
in some class. However, the application must also ensure that the
library is
not loaded more than once. If the above code were placed in a class
inside
the web application (i.e. under /WEB-INF/classes or /WEB-INF/lib), and
the
application were reloaded, the loadLibrary() call would be attempted a
second
time.
To avoid this problem, place classes that load native libraries outside
of the
web application, and ensure that the loadLibrary() call is executed only
once
during the lifetime of a particular JVM.
************************************************************************
********************
I think this can't be the ideal solution, any idea about this problem ?
Regards
---------------------------------------------------------------------
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]