felix-users mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From "Hubert Felber" <Hubert.Fel...@abacus.ch>
Subject Re: cannot delete bundle jar from load directory (locked)
Date Fri, 21 Aug 2015 19:30:59 GMT

Ferry,

many thanks for this info

Regards
Hubert

>>> Ferry Huberts <mailings@hupie.com> 21.08.2015 21:21 >>>
This is an inherent problem of using native code.

AFAIK, once a library is loaded, it can't be unloaded, neither on 
Windows nor on Linux or Mac; the library remains in the address space
of 
the process that loaded it, which in this case is the Java runtime.

The only way to unload the library is to stop the process, which 
obviously kills your use-case.

This is exactly the same problem as the Celix guys have (they're 
building an OSGi framework implementation in C).

On Windows there are file locks on the bundle with the native
libraries, 
on Linux there are no such locks (IIRC).

Still, removing the bundle while its native libraries were loaded is 
kind-of cheating and tricky at best.

Until the C libraries of our OSes provide us with a way to unload a 
library we're stuck with this problem.

On 21/08/15 21:10, Hubert Felber wrote:
> < Did you refresh after uninstalling ?
>
> yes,
>
> stop - uninstall -  refresh
>
> it did not help
>
> Thank you
> Hubert
>
>
>
>>>> "Richard S. Hall" <heavy@ungoverned.org> 21.08.2015 20:28 >>>
> On 8/21/15 14:24 , Hubert Felber wrote:
>> <<Windows
>>
>> :-)
>>
>> << 1. stop the bundle before deleting its bundle
>>
>> neither stop nor uninstall the bundle helps. It must have to do
with
>> the native code running -- is still locked.
>
> Did you refresh after uninstalling ?
>
>>
>> <<2. stop using windows, by far the best choice IMHO :-)
>>
>> well, since our customers insist of using windows ....
>>
>> regards
>> Hubert
>>
>>>>> Ferry Huberts <mailings@hupie.com> 21.08.2015 20:08 >>>
>>
>> On 21/08/15 20:05, Hubert Felber wrote:
>>> Hi,
>>>
>>> I cannot delete a certain bundle jar from load directory, while I
>> can
>>> do this with others in the same load directory while they are
>> running.
>>> It says that this is open by java --  I do not receive a stop
event
>> in
>>> the activator.
>>>
>>> This specific bundle has embedded jniWrapper jar and lots of
native
>>> libraries (dlls).
>>> The jniWrapper is active and the native libraries are loaded.
>>>
>>> What could cause this lock?
>> Windows
>>
>>> Can I do anything to avoid this lock?
>> 1. stop the bundle before deleting its bundle
>> 2. stop using windows, by far the best choice IMHO :-)
>>
>>
>>
>
---------------------------------------------------------------------
>> To unsubscribe, e-mail: users-unsubscribe@felix.apache.org 
>> For additional commands, e-mail: users-help@felix.apache.org 
>>
>>
>>
>
---------------------------------------------------------------------
>> To unsubscribe, e-mail: users-unsubscribe@felix.apache.org 
>> For additional commands, e-mail: users-help@felix.apache.org 
>>
>
>
>
---------------------------------------------------------------------
> To unsubscribe, e-mail: users-unsubscribe@felix.apache.org 
> For additional commands, e-mail: users-help@felix.apache.org 
>
>
>
---------------------------------------------------------------------
> To unsubscribe, e-mail: users-unsubscribe@felix.apache.org 
> For additional commands, e-mail: users-help@felix.apache.org 
>

-- 
Ferry Huberts

---------------------------------------------------------------------
To unsubscribe, e-mail: users-unsubscribe@felix.apache.org 
For additional commands, e-mail: users-help@felix.apache.org 


---------------------------------------------------------------------
To unsubscribe, e-mail: users-unsubscribe@felix.apache.org
For additional commands, e-mail: users-help@felix.apache.org


Mime
View raw message