tomcat-users mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From tamir <ta...@movious.com>
Subject RE: Native library cannot be loaded twice
Date Mon, 24 Jun 2002 09:26:59 GMT
Hi Andrea,
You must make sure your native library is loaded once, thus moving it to
another place
in the class loader hirerachy.
One solution would be to move this class to common/lib. Which isn't
re-loaded when reloading your classes.
You can also search the tomcat emails for prvious questions regarding this
problem.

Regards,
Tamir


-----Original Message-----
From: Andreas Hirner [mailto:andreas@projektinter.net]
Sent: Monday, June 24, 2002 9:38 AM
To: Tomcat Users List
Subject: Native library cannot be loaded twice


Hello,

I have a problem calling a native library within a servlet. The
library is initialised like that:

static {
  try {
   System.loadLibrary("mapscript");
   System.err.println("libmapscript.so loaded");
   }
  catch (UnsatisfiedLinkError e) {
   System.err.println("libmapscript.so not loaded: " + e);
   }
 }

Everything works fine. However, if I make changes to the servlet and
reload it via the

http://localhost:8080/manager/reload?path=/application

call, and ececute the servlet doing

http://localhost:8080/application/servlet/servletname

I get the following error message listed below. I have to restart
Tomcat in order to check any changes made to the servlet. Does anybody
know how to solve this problem?

Thank you in advance
Andy


################################################
Error Message
################################################
exception
javax.servlet.ServletException: Servlet execution threw an exception
at
org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(Appli
cationFilterChain.java:269)
at
org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFi
lterChain.java:193)
at
org.apache.catalina.core.StandardWrapperValve.invoke(StandardWrapperVa
lve.java:243)
at
org.apache.catalina.core.StandardPipeline.invokeNext(StandardPipeline.
java:566)
at
org.apache.catalina.core.StandardPipeline.invoke(StandardPipeline.java
:472)
at
org.apache.catalina.core.ContainerBase.invoke(ContainerBase.java:943)
at
org.apache.catalina.core.StandardContextValve.invoke(StandardContextVa
lve.java:201)
at
org.apache.catalina.core.StandardPipeline.invokeNext(StandardPipeline.
java:566)
at
org.apache.catalina.core.StandardPipeline.invoke(StandardPipeline.java
:472)
at
org.apache.catalina.core.ContainerBase.invoke(ContainerBase.java:943)
at
org.apache.catalina.core.StandardContext.invoke(StandardContext.java:2
344)
at
org.apache.catalina.core.StandardHostValve.invoke(StandardHostValve.ja
va:164)
at
org.apache.catalina.core.StandardPipeline.invokeNext(StandardPipeline.
java:566)
at
org.apache.catalina.valves.ErrorDispatcherValve.invoke(ErrorDispatcher
Valve.java:170)
at
org.apache.catalina.core.StandardPipeline.invokeNext(StandardPipeline.
java:564)
at
org.apache.catalina.valves.ErrorReportValve.invoke(ErrorReportValve.ja
va:170)
at
org.apache.catalina.core.StandardPipeline.invokeNext(StandardPipeline.
java:564)
at
org.apache.catalina.valves.AccessLogValve.invoke(AccessLogValve.java:4
62)
at
org.apache.catalina.core.StandardPipeline.invokeNext(StandardPipeline.
java:564)
at
org.apache.catalina.core.StandardPipeline.invoke(StandardPipeline.java
:472)
at
org.apache.catalina.core.ContainerBase.invoke(ContainerBase.java:943)
at
org.apache.catalina.core.StandardEngineValve.invoke(StandardEngineValv
e.java:163)
at
org.apache.catalina.core.StandardPipeline.invokeNext(StandardPipeline.
java:566)
at
org.apache.catalina.core.StandardPipeline.invoke(StandardPipeline.java
:472)
at
org.apache.catalina.core.ContainerBase.invoke(ContainerBase.java:943)
at
org.apache.catalina.connector.http.HttpProcessor.process(HttpProcessor
.java:1011)
at
org.apache.catalina.connector.http.HttpProcessor.run(HttpProcessor.jav
a:1106)
at java.lang.Thread.run(Thread.java:484)


root cause

java.lang.UnsatisfiedLinkError: get_FTString
at edu.umn.gis.mapscript.mapscript.get_FTString(Native Method)
at edu.umn.gis.mapscript.mapscript.(mapscript.java:767)
at edu.umn.gis.mapscript.mapObj.(mapObj.java:227)
at demo.doGet(demo.java:75)
at javax.servlet.http.HttpServlet.service(HttpServlet.java:740)
at javax.servlet.http.HttpServlet.service(HttpServlet.java:853)
at
org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(Appli
cationFilterChain.java:247)
at
org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFi
lterChain.java:193)
at
org.apache.catalina.core.StandardWrapperValve.invoke(StandardWrapperVa
lve.java:243)
at
org.apache.catalina.core.StandardPipeline.invokeNext(StandardPipeline.
java:566)
at
org.apache.catalina.core.StandardPipeline.invoke(StandardPipeline.java
:472)
at
org.apache.catalina.core.ContainerBase.invoke(ContainerBase.java:943)
at
org.apache.catalina.core.StandardContextValve.invoke(StandardContextVa
lve.java:201)
at
org.apache.catalina.core.StandardPipeline.invokeNext(StandardPipeline.
java:566)
at
org.apache.catalina.core.StandardPipeline.invoke(StandardPipeline.java
:472)
at
org.apache.catalina.core.ContainerBase.invoke(ContainerBase.java:943)
at
org.apache.catalina.core.StandardContext.invoke(StandardContext.java:2
344)
at
org.apache.catalina.core.StandardHostValve.invoke(StandardHostValve.ja
va:164)
at
org.apache.catalina.core.StandardPipeline.invokeNext(StandardPipeline.
java:566)
at
org.apache.catalina.valves.ErrorDispatcherValve.invoke(ErrorDispatcher
Valve.java:170)
at
org.apache.catalina.core.StandardPipeline.invokeNext(StandardPipeline.
java:564)
at
org.apache.catalina.valves.ErrorReportValve.invoke(ErrorReportValve.ja
va:170)
at
org.apache.catalina.core.StandardPipeline.invokeNext(StandardPipeline.
java:564)
at
org.apache.catalina.valves.AccessLogValve.invoke(AccessLogValve.java:4
62)
at
org.apache.catalina.core.StandardPipeline.invokeNext(StandardPipeline.
java:564)
at
org.apache.catalina.core.StandardPipeline.invoke(StandardPipeline.java
:472)
at
org.apache.catalina.core.ContainerBase.invoke(ContainerBase.java:943)
at
org.apache.catalina.core.StandardEngineValve.invoke(StandardEngineValv
e.java:163)
at
org.apache.catalina.core.StandardPipeline.invokeNext(StandardPipeline.
java:566)
at
org.apache.catalina.core.StandardPipeline.invoke(StandardPipeline.java
:472)
at
org.apache.catalina.core.ContainerBase.invoke(ContainerBase.java:943)
at
org.apache.catalina.connector.http.HttpProcessor.process(HttpProcessor
.java:1011)
at
org.apache.catalina.connector.http.HttpProcessor.run(HttpProcessor.jav
a:1106)
at java.lang.Thread.run(Thread.java:484)







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

--
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