[ 
https://issues.apache.org/jira/browse/KARAF-4367?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=16119547#comment-16119547
 ] 

Christian Schneider commented on KARAF-4367:
--------------------------------------------

I think a I found a possible cause for this. In 
org.apache.karaf.features.internal.service.FeaturesServiceImpl.installFeatures 
we first copy the current state and then do the provisioning in a 
SingleThreadExecutor. So while the provisioning is protected to be entered by 
one thread at a time this is not the case while we copy the state and do the 
computation of what to change.


> "Module has been uninstalled" during installing the feature
> -----------------------------------------------------------
>
>                 Key: KARAF-4367
>                 URL: https://issues.apache.org/jira/browse/KARAF-4367
>             Project: Karaf
>          Issue Type: Bug
>          Components: karaf-core, karaf-feature
>    Affects Versions: 4.0.4
>            Reporter: Pavlo Vasylchenko
>            Assignee: Christian Schneider
>         Attachments: jconsole2.png
>
>
> Separately feature works fine, but if I try to install it just after 
> uninstalling another feature, I get exception.
> Looks like karaf trying refresh something in this time.
> my code:
> featuresService.installFeature(feature, 
> EnumSet.of(Option.NoAutoRefreshBundles));
> .......................................................................
> Caused by: java.lang.IllegalStateException: Module has been uninstalled.
>       at 
> org.eclipse.osgi.container.Module.checkValid(Module.java:526)[org.eclipse.osgi-3.10.2.v20150203-1939.jar:]
>       at 
> org.eclipse.osgi.container.Module.getStartLevel(Module.java:243)[org.eclipse.osgi-3.10.2.v20150203-1939.jar:]
>       at 
> org.apache.karaf.features.internal.service.Deployer.deploy(Deployer.java:480)[9:org.apache.karaf.features.core:4.0.4]
>       at 
> org.apache.karaf.features.internal.service.FeaturesServiceImpl.doProvision(FeaturesServiceImpl.java:1089)[9:org.apache.karaf.features.core:4.0.4]
>       at 
> org.apache.karaf.features.internal.service.FeaturesServiceImpl$1.call(FeaturesServiceImpl.java:985)[9:org.apache.karaf.features.core:4.0.4]
>       at java.util.concurrent.FutureTask.run(FutureTask.java:266)[:1.8.0_60]
>       at 
> java.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1142)[:1.8.0_60]
>       at 
> java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:617)[:1.8.0_60]



--
This message was sent by Atlassian JIRA
(v6.4.14#64029)

Reply via email to