You are viewing a plain text version of this content. The canonical link for it is here.
Posted to users@servicemix.apache.org by Sana <sa...@gmail.com> on 2014/11/26 05:10:52 UTC

obr feature

Hi,

In service mix, I am using feature for deploying my bundles. Something like

<feature name=&quot;abc&quot; version=&lt;> resolver="obr">
  <feature version=&lt;>>xyz</feature>
  <bundle>mvn:gruopID/artifactId/version/bundle</bundle>
</feature>

When I do features:install abc, it fails because feature xyz is not
installed. 

But after i install and uninstall obr and do features:install abc, it works
becuase xyz also gets installed.

Here is what I did,

features:install obr
features:uninstall obr
features:install abc

Not sure what is the hidden thing that kicks in for feature deployment to
work properly after installing and uninstalling obr when obr itself is not
installed initially.

Please advice.


Thanks!





--
View this message in context: http://servicemix.396122.n5.nabble.com/obr-feature-tp5721909.html
Sent from the ServiceMix - User mailing list archive at Nabble.com.

Re: obr feature

Posted by Gert Vanthienen <ge...@gmail.com>.
Hi Sana,


So the OBR feature resolver uses Felix' OBR support internally, so
that's why you have the extra Felix bundle there. In a nutshell, when
the OBR resolver is active:
- all bundles without dependency="true" will just get installed as usual
- all bundles with dependency="true" will only be installed if they
are needed to to satisfy a missing requirement

More concretely, that means a bundle marked as a dependency will not
get installed if another bundle in the container already provides the
same/compatible packages and services. This is the main reason we have
this feature enabled: to avoid installing multiple versions of the
same bundle when we pull features from different sources together
(CXF, Camel, ActiveMQ, ...). The OBR resolution check with only work
for a single feature at once though.

That means that if you mark a bundle as a dependency in a feature,
there should be another bundle in the same feature actually
importing/requiring a service or package. Could that be the case here
(bundle2 not requiring any packages/services from bundle1)? Could you
provide us with the output for osgi:headers for both bundles?


Regards,

Gert
Regards,

Gert Vanthienen


On Thu, Dec 4, 2014 at 5:36 PM, Sana <sa...@gmail.com> wrote:
> Hi Gert,
>
> It was a typo I have resolver="(obr)" with "()" in all my feature file.
>
> feature xyz looks like this. It works when resolver="(obr)" is removed.
>
> <feature name=&quot;xyz&quot; version=&lt;> resolver="(obr)">
>   <bundle dependency=true>mvn:gruopID/artifactId/version/bundle1</bundle>
>   <bundle>mvn:gruopID/artifactId/version/bundle2</bundle>
> </feature>
>
> What I thought was the bundle org.apache.felix.bundlerepository which in the
> startup properties file is required for obr resolver to work to resolve the
> dependencies but it is happening otherwise. It works when the obr bundle is
> uninstalled. What does this bundle org.apache.felix.bundlerepository do?
> What is its relation with resolver="(obr)"?
>
> Thanks!
>
>
>
> --
> View this message in context: http://servicemix.396122.n5.nabble.com/obr-feature-tp5721909p5721932.html
> Sent from the ServiceMix - User mailing list archive at Nabble.com.

Re: obr feature

Posted by Sana <sa...@gmail.com>.
Hi Gert,

It was a typo I have resolver="(obr)" with "()" in all my feature file.

feature xyz looks like this. It works when resolver="(obr)" is removed. 

<feature name=&quot;xyz&quot; version=&lt;> resolver="(obr)"> 
  <bundle dependency=true>mvn:gruopID/artifactId/version/bundle1</bundle>
  <bundle>mvn:gruopID/artifactId/version/bundle2</bundle>
</feature>

What I thought was the bundle org.apache.felix.bundlerepository which in the
startup properties file is required for obr resolver to work to resolve the
dependencies but it is happening otherwise. It works when the obr bundle is
uninstalled. What does this bundle org.apache.felix.bundlerepository do?
What is its relation with resolver="(obr)"?

Thanks!



--
View this message in context: http://servicemix.396122.n5.nabble.com/obr-feature-tp5721909p5721932.html
Sent from the ServiceMix - User mailing list archive at Nabble.com.

Re: obr feature

Posted by Gert Vanthienen <ge...@gmail.com>.
Hi Sana,

To add one more question: what does the xyz feature look like?

Regards,

Gert Vanthienen


On Wed, Nov 26, 2014 at 4:17 PM, Krzysztof Sobkowiak
<kr...@gmail.com> wrote:
> Could you please check logs for any error messages?
>
> Regards
> Krzysztof
>
> On 26.11.2014 16:09, Krzysztof Sobkowiak wrote:
>> It's a diff of installed bundles between fresh ServiceMix and after
>> the installing and uninstalling the obr feature
>>
>>  [  21] [Active     ] [Created     ] [       ] [   30] Apache Karaf ::
>> Shell :: Log Commands (2.3.8)
>>  [  22] [Active     ] [Created     ] [       ] [   30] Apache Karaf ::
>> Admin :: Management (2.3.8)
>>  [  23] [Active     ] [            ] [       ] [   30] Apache Aries
>> JMX API (1.1.0)
>> *-[  24] [Active     ] [Created     ] [       ] [   30] Apache Karaf
>> :: Features :: OBR Resolver (2.3.8)*
>>  [  25] [Active     ] [            ] [       ] [   30] Apache Aries
>> JMX Core (1.1.1)
>>  [  26] [Active     ] [            ] [       ] [   30] Apache Mina
>> SSHD :: Core (0.12.0)
>>  [  27] [Active     ] [            ] [       ] [   30] Apache MINA
>> Core (2.0.7)
>> @@ -30,7 +29,6 @@
>>  [  29] [Active     ] [Created     ] [       ] [   30] Apache Karaf ::
>> Features :: Management (2.3.8)
>>  [  30] [Active     ] [Created     ] [       ] [   30] Apache Karaf ::
>> Diagnostic :: Command (2.3.8)
>>  [  31] [Active     ] [Created     ] [       ] [   30] Apache Karaf ::
>> Shell :: Development Commands (2.3.8)
>> *-[  32] [Active     ] [            ] [       ] [   30] Apache Felix
>> Bundle Repository (1.6.6)*
>>  [  33] [Active     ] [Created     ] [       ] [   30] Apache Karaf ::
>> Features :: Core (2.3.8)
>>  [  34] [Active     ] [            ] [       ] [   30] Apache Karaf ::
>> Diagnostic :: Core (2.3.8)
>>  [  35] [Active     ] [Created     ] [       ] [   30] Apache Karaf ::
>> Shell :: OSGi Commands (2.3.8)
>>
>>
>> It removes the obr bundles configured in startup.properties - so we
>> have no obr anymore.
>> Perhaps this gives some hints.
>>
>> Regards
>> Krzysztof
>>
>>
>> On 26.11.2014 08:57, Gert Vanthienen wrote:
>>> L.S.,
>>>
>>>
>>> Does it work if you remove the resolver="obr" bit entirely or if you
>>> use resolver="(obr)" (which makes the OBR resolver optional instead of
>>> mandatory)?
>>>
>>>
>>> Regards,
>>>
>>> Gert Vanthienen
>>>
>>>
>>> On Wed, Nov 26, 2014 at 5:10 AM, Sana <sa...@gmail.com> wrote:
>>>> Hi,
>>>>
>>>> In service mix, I am using feature for deploying my bundles. Something like
>>>>
>>>> <feature name=&quot;abc&quot; version=&lt;> resolver="obr">
>>>>   <feature version=&lt;>>xyz</feature>
>>>>   <bundle>mvn:gruopID/artifactId/version/bundle</bundle>
>>>> </feature>
>>>>
>>>> When I do features:install abc, it fails because feature xyz is not
>>>> installed.
>>>>
>>>> But after i install and uninstall obr and do features:install abc, it works
>>>> becuase xyz also gets installed.
>>>>
>>>> Here is what I did,
>>>>
>>>> features:install obr
>>>> features:uninstall obr
>>>> features:install abc
>>>>
>>>> Not sure what is the hidden thing that kicks in for feature deployment to
>>>> work properly after installing and uninstalling obr when obr itself is not
>>>> installed initially.
>>>>
>>>> Please advice.
>>>>
>>>>
>>>> Thanks!
>>>>
>>>>
>>>>
>>>>
>>>>
>>>> --
>>>> View this message in context: http://servicemix.396122.n5.nabble.com/obr-feature-tp5721909.html
>>>> Sent from the ServiceMix - User mailing list archive at Nabble.com.
>>
> Krzysztof Sobkowiak
>
> JEE & OSS Architect | Senior Solution Architect @ Capgemini | Committer
> @ ASF
> Capgemini <http://www.pl.capgemini.com/> | Software Solutions Center
> <http://www.pl.capgemini-sdm.com/> | Wroclaw
> e-mail: krzys.sobkowiak@gmail.com <ma...@gmail.com> |
> Twitter: @KSobkowiak
> Calendar: http://goo.gl/yvsebC

Re: obr feature

Posted by Krzysztof Sobkowiak <kr...@gmail.com>.
Could you please check logs for any error messages?

Regards
Krzysztof

On 26.11.2014 16:09, Krzysztof Sobkowiak wrote:
> It's a diff of installed bundles between fresh ServiceMix and after
> the installing and uninstalling the obr feature
>
>  [  21] [Active     ] [Created     ] [       ] [   30] Apache Karaf ::
> Shell :: Log Commands (2.3.8)
>  [  22] [Active     ] [Created     ] [       ] [   30] Apache Karaf ::
> Admin :: Management (2.3.8)
>  [  23] [Active     ] [            ] [       ] [   30] Apache Aries
> JMX API (1.1.0)
> *-[  24] [Active     ] [Created     ] [       ] [   30] Apache Karaf
> :: Features :: OBR Resolver (2.3.8)*
>  [  25] [Active     ] [            ] [       ] [   30] Apache Aries
> JMX Core (1.1.1)
>  [  26] [Active     ] [            ] [       ] [   30] Apache Mina
> SSHD :: Core (0.12.0)
>  [  27] [Active     ] [            ] [       ] [   30] Apache MINA
> Core (2.0.7)
> @@ -30,7 +29,6 @@
>  [  29] [Active     ] [Created     ] [       ] [   30] Apache Karaf ::
> Features :: Management (2.3.8)
>  [  30] [Active     ] [Created     ] [       ] [   30] Apache Karaf ::
> Diagnostic :: Command (2.3.8)
>  [  31] [Active     ] [Created     ] [       ] [   30] Apache Karaf ::
> Shell :: Development Commands (2.3.8)
> *-[  32] [Active     ] [            ] [       ] [   30] Apache Felix
> Bundle Repository (1.6.6)*
>  [  33] [Active     ] [Created     ] [       ] [   30] Apache Karaf ::
> Features :: Core (2.3.8)
>  [  34] [Active     ] [            ] [       ] [   30] Apache Karaf ::
> Diagnostic :: Core (2.3.8)
>  [  35] [Active     ] [Created     ] [       ] [   30] Apache Karaf ::
> Shell :: OSGi Commands (2.3.8)
>
>
> It removes the obr bundles configured in startup.properties - so we
> have no obr anymore.
> Perhaps this gives some hints.
>
> Regards
> Krzysztof
>
>
> On 26.11.2014 08:57, Gert Vanthienen wrote:
>> L.S.,
>>
>>
>> Does it work if you remove the resolver="obr" bit entirely or if you
>> use resolver="(obr)" (which makes the OBR resolver optional instead of
>> mandatory)?
>>
>>
>> Regards,
>>
>> Gert Vanthienen
>>
>>
>> On Wed, Nov 26, 2014 at 5:10 AM, Sana <sa...@gmail.com> wrote:
>>> Hi,
>>>
>>> In service mix, I am using feature for deploying my bundles. Something like
>>>
>>> <feature name=&quot;abc&quot; version=&lt;> resolver="obr">
>>>   <feature version=&lt;>>xyz</feature>
>>>   <bundle>mvn:gruopID/artifactId/version/bundle</bundle>
>>> </feature>
>>>
>>> When I do features:install abc, it fails because feature xyz is not
>>> installed.
>>>
>>> But after i install and uninstall obr and do features:install abc, it works
>>> becuase xyz also gets installed.
>>>
>>> Here is what I did,
>>>
>>> features:install obr
>>> features:uninstall obr
>>> features:install abc
>>>
>>> Not sure what is the hidden thing that kicks in for feature deployment to
>>> work properly after installing and uninstalling obr when obr itself is not
>>> installed initially.
>>>
>>> Please advice.
>>>
>>>
>>> Thanks!
>>>
>>>
>>>
>>>
>>>
>>> --
>>> View this message in context: http://servicemix.396122.n5.nabble.com/obr-feature-tp5721909.html
>>> Sent from the ServiceMix - User mailing list archive at Nabble.com.
>
Krzysztof Sobkowiak

JEE & OSS Architect | Senior Solution Architect @ Capgemini | Committer
@ ASF
Capgemini <http://www.pl.capgemini.com/> | Software Solutions Center
<http://www.pl.capgemini-sdm.com/> | Wroclaw
e-mail: krzys.sobkowiak@gmail.com <ma...@gmail.com> |
Twitter: @KSobkowiak
Calendar: http://goo.gl/yvsebC

Re: obr feature

Posted by Krzysztof Sobkowiak <kr...@gmail.com>.
It's a diff of installed bundles between fresh ServiceMix and after the
installing and uninstalling the obr feature

 [  21] [Active     ] [Created     ] [       ] [   30] Apache Karaf ::
Shell :: Log Commands (2.3.8)
 [  22] [Active     ] [Created     ] [       ] [   30] Apache Karaf ::
Admin :: Management (2.3.8)
 [  23] [Active     ] [            ] [       ] [   30] Apache Aries JMX
API (1.1.0)
*-[  24] [Active     ] [Created     ] [       ] [   30] Apache Karaf ::
Features :: OBR Resolver (2.3.8)*
 [  25] [Active     ] [            ] [       ] [   30] Apache Aries JMX
Core (1.1.1)
 [  26] [Active     ] [            ] [       ] [   30] Apache Mina SSHD
:: Core (0.12.0)
 [  27] [Active     ] [            ] [       ] [   30] Apache MINA Core
(2.0.7)
@@ -30,7 +29,6 @@
 [  29] [Active     ] [Created     ] [       ] [   30] Apache Karaf ::
Features :: Management (2.3.8)
 [  30] [Active     ] [Created     ] [       ] [   30] Apache Karaf ::
Diagnostic :: Command (2.3.8)
 [  31] [Active     ] [Created     ] [       ] [   30] Apache Karaf ::
Shell :: Development Commands (2.3.8)
*-[  32] [Active     ] [            ] [       ] [   30] Apache Felix
Bundle Repository (1.6.6)*
 [  33] [Active     ] [Created     ] [       ] [   30] Apache Karaf ::
Features :: Core (2.3.8)
 [  34] [Active     ] [            ] [       ] [   30] Apache Karaf ::
Diagnostic :: Core (2.3.8)
 [  35] [Active     ] [Created     ] [       ] [   30] Apache Karaf ::
Shell :: OSGi Commands (2.3.8)


It removes the obr bundles configured in startup.properties - so we have
no obr anymore.
Perhaps this gives some hints.

Regards
Krzysztof


On 26.11.2014 08:57, Gert Vanthienen wrote:
> L.S.,
>
>
> Does it work if you remove the resolver="obr" bit entirely or if you
> use resolver="(obr)" (which makes the OBR resolver optional instead of
> mandatory)?
>
>
> Regards,
>
> Gert Vanthienen
>
>
> On Wed, Nov 26, 2014 at 5:10 AM, Sana <sa...@gmail.com> wrote:
>> Hi,
>>
>> In service mix, I am using feature for deploying my bundles. Something like
>>
>> <feature name=&quot;abc&quot; version=&lt;> resolver="obr">
>>   <feature version=&lt;>>xyz</feature>
>>   <bundle>mvn:gruopID/artifactId/version/bundle</bundle>
>> </feature>
>>
>> When I do features:install abc, it fails because feature xyz is not
>> installed.
>>
>> But after i install and uninstall obr and do features:install abc, it works
>> becuase xyz also gets installed.
>>
>> Here is what I did,
>>
>> features:install obr
>> features:uninstall obr
>> features:install abc
>>
>> Not sure what is the hidden thing that kicks in for feature deployment to
>> work properly after installing and uninstalling obr when obr itself is not
>> installed initially.
>>
>> Please advice.
>>
>>
>> Thanks!
>>
>>
>>
>>
>>
>> --
>> View this message in context: http://servicemix.396122.n5.nabble.com/obr-feature-tp5721909.html
>> Sent from the ServiceMix - User mailing list archive at Nabble.com.


-- 
Krzysztof Sobkowiak

JEE & OSS Architect | Senior Solution Architect @ Capgemini | Committer
@ ASF
Capgemini <http://www.pl.capgemini.com/> | Software Solutions Center
<http://www.pl.capgemini-sdm.com/> | Wroclaw
e-mail: krzys.sobkowiak@gmail.com <ma...@gmail.com> |
Twitter: @KSobkowiak
Calendar: http://goo.gl/yvsebC

Re: obr feature

Posted by Gert Vanthienen <ge...@gmail.com>.
L.S.,


Does it work if you remove the resolver="obr" bit entirely or if you
use resolver="(obr)" (which makes the OBR resolver optional instead of
mandatory)?


Regards,

Gert Vanthienen


On Wed, Nov 26, 2014 at 5:10 AM, Sana <sa...@gmail.com> wrote:
> Hi,
>
> In service mix, I am using feature for deploying my bundles. Something like
>
> <feature name=&quot;abc&quot; version=&lt;> resolver="obr">
>   <feature version=&lt;>>xyz</feature>
>   <bundle>mvn:gruopID/artifactId/version/bundle</bundle>
> </feature>
>
> When I do features:install abc, it fails because feature xyz is not
> installed.
>
> But after i install and uninstall obr and do features:install abc, it works
> becuase xyz also gets installed.
>
> Here is what I did,
>
> features:install obr
> features:uninstall obr
> features:install abc
>
> Not sure what is the hidden thing that kicks in for feature deployment to
> work properly after installing and uninstalling obr when obr itself is not
> installed initially.
>
> Please advice.
>
>
> Thanks!
>
>
>
>
>
> --
> View this message in context: http://servicemix.396122.n5.nabble.com/obr-feature-tp5721909.html
> Sent from the ServiceMix - User mailing list archive at Nabble.com.