karaf-issues mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From "Kamil (JIRA)" <j...@apache.org>
Subject [jira] [Comment Edited] (KARAF-6374) Bundles installed from feature shown as Active despite exeption being thrown
Date Mon, 05 Aug 2019 14:30:00 GMT

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

Kamil edited comment on KARAF-6374 at 8/5/19 2:29 PM:
------------------------------------------------------

I think it has something to do with ServiceTracker used in start method.

It seems that although feature X depends on feature Y
{code:java}
<feature name="X" version="0.0.1" install="auto">
  <feature>Y</feature>
  <bundle>mvn:com.my.bundle/X/0.0.1</bundle>
</feature>
{code}
when I do: "feature:install Y X", feature X is istalled and started first, therefore its ServiceTracker<ServiceFromY>
does not see service from bundle Y 

A race condition maybe?


was (Author: eximius):
I think it has something to do with ServiceTracker used in start method.

It seems that although feature X depends on feature Y
{code:java}
<feature name="X" version="0.0.1" install="auto">
  <feature>Y</feature>
  <bundle>mvn:com.my.bundle/X/0.0.1</bundle>
</feature>
{code}
when I do: "feature:install Y X", feature X is istalled and started first, therefore it's
ServiceTracker does not see service from bundle Y 

A race condition maybe?

> Bundles installed from feature shown as Active despite exeption being thrown
> ----------------------------------------------------------------------------
>
>                 Key: KARAF-6374
>                 URL: https://issues.apache.org/jira/browse/KARAF-6374
>             Project: Karaf
>          Issue Type: Bug
>          Components: karaf
>    Affects Versions: 4.2.6
>            Reporter: Kamil
>            Assignee: Jean-Baptiste Onofré
>            Priority: Major
>             Fix For: 4.3.0, 4.2.7
>
>
> I've created a feature "dummy-test" which consits of 4 bundles:(dummy1, dummy3, dummy3, dummy4).
> The only thing the bundle does is throw exception:
> {code:java}
> public class Dummy1 implements BundleActivator {
>   @Override
>   public final void start(final BundleContext bundleContext) {
>       throw new RuntimeException("denied");
>   }
> }
> {code}
> when I install my bundles using "bundle:install" - then each of them throws exception
and they're all in "Resolved" state.
>  BUT, when I install them using "feature:install dummy-test" - all 4 throw exception
(I see that in log:display) but some of them are listed as Active
> Could you please fix that?



--
This message was sent by Atlassian JIRA
(v7.6.14#76016)

Mime
View raw message