tomcat-users mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Scott Walters <sc...@integra-online.com>
Subject specifying ClassLoader for webapp
Date Thu, 27 Jun 2002 21:32:59 GMT
Hi,

I've written a JNI based layer for a large 
native code executable to allow extensions 
to the native code application to be 
written in Java. When the executable 
starts, it creates a Java VM and loads 
several infrasturcture Java classes.  
These classes load a shared library as 
part of their initialization which allow 
the Java extension code to call back into 
the native code.  All this has worked very 
well.  

I've also embedded Tomcat 4.0.3 into the 
application successfully using the 
CatalinaService class.  I'm running into a 
problem though, when I try to use the 
infrastructure classes from my jsp bean to 
make calls back into the native code.  
Since my initial ClassLoader from when I 
created the Java VM has already loaded the 
shared library,  I get the following 
error...

javax.servlet.ServletException: Native 
Library F:\Java\DLL\JNIXfer.dll already 
loaded in another classloader

Is there a way to enable Tomcat's webapp 
classloader to find these infrastructure 
classes that were already loaded by the 
other Classloader?  I tried setting the 
parent loader in the Catalina class to my 
initial loader but that didn't seem to 
have any effect.  I don't mind making 
minor Tomcat source changes if that's what 
it takes to fix it.

Thanks,
Scott Walters









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