Christoph Lofi wrote:
> Hello.
>
> I am coding a web based svn repository browser (something like viewCVS) and
> I am using the javahl liberies in their newest version (yesterday).
>
> The applicatition is based on servlets deployed on Apache Tomcat 5. I am
> using one static class with has an instance of the SVNClient.
>
> The problem is, everytime when I redeploy the application, I have to restart
> the server because the access to the svnjavahl.dll is still blocked by the
> undeployed webapp. I'm using SVNClient.dispose() while undeploying, but it
> seems not to do anything.
>
> The exception I get is:
>
> java.lang.UnsatisfiedLinkError: Native Library
> C:\WINDOWS\system32\svnjavahl.dll already loaded in another classloader
>
> What can I do?
The code looks like this:
public class SVNClient implements SVNClientInterface
{
/**
* load the needed native library
*/
static
{
/*
* first try to load the library by the new name.
* if that fails, try to load the library by the old name.
*/
try
{
System.loadLibrary("svnjavahl-1");
}
catch(UnsatisfiedLinkError ex)
{
System.loadLibrary("svnjavahl");
}
}
...
...and tries to load svnjavahl-1.dll, then svnjavahl.dll if that fails.
Sounds like the JVM doesn't appreciate having a native shared library
explicitly re-loaded. Do you have instances of SVNClient running in multiple
web app class loaders? This article
<http://dbforums.com/arch/92/2003/8/839859> suggests moving svn-javahl.jar
into the common/lib/ parent class loader. However, if shared/lib/ is
available in Tomcat 5, that would probably be a better choice due to its more
localized scoping.
---------------------------------------------------------------------
To unsubscribe, e-mail: dev-unsubscribe@subversion.tigris.org
For additional commands, e-mail: dev-help@subversion.tigris.org
Received on Sun Mar 21 10:32:51 2004