geronimo-user mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Kevan Miller <>
Subject Re: java.lang.UnsatisfiedLinkError: Library is already loaded in another ClassLoader (On stopping and starting the application)
Date Tue, 24 Feb 2009 13:47:05 GMT

On Feb 24, 2009, at 5:26 AM, Hearty wrote:

> Hi
>      I am getting an error as follows
> java.lang.UnsatisfiedLinkError: lic (Library is already loaded in  
> another
> ClassLoader)
> This is happening when I stopping the application and start it again.
> [apache geronimo is running,
> I am only stopping/starting application by using the admin console]
> The lic.jar is present within the repository folder. The jar file is
> internally referring a dll file.
> Please give me a valid solution to resolve this issue?

I don't spend much time with native methods, but IIUC this will only  
work once your original application ClassLoader has been GC'ed. So,  
there are a couple of issues:

1) GC is an asynchronous process. There's no guarantee that GC will  
have run before your restart your app
2) Last week, Janko noted a problem where in some scenarios, we might  
not GC the first application ClassLoader. I haven't had time to  
investigate this, yet. But if it's affecting you, then you'll never be  
able to restart your application.

So, the way to avoid this problem is to put lic.jar in a classloader  
that's separate from your application. You can do this by creating  
your own classloader (best to create a geronimo plugin for this) and  
add a dependency to your geronimo deployment plan or use sharedlib:  
place lic.jar in var/shared/lib and add a dependency to sharedlib in  
your geronimo deployment plan:



View raw message