tomcat-users mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From "Andreas Hirner" <andr...@projektinter.net>
Subject AW: Native library cannot be loaded twice
Date Mon, 24 Jun 2002 13:19:36 GMT
Hi,
> What kind of native library are you loading ? (Sorry, I don't know
the
> former emails!)

I am working on Linux and set the path to the shared C library using
the LD_LIBRARY_PATH.

> If you working on Unix and you are loading a shared lib you must
ensure that
> the path to the lib is know to the tomcat process. Either you
configure the
> tomcate environment (catalina) or use the LD_LIBRARY_PATH
environment
> variable. Manipulating an environment variable is not the best idea
because
> it effects the whole system - and this is neither allowed  nor
requested.
> This should also work for Windows where the path to the dll must be
provided
> either in the catalina.bat file or by modifying the system wide
path.

The problem is, that I can load the library in the servlet and make it
work. However if I change the servlet and reload the application via
manager/reload command, the library is loaded a second time and thus
causes a conflict. I have to start the application to view any
changes, which is rather cumbersome if you are still developing.
That's why I wrote the InitMapserver class and called it from the
servlet in the Class.forName() method.

Looking at your second mail:

> A look into your code (InitMapserver) shows, that the runtime system
cannot
> initialize the static resource in the common way, because it first
must
> generate an object and this object contains code for doing some
static
> stuff. Maybe this is the reason for the strange behavior

How do I go about this. Do I have use a constructor?

Thanx Andreas



--
To unsubscribe, e-mail:   <mailto:tomcat-user-unsubscribe@jakarta.apache.org>
For additional commands, e-mail: <mailto:tomcat-user-help@jakarta.apache.org>


Mime
View raw message