Skip to main content


Eclipse Community Forums
Forum Search:

Search      Help    Register    Login    Home
Home » Eclipse Projects » Equinox » Unable to delete uninstalled bundle from filesystem.(On win I get "file is open in Java Platform SE binary" when attempting to delete an uninstalled bundle.)
Unable to delete uninstalled bundle from filesystem. [message #1739802] Thu, 04 August 2016 14:37 Go to next message
Erwin Hogeweg is currently offline Erwin HogewegFriend
Messages: 37
Registered: July 2009
Member
Hi,

I need to remove a jar file in a running system from a bundle that has been uninstalled, but Windows (server 2008) keeps telling me that the file is still open. I have uninstalled all but the framework bundles to make sure I wasn't holding on to anything, but it seems that the framework itself is holding on to it.

Is this a known issue? The framework we are using (3.9.1) is a tad (...) dated, so it may have been resolved in newer versions. I can't find anything about it though.

The challenge is that this makes it hard to update a bundle in a live system, because when we restart we get the old version back. I guess the only solution to this is to manually muck with the config.ini file and add the version there?

Any insight is appreciated.

These are the remaining bundles, and still unable to delete the file.

id State Bundle
0 ACTIVE org.eclipse.osgi_3.9.1.v20130814-1242
1 ACTIVE org.apache.felix.gogo.command_0.10.0
2 ACTIVE org.apache.felix.gogo.runtime_0.10.0
3 ACTIVE org.apache.felix.gogo.shell_0.10.0
4 ACTIVE org.eclipse.equinox.console_1.0.100.v20130429-0953


Kind Regards,

Erwin
Re: Unable to delete uninstalled bundle from filesystem. [message #1739826 is a reply to message #1739802] Thu, 04 August 2016 18:59 Go to previous messageGo to next message
Thomas Watson is currently offline Thomas WatsonFriend
Messages: 503
Registered: July 2009
Senior Member
After uninstalling the bundles did you do a refresh operation? From the console that is simple running the 'refresh' command. It can also be done using:

https://osgi.org/javadoc/r5/core/org/osgi/framework/wiring/FrameworkWiring.html#refreshBundles(java.util.Collection,%20org.osgi.framework.FrameworkListener...)

or

https://osgi.org/javadoc/r5/core/org/osgi/service/packageadmin/PackageAdmin.html#refreshPackages(org.osgi.framework.Bundle[])

It is possible that the bundles are still being held as stale removal pending bundles by the framework.
Re: Unable to delete uninstalled bundle from filesystem. [message #1739828 is a reply to message #1739826] Thu, 04 August 2016 19:14 Go to previous messageGo to next message
Erwin Hogeweg is currently offline Erwin HogewegFriend
Messages: 37
Registered: July 2009
Member
Thomas,

Thanks for your reply.

Yes, I ment to mention that in the original post, I did a refresh after every bundle uninstall.

The complete framework has around 130 bundles, so I uninstalled around 125.

Erwin
Re: Unable to delete uninstalled bundle from filesystem - SOLVED [message #1739844 is a reply to message #1739826] Fri, 05 August 2016 03:02 Go to previous messageGo to next message
Erwin Hogeweg is currently offline Erwin HogewegFriend
Messages: 37
Registered: July 2009
Member
Turns out that this is a foot-in-mouth.

When executing a bundle uninstall w/o first stopping the bundle, an exception is thrown, which prevents some resources from being dereferenced. If the bundle is stopped before uninstalling everything is just fine. Duh.

Apologies for wasting your time.

Erwin
Re: Unable to delete uninstalled bundle from filesystem - SOLVED [message #1739887 is a reply to message #1739844] Fri, 05 August 2016 12:23 Go to previous message
Thomas Watson is currently offline Thomas WatsonFriend
Messages: 503
Registered: July 2009
Senior Member
Strange thing is uninstalling a bundle must stop the bundle first. So there should a requirement to stop it first. But perhaps stopping all bundles involved is allowing the uninstall and refresh to work. But still seems like something fishy is going on.
Previous Topic:HttpSessionAdapter
Next Topic:Linkageerror in Equinox but no error in Eclipse
Goto Forum:
  


Current Time: Thu Nov 07 07:05:29 GMT 2024

Powered by FUDForum. Page generated in 0.27075 seconds
.:: Contact :: Home ::.

Powered by: FUDforum 3.0.2.
Copyright ©2001-2010 FUDforum Bulletin Board Software

Back to the top