felix-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From "Thomas Demande (JIRA)" <j...@apache.org>
Subject [jira] Updated: (FELIX-2358) Hot undeployment of features does not uninstall all bundles
Date Wed, 26 May 2010 13:11:34 GMT

     [ https://issues.apache.org/jira/browse/FELIX-2358?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel

Thomas Demande updated FELIX-2358:

    Attachment: dummy-feature.xml

Attached feature XML sample to reproduce the problem.

Dropping it to the configured deploy directory will install correctly.
Removing the file will not remove the activemq-camel bundle, nor the Oracle driver one.

Note that if the dependency on activemq-camel feature is removed, then everything seems to
work fine (except that in non-trunk versions of Karaf, a stacktrace is displayed, probably
masked by the following revision: http://svn.apache.org/viewvc?view=revision&revision=909487).

So the problem might not only be caused by the exception thrown.

Manually removing the bundles (in the Karaf console) also leads to "IllegalStateException
zip file is closed".

> Hot undeployment of features does not uninstall all bundles
> -----------------------------------------------------------
>                 Key: FELIX-2358
>                 URL: https://issues.apache.org/jira/browse/FELIX-2358
>             Project: Felix
>          Issue Type: Bug
>          Components: Karaf
>    Affects Versions: karaf-1.4.0, karaf 1.6.0
>         Environment: Tested on a Windows XP box, with FUSE ESB 4.2 running Felix as Osgi
>            Reporter: Thomas Demande
>         Attachments: dummy-feature.xml
> When deploying features _via_ the drop-in mechanism (using the {{FeatureDeploymentListener}}),
it also installs needed bundles, as required.
> But when the feature file is removed from the deploy directory, some problems may occur,
the most important being that bundles installed by the feature (only) will not be uninstalled.
> An exception is thrown when trying to access the feature bundle entries when not permitted,
resulting in an exception, 
> I think this is related to what's said in the revision 909487 comment (http://svn.apache.org/viewvc?view=revision&revision=909487).
> That snippet of the class
> 142 } else if (bundleEvent.getType() == BundleEvent.UNINSTALLED) {
> 143 	try {
> 144 	Enumeration featuresUrlEnumeration = bundle.findEntries("/META-INF/" + FEATURE_PATH
+ "/", "*.xml", false); 
> will always throw an exception as the findEntries has to throw an IllegalStateException
if the bundle in uninstalled.
> Therefore, the call to "featuresService.uninstallFeature(f.getName(), f.getVersion());
" is never reached, and bundled participating in that feature are not uninstalled.
> It's worth noting that in some cases everything is correctly removed, but that seems
to happen only if Karaf has been restarted after the first drop-in of the feature.

This message is automatically generated by JIRA.
You can reply to this email to add a comment to the issue online.

View raw message