AW: AW: AW: AW: AW: ComponentFactory

2019-03-28 Thread Matthias Leinweber
Hello again,


i dont use Component Factories i am now using Managed Service Factories...

i am now using this way to discover available factories:


ServiceComponentRuntime scr;

[...]

scr.getComponentDescriptionDTOs(null)
.stream()
.map(componentDescriptionDTO -> String.join(" ", 
componentDescriptionDTO.configurationPid))
.filter(s -> s.startsWith("my.pre.fix"))...


best regards,
Matthias


Von: David Jencks 
Gesendet: Dienstag, 26. März 2019 17:01:13
An: user@karaf.apache.org
Betreff: Re: AW: AW: AW: AW: ComponentFactory

I don’t understand what you are trying to do. I don’t see any way that factory 
components would be relevant in any way to anything you mention.
Suppose you have two normal components implementing MyInterface, and supply 
factory configurations for them to create instances as needed, and have a 
multivalued reference of type MyInterface. What do you need that this doesn’t 
provide?

Thanks
David Jencks

Sent from my iPhone

On Mar 26, 2019, at 1:21 AM, Matthias Leinweber 
mailto:matthias.leinwe...@ida-analytics.de>>
 wrote:


Hi JB,

yes but until i created one there is nothing to iterate/find.
However, i think did not explain my problem very well so i try to explain  what 
i want to do.
Maybe i took the wrong approach to solve my problem. So lets consider the 
following classes:

@Component(
service = MyInterface.class,
configurationPid = "my.factory.prefix.A"
configurationPolicy=ConfigurationPolicy.REQUIRE,
property = {
"prop1=A",
"prop2=foo"})
public class MyComponentA implements MyInterface {

@Modified
public void modified(ComponentContext componentContext){
  //change something in this component
}
public void dostuff(){}
}

@Component(
service = MyInterface.class,
configurationPid = "my.factory.prefix.B"
configurationPolicy=ConfigurationPolicy.REQUIRE,
property = {
"prop1=B",
"prop2=bar"})
public class MyComponentB implements MyInterface {

@Modified
public void modified(ComponentContext componentContext){
  //change something in this component
}
public void dostuff(){}
}

public class MyFancyManager implements MyFancyInterface {

public List listAvailableComponentFactories(){
// how do i "iterate" over all factories without that i
// have already created one? I don't  know which
// factories are present in advance or bundles
// dynamically add new components factories
}

public void  changeConfig(String filter, Map config){
// 
configManager.listConfig(filter).stream().filter().any().update(config)
}

public void  createSomething(String type, Map config){
  Configuration cfg = 
configurationAdmin.createFactoryConfiguration("my.factory.prefix."+type, null);
  Hashtable prop = new Hashtable<>();
  prop.put("prop3", "foobar");
  cfg.update(testProp);
}
}

And now i like to create some services from type A, some from type B and then i 
like to change configurations of existing services.

best regards,
Matthias


Von: Jean-Baptiste Onofré mailto:j...@nanthrax.net>>
Gesendet: Dienstag, 26. März 2019 06:15:26
An: user@karaf.apache.org<mailto:user@karaf.apache.org>
Betreff: Re: AW: AW: AW: ComponentFactory

Hi Mathias,

The factoryPid doesn't change: it's com.foo.bar.
The configurationPid is based on the factory PID: com.foo.bar. (in
config:list).

So you can find "your" configurations based on your factoryPid. You can
list all configuration for a given factoryPid:

config:list "(factoryPid=com.foo.bar)"

Regards
JB

On 25/03/2019 20:01, Matthias Leinweber wrote:
> ... i can iterate over "my" servicefactories.
>
> ----
> *From:* Matthias Leinweber
> *Sent:* Monday, March 25, 2019 8:00:25 PM
> *To:* user@karaf.apache.org<mailto:user@karaf.apache.org>
> *Subject:* Re: AW: AW: AW: ComponentFactory
>
> Mhm OK.
>
> I will try to explain what i want to achieve.
>
> My Plan was to create several ManagedserviceFactories all with different
> factorypids but all with the same prefix. So that i
> ----
> *From:* Jean-Baptiste Onofré mailto:j...@nanthrax.net>>
> *Sent:* Monday, March 25, 2019 7:33:52 PM
> *To:* user@karaf.apache.org<mailto:user@karaf.apache.org>
> *Subject:* Re: AW: AW: AW: ComponentFactory
>
> Not sure I follow you.
>
> What's the issue ?
>
> You have the factory and the configurations for the factory.
>
> Regards
> JB
>
> On 25/03/2019 18:54, Matthias Leinweber wrote:
>> Ye

Re: AW: AW: AW: AW: ComponentFactory

2019-03-26 Thread David Jencks
I don’t understand what you are trying to do. I don’t see any way that factory 
components would be relevant in any way to anything you mention.
Suppose you have two normal components implementing MyInterface, and supply 
factory configurations for them to create instances as needed, and have a 
multivalued reference of type MyInterface. What do you need that this doesn’t 
provide?

Thanks
David Jencks 

Sent from my iPhone

> On Mar 26, 2019, at 1:21 AM, Matthias Leinweber 
>  wrote:
> 
> Hi JB,
> 
> yes but until i created one there is nothing to iterate/find.
> However, i think did not explain my problem very well so i try to explain  
> what i want to do.
> Maybe i took the wrong approach to solve my problem. So lets consider the 
> following classes:
> 
> @Component(
> service = MyInterface.class,
> configurationPid = "my.factory.prefix.A"
> configurationPolicy=ConfigurationPolicy.REQUIRE,
> property = {
> "prop1=A",
> "prop2=foo"})
> public class MyComponentA implements MyInterface {
> 
> @Modified
> public void modified(ComponentContext componentContext){
>   //change something in this component
> }
> public void dostuff(){}
> }
> 
> @Component(
> service = MyInterface.class,
> configurationPid = "my.factory.prefix.B"
> configurationPolicy=ConfigurationPolicy.REQUIRE,
> property = {
> "prop1=B",
> "prop2=bar"})
> public class MyComponentB implements MyInterface {
> 
> @Modified
> public void modified(ComponentContext componentContext){
>   //change something in this component
> }
> public void dostuff(){}
> }
> 
> public class MyFancyManager implements MyFancyInterface {
> 
> public List listAvailableComponentFactories(){
> // how do i "iterate" over all factories without that i 
> // have already created one? I don't  know which 
> // factories are present in advance or bundles 
> // dynamically add new components factories
> }
> 
> public void  changeConfig(String filter, Map config){
> // 
> configManager.listConfig(filter).stream().filter().any().update(config)
> }
> 
> public void  createSomething(String type, Map config){
>   Configuration cfg = 
> configurationAdmin.createFactoryConfiguration("my.factory.prefix."+type, 
> null);
>   Hashtable prop = new Hashtable<>();
>   prop.put("prop3", "foobar");
>   cfg.update(testProp);
> }
> }
> 
> And now i like to create some services from type A, some from type B and then 
> i like to change configurations of existing services. 
> 
> best regards,
> Matthias
> Von: Jean-Baptiste Onofré 
> Gesendet: Dienstag, 26. März 2019 06:15:26
> An: user@karaf.apache.org
> Betreff: Re: AW: AW: AW: ComponentFactory
>  
> Hi Mathias,
> 
> The factoryPid doesn't change: it's com.foo.bar.
> The configurationPid is based on the factory PID: com.foo.bar. (in
> config:list).
> 
> So you can find "your" configurations based on your factoryPid. You can
> list all configuration for a given factoryPid:
> 
> config:list "(factoryPid=com.foo.bar)"
> 
> Regards
> JB
> 
> On 25/03/2019 20:01, Matthias Leinweber wrote:
> > ... i can iterate over "my" servicefactories.
> > 
> > 
> > *From:* Matthias Leinweber
> > *Sent:* Monday, March 25, 2019 8:00:25 PM
> > *To:* user@karaf.apache.org
> > *Subject:* Re: AW: AW: AW: ComponentFactory
> >  
> > Mhm OK.
> > 
> > I will try to explain what i want to achieve.
> > 
> > My Plan was to create several ManagedserviceFactories all with different
> > factorypids but all with the same prefix. So that i
> > 
> > *From:* Jean-Baptiste Onofré 
> > *Sent:* Monday, March 25, 2019 7:33:52 PM
> > *To:* user@karaf.apache.org
> > *Subject:* Re: AW: AW: AW: ComponentFactory
> >  
> > Not sure I follow you.
> > 
> > What's the issue ?
> > 
> > You have the factory and the configurations for the factory.
> > 
> > Regards
> > JB
> > 
> > On 25/03/2019 18:54, Matthias Leinweber wrote:
> >> Yes,
> >> 
> >> 
> >> but i see "this"
> >> 
> >> Pid:com.ida.moira.operator.factory.Input.Kafka
> >> Collector.8e589bdc-0e72-49dd-b7c5-78234be1b8ba
> >> Facto

AW: AW: AW: AW: ComponentFactory

2019-03-26 Thread Matthias Leinweber
Hi JB,

yes but until i created one there is nothing to iterate/find.
However, i think did not explain my problem very well so i try to explain  what 
i want to do.
Maybe i took the wrong approach to solve my problem. So lets consider the 
following classes:

@Component(
service = MyInterface.class,
configurationPid = "my.factory.prefix.A"
configurationPolicy=ConfigurationPolicy.REQUIRE,
property = {
"prop1=A",
"prop2=foo"})
public class MyComponentA implements MyInterface {

@Modified
public void modified(ComponentContext componentContext){
  //change something in this component
}
public void dostuff(){}
}

@Component(
service = MyInterface.class,
configurationPid = "my.factory.prefix.B"
configurationPolicy=ConfigurationPolicy.REQUIRE,
property = {
"prop1=B",
"prop2=bar"})
public class MyComponentB implements MyInterface {

@Modified
public void modified(ComponentContext componentContext){
  //change something in this component
}
public void dostuff(){}
}

public class MyFancyManager implements MyFancyInterface {

public List listAvailableComponentFactories(){
// how do i "iterate" over all factories without that i
// have already created one? I don't  know which
// factories are present in advance or bundles
// dynamically add new components factories
}

public void  changeConfig(String filter, Map config){
// 
configManager.listConfig(filter).stream().filter().any().update(config)
}

public void  createSomething(String type, Map config){
  Configuration cfg = 
configurationAdmin.createFactoryConfiguration("my.factory.prefix."+type, null);
  Hashtable prop = new Hashtable<>();
  prop.put("prop3", "foobar");
  cfg.update(testProp);
}
}

And now i like to create some services from type A, some from type B and then i 
like to change configurations of existing services.

best regards,
Matthias


Von: Jean-Baptiste Onofré 
Gesendet: Dienstag, 26. März 2019 06:15:26
An: user@karaf.apache.org
Betreff: Re: AW: AW: AW: ComponentFactory

Hi Mathias,

The factoryPid doesn't change: it's com.foo.bar.
The configurationPid is based on the factory PID: com.foo.bar. (in
config:list).

So you can find "your" configurations based on your factoryPid. You can
list all configuration for a given factoryPid:

config:list "(factoryPid=com.foo.bar)"

Regards
JB

On 25/03/2019 20:01, Matthias Leinweber wrote:
> ... i can iterate over "my" servicefactories.
>
> 
> *From:* Matthias Leinweber
> *Sent:* Monday, March 25, 2019 8:00:25 PM
> *To:* user@karaf.apache.org
> *Subject:* Re: AW: AW: AW: ComponentFactory
>
> Mhm OK.
>
> I will try to explain what i want to achieve.
>
> My Plan was to create several ManagedserviceFactories all with different
> factorypids but all with the same prefix. So that i
> ----
> *From:* Jean-Baptiste Onofré 
> *Sent:* Monday, March 25, 2019 7:33:52 PM
> *To:* user@karaf.apache.org
> *Subject:* Re: AW: AW: AW: ComponentFactory
>
> Not sure I follow you.
>
> What's the issue ?
>
> You have the factory and the configurations for the factory.
>
> Regards
> JB
>
> On 25/03/2019 18:54, Matthias Leinweber wrote:
>> Yes,
>>
>>
>> but i see "this"
>>
>> Pid:com.ida.moira.operator.factory.Input.Kafka
>> Collector.8e589bdc-0e72-49dd-b7c5-78234be1b8ba
>> FactoryPid: com.ida.moira.operator.factory.Input.Kafka Collector
>> BundleLocation: null
>> Properties:
>>com.ida.moira.operator.name = foo
>>com.ida.moira.operator.namespace = hallo
>>service.factoryPid = com.ida.moira.operator.factory.Input.Kafka Collector
>>service.pid = com.ida.moira.operator.factory.Input.Kafka
>> Collector.8e589bdc-0e72-49dd-b7c5-78234be1b8ba
>>
>> ..after Configuration but what i need is a lookup which factoryPids are
>> avaiable...
>>
>> best regards,
>> Matthias
>>
>> 
>> *Von:* Jean-Baptiste Onofré 
>> *Gesendet:* Montag, 25. März 2019 18:36:17
>> *An:* user@karaf.apache.org
>> *Betreff:* Re: AW: AW: ComponentFactory
>>
>> Hi,
>>
>> you should have a config with FactoryPid as property right ?
>>
>> For instance, when I do config:list, I can see the factory for fileinstall:
>>
>> Pid:
>> org.apache.felix.fileinstall.d10ae13a-7909-4

Re: AW: AW: AW: ComponentFactory

2019-03-25 Thread Jean-Baptiste Onofré
Hi Mathias,

The factoryPid doesn't change: it's com.foo.bar.
The configurationPid is based on the factory PID: com.foo.bar. (in
config:list).

So you can find "your" configurations based on your factoryPid. You can
list all configuration for a given factoryPid:

config:list "(factoryPid=com.foo.bar)"

Regards
JB

On 25/03/2019 20:01, Matthias Leinweber wrote:
> ... i can iterate over "my" servicefactories.
> 
> 
> *From:* Matthias Leinweber
> *Sent:* Monday, March 25, 2019 8:00:25 PM
> *To:* user@karaf.apache.org
> *Subject:* Re: AW: AW: AW: ComponentFactory
>  
> Mhm OK.
> 
> I will try to explain what i want to achieve.
> 
> My Plan was to create several ManagedserviceFactories all with different
> factorypids but all with the same prefix. So that i
> 
> *From:* Jean-Baptiste Onofré 
> *Sent:* Monday, March 25, 2019 7:33:52 PM
> *To:* user@karaf.apache.org
> *Subject:* Re: AW: AW: AW: ComponentFactory
>  
> Not sure I follow you.
> 
> What's the issue ?
> 
> You have the factory and the configurations for the factory.
> 
> Regards
> JB
> 
> On 25/03/2019 18:54, Matthias Leinweber wrote:
>> Yes,
>> 
>> 
>> but i see "this"
>> 
>> Pid:            com.ida.moira.operator.factory.Input.Kafka
>> Collector.8e589bdc-0e72-49dd-b7c5-78234be1b8ba
>> FactoryPid:     com.ida.moira.operator.factory.Input.Kafka Collector
>> BundleLocation: null
>> Properties:
>>    com.ida.moira.operator.name = foo
>>    com.ida.moira.operator.namespace = hallo
>>    service.factoryPid = com.ida.moira.operator.factory.Input.Kafka Collector
>>    service.pid = com.ida.moira.operator.factory.Input.Kafka
>> Collector.8e589bdc-0e72-49dd-b7c5-78234be1b8ba
>> 
>> ..after Configuration but what i need is a lookup which factoryPids are
>> avaiable...
>> 
>> best regards,
>> Matthias
>> 
>> 
>> *Von:* Jean-Baptiste Onofré 
>> *Gesendet:* Montag, 25. März 2019 18:36:17
>> *An:* user@karaf.apache.org
>> *Betreff:* Re: AW: AW: ComponentFactory
>>  
>> Hi,
>> 
>> you should have a config with FactoryPid as property right ?
>> 
>> For instance, when I do config:list, I can see the factory for fileinstall:
>> 
>> Pid:
>> org.apache.felix.fileinstall.d10ae13a-7909-4881-8014-d0901748a832
>> 
>> 
>>   FactoryPid:
>> org.apache.felix.fileinstall
>> 
>> 
>>   BundleLocation: ?
>> 
>> Regards
>> JB
>> 
>> On 25/03/2019 18:30, Matthias Leinweber wrote:
>>> Hi JB,
>>> 
>>> 
>>> still a small problem...
>>> 
>>> @Component(
>>>     service = EventOperator.class,
>>>     immediate = true,
>>>     configurationPid = EventOperator.PROP_FACTORY_PREFIX +
>>> Category.INPUT + "." + KafkaOperator.TYPE,
>>>     configurationPolicy=ConfigurationPolicy.REQUIRE,
>>>     property = {
>>>     EventOperator.PROP_CATEGORY + "=" + Category.INPUT,
>>>     EventOperator.PROP_TYPE + "=" + KafkaOperator.TYPE})
>>> public class KafkaOperator extends  AbstractEventOperator {
>>> 
>>> Does not result in a managed service factory which is visible via
>>> config:list ..
>>> After createFactoryConfiguration the configuration object (config:list)
>>> and the service (service:list) are present. But the factory is not.
>>> 
>>> I think i am still missing a basic concept?
>>> 
>>> regards,
>>> Matthias
>>> 
>>> 
>>> *Von:* Jean-Baptiste Onofré 
>>> *Gesendet:* Montag, 25. März 2019 16:57:59
>>> *An:* user@karaf.apache.org
>>> *Betreff:* Re: AW: ComponentFactory
>>>  
>>> Hi Matthias,
>>> 
>>> as always, happy to help ;)
>>> 
>>> config:list command/service is able to list the configuration (including
>>> the factories).
>>> 
>>> Regards
>>> JB
>>> 
>>> On 25/03/2019 16:07, Matthias Leinweber wrote:
>>>> Thank you very much.
>>>> 
>>>> Thanks for the explanation, Tim. I simply thought that it is possible to
>>>> access the (newInstance) components 

Re: ComponentFactory

2019-03-25 Thread David Jencks
I’m not sure I understand what you are trying to do, since you keep mentioning 
ManagedServiceFactory but I don’t see any such in your code, and they don’t 
play well with DS.  I think you want to have a factory component (i.e. 
ComponentFactory) where the newInstances are registered with DS as components 
accepting factory configurations, so you won’t actually get a component 
instance until a configuration is supplied for one of the “newInstance” 
components. This isn’t possible and can’t really be done since newInstance 
essentially returns the single instance, and you want multiple instances.

Since it’s all the same component code, why are different factoryPids useful 
rather than some other configuration element?

thanks
david jencks

> On Mar 25, 2019, at 12:01 PM, Matthias Leinweber 
>  wrote:
> 
> ... i can iterate over "my" servicefactories.
> 
> From: Matthias Leinweber
> Sent: Monday, March 25, 2019 8:00:25 PM
> To: user@karaf.apache.org
> Subject: Re: AW: AW: AW: ComponentFactory
>  
> Mhm OK.
> 
> I will try to explain what i want to achieve.
> 
> My Plan was to create several ManagedserviceFactories all with different 
> factorypids but all with the same prefix. So that i
> From: Jean-Baptiste Onofré 
> Sent: Monday, March 25, 2019 7:33:52 PM
> To: user@karaf.apache.org
> Subject: Re: AW: AW: AW: ComponentFactory
>  
> Not sure I follow you.
> 
> What's the issue ?
> 
> You have the factory and the configurations for the factory.
> 
> Regards
> JB
> 
> On 25/03/2019 18:54, Matthias Leinweber wrote:
> > Yes,
> > 
> > 
> > but i see "this"
> > 
> > Pid:com.ida.moira.operator.factory.Input.Kafka
> > Collector.8e589bdc-0e72-49dd-b7c5-78234be1b8ba
> > FactoryPid: com.ida.moira.operator.factory.Input.Kafka Collector
> > BundleLocation: null
> > Properties:
> >com.ida.moira.operator.name = foo
> >com.ida.moira.operator.namespace = hallo
> >service.factoryPid = com.ida.moira.operator.factory.Input.Kafka Collector
> >service.pid = com.ida.moira.operator.factory.Input.Kafka
> > Collector.8e589bdc-0e72-49dd-b7c5-78234be1b8ba
> > 
> > ..after Configuration but what i need is a lookup which factoryPids are
> > avaiable...
> > 
> > best regards,
> > Matthias
> > 
> > 
> > *Von:* Jean-Baptiste Onofré 
> > *Gesendet:* Montag, 25. März 2019 18:36:17
> > *An:* user@karaf.apache.org
> > *Betreff:* Re: AW: AW: ComponentFactory
> >  
> > Hi,
> > 
> > you should have a config with FactoryPid as property right ?
> > 
> > For instance, when I do config:list, I can see the factory for fileinstall:
> > 
> > Pid:
> > org.apache.felix.fileinstall.d10ae13a-7909-4881-8014-d0901748a832
> > 
> > 
> >   FactoryPid:
> > org.apache.felix.fileinstall
> > 
> > 
> >   BundleLocation: ?
> > 
> > Regards
> > JB
> > 
> > On 25/03/2019 18:30, Matthias Leinweber wrote:
> >> Hi JB,
> >> 
> >> 
> >> still a small problem...
> >> 
> >> @Component(
> >> service = EventOperator.class,
> >> immediate = true,
> >> configurationPid = EventOperator.PROP_FACTORY_PREFIX +
> >> Category.INPUT + "." + KafkaOperator.TYPE,
> >> configurationPolicy=ConfigurationPolicy.REQUIRE,
> >> property = {
> >> EventOperator.PROP_CATEGORY + "=" + Category.INPUT,
> >> EventOperator.PROP_TYPE + "=" + KafkaOperator.TYPE})
> >> public class KafkaOperator extends  AbstractEventOperator {
> >> 
> >> Does not result in a managed service factory which is visible via
> >> config:list ..
> >> After createFactoryConfiguration the configuration object (config:list)
> >> and the service (service:list) are present. But the factory is not.
> >> 
> >> I think i am still missing a basic concept?
> >> 
> >> regards,
> >> Matthias
> >> 
> >> 
> >> *Von:* Jean-Baptiste Onofré 
> >> *Gesendet:* Montag, 25. März 2019 16:57:59
> >> *An:* user@karaf.apache.org
> >> *Betreff:* Re: AW: ComponentFactory
> >>  
> >> Hi Matthias,
> >> 
> >> as always, happy to help ;)
> >> 
> >> config:list command/service is able to list the configuration (includin

Re: AW: AW: AW: ComponentFactory

2019-03-25 Thread Matthias Leinweber
... i can iterate over "my" servicefactories.


From: Matthias Leinweber
Sent: Monday, March 25, 2019 8:00:25 PM
To: user@karaf.apache.org
Subject: Re: AW: AW: AW: ComponentFactory

Mhm OK.

I will try to explain what i want to achieve.

My Plan was to create several ManagedserviceFactories all with different 
factorypids but all with the same prefix. So that i

From: Jean-Baptiste Onofré 
Sent: Monday, March 25, 2019 7:33:52 PM
To: user@karaf.apache.org
Subject: Re: AW: AW: AW: ComponentFactory

Not sure I follow you.

What's the issue ?

You have the factory and the configurations for the factory.

Regards
JB

On 25/03/2019 18:54, Matthias Leinweber wrote:
> Yes,
>
>
> but i see "this"
>
> Pid:com.ida.moira.operator.factory.Input.Kafka
> Collector.8e589bdc-0e72-49dd-b7c5-78234be1b8ba
> FactoryPid: com.ida.moira.operator.factory.Input.Kafka Collector
> BundleLocation: null
> Properties:
>com.ida.moira.operator.name = foo
>com.ida.moira.operator.namespace = hallo
>service.factoryPid = com.ida.moira.operator.factory.Input.Kafka Collector
>service.pid = com.ida.moira.operator.factory.Input.Kafka
> Collector.8e589bdc-0e72-49dd-b7c5-78234be1b8ba
>
> ..after Configuration but what i need is a lookup which factoryPids are
> avaiable...
>
> best regards,
> Matthias
>
> 
> *Von:* Jean-Baptiste Onofré 
> *Gesendet:* Montag, 25. März 2019 18:36:17
> *An:* user@karaf.apache.org
> *Betreff:* Re: AW: AW: ComponentFactory
>
> Hi,
>
> you should have a config with FactoryPid as property right ?
>
> For instance, when I do config:list, I can see the factory for fileinstall:
>
> Pid:
> org.apache.felix.fileinstall.d10ae13a-7909-4881-8014-d0901748a832
>
>
>   FactoryPid:
> org.apache.felix.fileinstall
>
>
>   BundleLocation: ?
>
> Regards
> JB
>
> On 25/03/2019 18:30, Matthias Leinweber wrote:
>> Hi JB,
>>
>>
>> still a small problem...
>>
>> @Component(
>> service = EventOperator.class,
>> immediate = true,
>> configurationPid = EventOperator.PROP_FACTORY_PREFIX +
>> Category.INPUT + "." + KafkaOperator.TYPE,
>> configurationPolicy=ConfigurationPolicy.REQUIRE,
>> property = {
>> EventOperator.PROP_CATEGORY + "=" + Category.INPUT,
>> EventOperator.PROP_TYPE + "=" + KafkaOperator.TYPE})
>> public class KafkaOperator extends  AbstractEventOperator {
>>
>> Does not result in a managed service factory which is visible via
>> config:list ..
>> After createFactoryConfiguration the configuration object (config:list)
>> and the service (service:list) are present. But the factory is not.
>>
>> I think i am still missing a basic concept?
>>
>> regards,
>> Matthias
>>
>> 
>> *Von:* Jean-Baptiste Onofré 
>> *Gesendet:* Montag, 25. März 2019 16:57:59
>> *An:* user@karaf.apache.org
>> *Betreff:* Re: AW: ComponentFactory
>>
>> Hi Matthias,
>>
>> as always, happy to help ;)
>>
>> config:list command/service is able to list the configuration (including
>> the factories).
>>
>> Regards
>> JB
>>
>> On 25/03/2019 16:07, Matthias Leinweber wrote:
>>> Thank you very much.
>>>
>>> Thanks for the explanation, Tim. I simply thought that it is possible to
>>> access the (newInstance) components with their configurationPid but it
>>> makes totally sense that this makes no sense ;)
>>>
>>> Also thank you for the decanter link, exactly what i was looking for.
>>> And my example is working now.
>>>
>>> But an additional Question:
>>> Is there a way to list available factoryPids (before creating a
>>> configuration)?
>>>
>>> best regards,
>>> Matthias
>>>
>>>
>>>
>>>
>>> 
>>> *Von:* Jean-Baptiste Onofré 
>>> *Gesendet:* Montag, 25. März 2019 15:42
>>> *An:* user@karaf.apache.org
>>> *Betreff:* Re: ComponentFactory
>>>
>>> By the way, you also have a "core" example here:
>>>
>>> https://github.com/apache/karaf/tree/master/examples/karaf-config-example/karaf-config-example-managed-factory
>>>
>>> and the equiv

Re: AW: AW: AW: ComponentFactory

2019-03-25 Thread Matthias Leinweber
Mhm OK.

I will try to explain what i want to achieve.

My Plan was to create several ManagedserviceFactories all with different 
factorypids but all with the same prefix. So that i

From: Jean-Baptiste Onofré 
Sent: Monday, March 25, 2019 7:33:52 PM
To: user@karaf.apache.org
Subject: Re: AW: AW: AW: ComponentFactory

Not sure I follow you.

What's the issue ?

You have the factory and the configurations for the factory.

Regards
JB

On 25/03/2019 18:54, Matthias Leinweber wrote:
> Yes,
>
>
> but i see "this"
>
> Pid:com.ida.moira.operator.factory.Input.Kafka
> Collector.8e589bdc-0e72-49dd-b7c5-78234be1b8ba
> FactoryPid: com.ida.moira.operator.factory.Input.Kafka Collector
> BundleLocation: null
> Properties:
>com.ida.moira.operator.name = foo
>com.ida.moira.operator.namespace = hallo
>service.factoryPid = com.ida.moira.operator.factory.Input.Kafka Collector
>service.pid = com.ida.moira.operator.factory.Input.Kafka
> Collector.8e589bdc-0e72-49dd-b7c5-78234be1b8ba
>
> ..after Configuration but what i need is a lookup which factoryPids are
> avaiable...
>
> best regards,
> Matthias
>
> 
> *Von:* Jean-Baptiste Onofré 
> *Gesendet:* Montag, 25. März 2019 18:36:17
> *An:* user@karaf.apache.org
> *Betreff:* Re: AW: AW: ComponentFactory
>
> Hi,
>
> you should have a config with FactoryPid as property right ?
>
> For instance, when I do config:list, I can see the factory for fileinstall:
>
> Pid:
> org.apache.felix.fileinstall.d10ae13a-7909-4881-8014-d0901748a832
>
>
>   FactoryPid:
> org.apache.felix.fileinstall
>
>
>   BundleLocation: ?
>
> Regards
> JB
>
> On 25/03/2019 18:30, Matthias Leinweber wrote:
>> Hi JB,
>>
>>
>> still a small problem...
>>
>> @Component(
>> service = EventOperator.class,
>> immediate = true,
>> configurationPid = EventOperator.PROP_FACTORY_PREFIX +
>> Category.INPUT + "." + KafkaOperator.TYPE,
>> configurationPolicy=ConfigurationPolicy.REQUIRE,
>> property = {
>> EventOperator.PROP_CATEGORY + "=" + Category.INPUT,
>> EventOperator.PROP_TYPE + "=" + KafkaOperator.TYPE})
>> public class KafkaOperator extends  AbstractEventOperator {
>>
>> Does not result in a managed service factory which is visible via
>> config:list ..
>> After createFactoryConfiguration the configuration object (config:list)
>> and the service (service:list) are present. But the factory is not.
>>
>> I think i am still missing a basic concept?
>>
>> regards,
>> Matthias
>>
>> 
>> *Von:* Jean-Baptiste Onofré 
>> *Gesendet:* Montag, 25. März 2019 16:57:59
>> *An:* user@karaf.apache.org
>> *Betreff:* Re: AW: ComponentFactory
>>
>> Hi Matthias,
>>
>> as always, happy to help ;)
>>
>> config:list command/service is able to list the configuration (including
>> the factories).
>>
>> Regards
>> JB
>>
>> On 25/03/2019 16:07, Matthias Leinweber wrote:
>>> Thank you very much.
>>>
>>> Thanks for the explanation, Tim. I simply thought that it is possible to
>>> access the (newInstance) components with their configurationPid but it
>>> makes totally sense that this makes no sense ;)
>>>
>>> Also thank you for the decanter link, exactly what i was looking for.
>>> And my example is working now.
>>>
>>> But an additional Question:
>>> Is there a way to list available factoryPids (before creating a
>>> configuration)?
>>>
>>> best regards,
>>> Matthias
>>>
>>>
>>>
>>>
>>> 
>>> *Von:* Jean-Baptiste Onofré 
>>> *Gesendet:* Montag, 25. März 2019 15:42
>>> *An:* user@karaf.apache.org
>>> *Betreff:* Re: ComponentFactory
>>>
>>> By the way, you also have a "core" example here:
>>>
>>> https://github.com/apache/karaf/tree/master/examples/karaf-config-example/karaf-config-example-managed-factory
>>>
>>> and the equivalent with SCR:
>>>
>>> https://github.com/apache/karaf/tree/master/examples/karaf-config-example/karaf-config-example-scr
>>>
>>> Regards
>>> JB
>>>
>>> On 25/03

Re: AW: AW: AW: ComponentFactory

2019-03-25 Thread Jean-Baptiste Onofré
Not sure I follow you.

What's the issue ?

You have the factory and the configurations for the factory.

Regards
JB

On 25/03/2019 18:54, Matthias Leinweber wrote:
> Yes,
> 
> 
> but i see "this"
> 
> Pid:            com.ida.moira.operator.factory.Input.Kafka
> Collector.8e589bdc-0e72-49dd-b7c5-78234be1b8ba
> FactoryPid:     com.ida.moira.operator.factory.Input.Kafka Collector
> BundleLocation: null
> Properties:
>    com.ida.moira.operator.name = foo
>    com.ida.moira.operator.namespace = hallo
>    service.factoryPid = com.ida.moira.operator.factory.Input.Kafka Collector
>    service.pid = com.ida.moira.operator.factory.Input.Kafka
> Collector.8e589bdc-0e72-49dd-b7c5-78234be1b8ba
> 
> ..after Configuration but what i need is a lookup which factoryPids are
> avaiable...
> 
> best regards,
> Matthias
> 
> 
> *Von:* Jean-Baptiste Onofré 
> *Gesendet:* Montag, 25. März 2019 18:36:17
> *An:* user@karaf.apache.org
> *Betreff:* Re: AW: AW: ComponentFactory
>  
> Hi,
> 
> you should have a config with FactoryPid as property right ?
> 
> For instance, when I do config:list, I can see the factory for fileinstall:
> 
> Pid:
> org.apache.felix.fileinstall.d10ae13a-7909-4881-8014-d0901748a832
> 
> 
>   FactoryPid:
> org.apache.felix.fileinstall
> 
> 
>   BundleLocation: ?
> 
> Regards
> JB
> 
> On 25/03/2019 18:30, Matthias Leinweber wrote:
>> Hi JB,
>> 
>> 
>> still a small problem...
>> 
>> @Component(
>>     service = EventOperator.class,
>>     immediate = true,
>>     configurationPid = EventOperator.PROP_FACTORY_PREFIX +
>> Category.INPUT + "." + KafkaOperator.TYPE,
>>     configurationPolicy=ConfigurationPolicy.REQUIRE,
>>     property = {
>>     EventOperator.PROP_CATEGORY + "=" + Category.INPUT,
>>     EventOperator.PROP_TYPE + "=" + KafkaOperator.TYPE})
>> public class KafkaOperator extends  AbstractEventOperator {
>> 
>> Does not result in a managed service factory which is visible via
>> config:list ..
>> After createFactoryConfiguration the configuration object (config:list)
>> and the service (service:list) are present. But the factory is not.
>> 
>> I think i am still missing a basic concept?
>> 
>> regards,
>> Matthias
>> 
>> 
>> *Von:* Jean-Baptiste Onofré 
>> *Gesendet:* Montag, 25. März 2019 16:57:59
>> *An:* user@karaf.apache.org
>> *Betreff:* Re: AW: ComponentFactory
>>  
>> Hi Matthias,
>> 
>> as always, happy to help ;)
>> 
>> config:list command/service is able to list the configuration (including
>> the factories).
>> 
>> Regards
>> JB
>> 
>> On 25/03/2019 16:07, Matthias Leinweber wrote:
>>> Thank you very much.
>>> 
>>> Thanks for the explanation, Tim. I simply thought that it is possible to
>>> access the (newInstance) components with their configurationPid but it
>>> makes totally sense that this makes no sense ;)
>>> 
>>> Also thank you for the decanter link, exactly what i was looking for.
>>> And my example is working now.
>>> 
>>> But an additional Question:
>>> Is there a way to list available factoryPids (before creating a
>>> configuration)?
>>> 
>>> best regards,
>>> Matthias
>>> 
>>> 
>>> 
>>> 
>>> 
>>> *Von:* Jean-Baptiste Onofré 
>>> *Gesendet:* Montag, 25. März 2019 15:42
>>> *An:* user@karaf.apache.org
>>> *Betreff:* Re: ComponentFactory
>>>  
>>> By the way, you also have a "core" example here:
>>> 
>>> https://github.com/apache/karaf/tree/master/examples/karaf-config-example/karaf-config-example-managed-factory
>>> 
>>> and the equivalent with SCR:
>>> 
>>> https://github.com/apache/karaf/tree/master/examples/karaf-config-example/karaf-config-example-scr
>>> 
>>> Regards
>>> JB
>>> 
>>> On 25/03/2019 15:39, Jean-Baptiste Onofré wrote:
>>>> Hi Matthias,
>>>> 
>>>> What about creating a new service instance with a ManagedServiceFactories ?
>>>> 
>>>> If you use SCR, it's pretty easy. It's the way it's implemented in
>>>> Decant

AW: AW: AW: ComponentFactory

2019-03-25 Thread Matthias Leinweber
Yes,


but i see "this"


Pid:com.ida.moira.operator.factory.Input.Kafka 
Collector.8e589bdc-0e72-49dd-b7c5-78234be1b8ba
FactoryPid: com.ida.moira.operator.factory.Input.Kafka Collector
BundleLocation: null
Properties:
   com.ida.moira.operator.name = foo
   com.ida.moira.operator.namespace = hallo
   service.factoryPid = com.ida.moira.operator.factory.Input.Kafka Collector
   service.pid = com.ida.moira.operator.factory.Input.Kafka 
Collector.8e589bdc-0e72-49dd-b7c5-78234be1b8ba

..after Configuration but what i need is a lookup which factoryPids are 
avaiable...

best regards,
Matthias


Von: Jean-Baptiste Onofré 
Gesendet: Montag, 25. März 2019 18:36:17
An: user@karaf.apache.org
Betreff: Re: AW: AW: ComponentFactory

Hi,

you should have a config with FactoryPid as property right ?

For instance, when I do config:list, I can see the factory for fileinstall:

Pid:
org.apache.felix.fileinstall.d10ae13a-7909-4881-8014-d0901748a832


  FactoryPid:
org.apache.felix.fileinstall


  BundleLocation: ?

Regards
JB

On 25/03/2019 18:30, Matthias Leinweber wrote:
> Hi JB,
>
>
> still a small problem...
>
> @Component(
> service = EventOperator.class,
> immediate = true,
> configurationPid = EventOperator.PROP_FACTORY_PREFIX +
> Category.INPUT + "." + KafkaOperator.TYPE,
> configurationPolicy=ConfigurationPolicy.REQUIRE,
> property = {
> EventOperator.PROP_CATEGORY + "=" + Category.INPUT,
> EventOperator.PROP_TYPE + "=" + KafkaOperator.TYPE})
> public class KafkaOperator extends  AbstractEventOperator {
>
> Does not result in a managed service factory which is visible via
> config:list ..
> After createFactoryConfiguration the configuration object (config:list)
> and the service (service:list) are present. But the factory is not.
>
> I think i am still missing a basic concept?
>
> regards,
> Matthias
>
> 
> *Von:* Jean-Baptiste Onofré 
> *Gesendet:* Montag, 25. März 2019 16:57:59
> *An:* user@karaf.apache.org
> *Betreff:* Re: AW: ComponentFactory
>
> Hi Matthias,
>
> as always, happy to help ;)
>
> config:list command/service is able to list the configuration (including
> the factories).
>
> Regards
> JB
>
> On 25/03/2019 16:07, Matthias Leinweber wrote:
>> Thank you very much.
>>
>> Thanks for the explanation, Tim. I simply thought that it is possible to
>> access the (newInstance) components with their configurationPid but it
>> makes totally sense that this makes no sense ;)
>>
>> Also thank you for the decanter link, exactly what i was looking for.
>> And my example is working now.
>>
>> But an additional Question:
>> Is there a way to list available factoryPids (before creating a
>> configuration)?
>>
>> best regards,
>> Matthias
>>
>>
>>
>>
>> 
>> *Von:* Jean-Baptiste Onofré 
>> *Gesendet:* Montag, 25. März 2019 15:42
>> *An:* user@karaf.apache.org
>> *Betreff:* Re: ComponentFactory
>>
>> By the way, you also have a "core" example here:
>>
>> https://github.com/apache/karaf/tree/master/examples/karaf-config-example/karaf-config-example-managed-factory
>>
>> and the equivalent with SCR:
>>
>> https://github.com/apache/karaf/tree/master/examples/karaf-config-example/karaf-config-example-scr
>>
>> Regards
>> JB
>>
>> On 25/03/2019 15:39, Jean-Baptiste Onofré wrote:
>>> Hi Matthias,
>>>
>>> What about creating a new service instance with a ManagedServiceFactories ?
>>>
>>> If you use SCR, it's pretty easy. It's the way it's implemented in
>>> Decanter for instance.
>>>
>>> For instance, a new TailerListenerAdapter service will be registered for
>>> each etc/org.apache.karaf.decanter.collector.file-foo.cfg file created:
>>>
>>> https://github.com/apache/karaf-decanter/blob/master/collector/file/src/main/java/org/apache/karaf/decanter/collector/file/DecanterTailerListener.java
>>>
>>> Is it what you are looking for ?
>>>
>>> Regards
>>> JB
>>>
>>> On 25/03/2019 15:32, Matthias Leinweber wrote:
>>>> Hello Karaf Team,
>>>>
>>>>
>>>> i don't know if it is the correct mailing list, because its just
>>>> possibly related to karaf specific implementation.
>>>>
>>>>
>&g

Re: AW: AW: ComponentFactory

2019-03-25 Thread Jean-Baptiste Onofré
Hi,

you should have a config with FactoryPid as property right ?

For instance, when I do config:list, I can see the factory for fileinstall:

Pid:
org.apache.felix.fileinstall.d10ae13a-7909-4881-8014-d0901748a832


  FactoryPid:
org.apache.felix.fileinstall


  BundleLocation: ?

Regards
JB

On 25/03/2019 18:30, Matthias Leinweber wrote:
> Hi JB,
> 
> 
> still a small problem...
> 
> @Component(
>     service = EventOperator.class,
>     immediate = true,
>     configurationPid = EventOperator.PROP_FACTORY_PREFIX +
> Category.INPUT + "." + KafkaOperator.TYPE,
>     configurationPolicy=ConfigurationPolicy.REQUIRE,
>     property = {
>     EventOperator.PROP_CATEGORY + "=" + Category.INPUT,
>     EventOperator.PROP_TYPE + "=" + KafkaOperator.TYPE})
> public class KafkaOperator extends  AbstractEventOperator {
> 
> Does not result in a managed service factory which is visible via
> config:list ..
> After createFactoryConfiguration the configuration object (config:list)
> and the service (service:list) are present. But the factory is not.
> 
> I think i am still missing a basic concept?
> 
> regards,
> Matthias
> 
> 
> *Von:* Jean-Baptiste Onofré 
> *Gesendet:* Montag, 25. März 2019 16:57:59
> *An:* user@karaf.apache.org
> *Betreff:* Re: AW: ComponentFactory
>  
> Hi Matthias,
> 
> as always, happy to help ;)
> 
> config:list command/service is able to list the configuration (including
> the factories).
> 
> Regards
> JB
> 
> On 25/03/2019 16:07, Matthias Leinweber wrote:
>> Thank you very much.
>> 
>> Thanks for the explanation, Tim. I simply thought that it is possible to
>> access the (newInstance) components with their configurationPid but it
>> makes totally sense that this makes no sense ;)
>> 
>> Also thank you for the decanter link, exactly what i was looking for.
>> And my example is working now.
>> 
>> But an additional Question:
>> Is there a way to list available factoryPids (before creating a
>> configuration)?
>> 
>> best regards,
>> Matthias
>> 
>> 
>> 
>> 
>> 
>> *Von:* Jean-Baptiste Onofré 
>> *Gesendet:* Montag, 25. März 2019 15:42
>> *An:* user@karaf.apache.org
>> *Betreff:* Re: ComponentFactory
>>  
>> By the way, you also have a "core" example here:
>> 
>> https://github.com/apache/karaf/tree/master/examples/karaf-config-example/karaf-config-example-managed-factory
>> 
>> and the equivalent with SCR:
>> 
>> https://github.com/apache/karaf/tree/master/examples/karaf-config-example/karaf-config-example-scr
>> 
>> Regards
>> JB
>> 
>> On 25/03/2019 15:39, Jean-Baptiste Onofré wrote:
>>> Hi Matthias,
>>> 
>>> What about creating a new service instance with a ManagedServiceFactories ?
>>> 
>>> If you use SCR, it's pretty easy. It's the way it's implemented in
>>> Decanter for instance.
>>> 
>>> For instance, a new TailerListenerAdapter service will be registered for
>>> each etc/org.apache.karaf.decanter.collector.file-foo.cfg file created:
>>> 
>>> https://github.com/apache/karaf-decanter/blob/master/collector/file/src/main/java/org/apache/karaf/decanter/collector/file/DecanterTailerListener.java
>>> 
>>> Is it what you are looking for ?
>>> 
>>> Regards
>>> JB
>>> 
>>> On 25/03/2019 15:32, Matthias Leinweber wrote:
>>>> Hello Karaf Team, 
>>>>
>>>>
>>>> i don't know if it is the correct mailing list, because its just
>>>> possibly related to karaf specific implementation.
>>>>
>>>>
>>>> I try to configure multiple services which are created by a component
>>>> factory (newInstance). But i don't find a way how i can give a
>>>> unique pid to a created service instance. 
>>>>
>>>> Did i understand something wrong an do i have to use
>>>> ManagedServiceFactories?
>>>>
>>>> regards,
>>>> Matthias
>>>>
>>>>
>>>> Matthias Leinweber 
>>>>
>>>> Managing Director & Chief Analytics Officer
>>>>
>>>>  1491765456561_darkwtext.resized.png
>>>>
>>>> Intelligent Data Analytics GmbH & Co. KG 
>>>>
&

AW: AW: ComponentFactory

2019-03-25 Thread Matthias Leinweber
Hi JB,


still a small problem...


@Component(
service = EventOperator.class,
immediate = true,
configurationPid = EventOperator.PROP_FACTORY_PREFIX + Category.INPUT + "." 
+ KafkaOperator.TYPE,
configurationPolicy=ConfigurationPolicy.REQUIRE,
property = {
EventOperator.PROP_CATEGORY + "=" + Category.INPUT,
EventOperator.PROP_TYPE + "=" + KafkaOperator.TYPE})
public class KafkaOperator extends  AbstractEventOperator {

Does not result in a managed service factory which is visible via config:list ..
After createFactoryConfiguration the configuration object (config:list) and the 
service (service:list) are present. But the factory is not.

I think i am still missing a basic concept?

regards,
Matthias


Von: Jean-Baptiste Onofré 
Gesendet: Montag, 25. März 2019 16:57:59
An: user@karaf.apache.org
Betreff: Re: AW: ComponentFactory

Hi Matthias,

as always, happy to help ;)

config:list command/service is able to list the configuration (including
the factories).

Regards
JB

On 25/03/2019 16:07, Matthias Leinweber wrote:
> Thank you very much.
>
> Thanks for the explanation, Tim. I simply thought that it is possible to
> access the (newInstance) components with their configurationPid but it
> makes totally sense that this makes no sense ;)
>
> Also thank you for the decanter link, exactly what i was looking for.
> And my example is working now.
>
> But an additional Question:
> Is there a way to list available factoryPids (before creating a
> configuration)?
>
> best regards,
> Matthias
>
>
>
>
> 
> *Von:* Jean-Baptiste Onofré 
> *Gesendet:* Montag, 25. März 2019 15:42
> *An:* user@karaf.apache.org
> *Betreff:* Re: ComponentFactory
>
> By the way, you also have a "core" example here:
>
> https://github.com/apache/karaf/tree/master/examples/karaf-config-example/karaf-config-example-managed-factory
>
> and the equivalent with SCR:
>
> https://github.com/apache/karaf/tree/master/examples/karaf-config-example/karaf-config-example-scr
>
> Regards
> JB
>
> On 25/03/2019 15:39, Jean-Baptiste Onofré wrote:
>> Hi Matthias,
>>
>> What about creating a new service instance with a ManagedServiceFactories ?
>>
>> If you use SCR, it's pretty easy. It's the way it's implemented in
>> Decanter for instance.
>>
>> For instance, a new TailerListenerAdapter service will be registered for
>> each etc/org.apache.karaf.decanter.collector.file-foo.cfg file created:
>>
>> https://github.com/apache/karaf-decanter/blob/master/collector/file/src/main/java/org/apache/karaf/decanter/collector/file/DecanterTailerListener.java
>>
>> Is it what you are looking for ?
>>
>> Regards
>> JB
>>
>> On 25/03/2019 15:32, Matthias Leinweber wrote:
>>> Hello Karaf Team,
>>>
>>>
>>> i don't know if it is the correct mailing list, because its just
>>> possibly related to karaf specific implementation.
>>>
>>>
>>> I try to configure multiple services which are created by a component
>>> factory (newInstance). But i don't find a way how i can give a
>>> unique pid to a created service instance.
>>>
>>> Did i understand something wrong an do i have to use
>>> ManagedServiceFactories?
>>>
>>> regards,
>>> Matthias
>>>
>>>
>>> Matthias Leinweber
>>>
>>> Managing Director & Chief Analytics Officer
>>>
>>>  1491765456561_darkwtext.resized.png
>>>
>>> Intelligent Data Analytics GmbH & Co. KG
>>>
>>>
>>>
>>> c/o TechQuartier
>>>
>>> Platz der Einheit 2
>>> 60327 Frankfurt
>>>
>>> Mobil: 0151/73006079
>>>
>>> Telefon: 06421/4805274
>>> Telefax: 06421/4805275
>>> E-Mail: matthias.leinwe...@ida-analytics.de
>>>
>>> Internet: www.ida-analytics.de<http://www.ida-analytics.de> 
>>> <http://www.ida-analytics.de>
>>>
>>>
>>> Unternehmenssitz: Frankfurt am Main | Handelsregister
>>> beim Amtsgericht: Frankfurt am Main, Registernummer: HRA 49357 | USt.
>>> ID-Nr.: DE310205810 | Finanzamt: Frankfurt am Main
>>>
>>> Persönlich haftende Gesellschafterin: IDA Intelligent Data Analytics
>>> GmbH | Sitz: Frankfurt am Main | Handelsregister
>>> beim Amtsgericht: Frankfurt am Main | Handelsregister-Nummer: HRB
>>> 106805 | Geschäftsführer: Mohamed Ayadi, Nils Björn Krugmann, Dipl.-Inf.
>>> Matthias Leinweber, Dipl.-Inf. Marc Seidemann
>>>
>>>  
>>>
>>> If you are not the addressee, please inform us immediately that you have
>>> received this e-mail by mistake, and delete it. We thank you for your
>>> support.
>>>
>>>
>>>
>>>
>>> Besuchen Sie uns vom 01.-05. April auf der HANNOVER MESSE. Sie finden
>>> uns auf dem hessischen Gemeinschaftsstand in Halle 6 Stand A24. Weitere
>>> Informationen finden Sie hier.
>>> <https://www.digitalstrategie-hessen.de/hannovermesse>
>>>
>>>
>>
>
> --
> Jean-Baptiste Onofré
> jbono...@apache.org
> http://blog.nanthrax.net
> Talend - http://www.talend.com

--
Jean-Baptiste Onofré
jbono...@apache.org
http://blog.nanthrax.net
Talend - http://www.talend.com


Re: AW: ComponentFactory

2019-03-25 Thread Jean-Baptiste Onofré
Hi Matthias,

as always, happy to help ;)

config:list command/service is able to list the configuration (including
the factories).

Regards
JB

On 25/03/2019 16:07, Matthias Leinweber wrote:
> Thank you very much.
> 
> Thanks for the explanation, Tim. I simply thought that it is possible to
> access the (newInstance) components with their configurationPid but it
> makes totally sense that this makes no sense ;)
> 
> Also thank you for the decanter link, exactly what i was looking for.
> And my example is working now.
> 
> But an additional Question:
> Is there a way to list available factoryPids (before creating a
> configuration)?
> 
> best regards,
> Matthias
> 
> 
> 
> 
> 
> *Von:* Jean-Baptiste Onofré 
> *Gesendet:* Montag, 25. März 2019 15:42
> *An:* user@karaf.apache.org
> *Betreff:* Re: ComponentFactory
>  
> By the way, you also have a "core" example here:
> 
> https://github.com/apache/karaf/tree/master/examples/karaf-config-example/karaf-config-example-managed-factory
> 
> and the equivalent with SCR:
> 
> https://github.com/apache/karaf/tree/master/examples/karaf-config-example/karaf-config-example-scr
> 
> Regards
> JB
> 
> On 25/03/2019 15:39, Jean-Baptiste Onofré wrote:
>> Hi Matthias,
>> 
>> What about creating a new service instance with a ManagedServiceFactories ?
>> 
>> If you use SCR, it's pretty easy. It's the way it's implemented in
>> Decanter for instance.
>> 
>> For instance, a new TailerListenerAdapter service will be registered for
>> each etc/org.apache.karaf.decanter.collector.file-foo.cfg file created:
>> 
>> https://github.com/apache/karaf-decanter/blob/master/collector/file/src/main/java/org/apache/karaf/decanter/collector/file/DecanterTailerListener.java
>> 
>> Is it what you are looking for ?
>> 
>> Regards
>> JB
>> 
>> On 25/03/2019 15:32, Matthias Leinweber wrote:
>>> Hello Karaf Team, 
>>>
>>>
>>> i don't know if it is the correct mailing list, because its just
>>> possibly related to karaf specific implementation.
>>>
>>>
>>> I try to configure multiple services which are created by a component
>>> factory (newInstance). But i don't find a way how i can give a
>>> unique pid to a created service instance. 
>>>
>>> Did i understand something wrong an do i have to use
>>> ManagedServiceFactories?
>>>
>>> regards,
>>> Matthias
>>>
>>>
>>> Matthias Leinweber 
>>>
>>> Managing Director & Chief Analytics Officer
>>>
>>>  1491765456561_darkwtext.resized.png
>>>
>>> Intelligent Data Analytics GmbH & Co. KG 
>>>
>>>  
>>>
>>> c/o TechQuartier 
>>>
>>> Platz der Einheit 2 
>>> 60327 Frankfurt 
>>>
>>> Mobil: 0151/73006079 
>>>
>>> Telefon: 06421/4805274  
>>> Telefax: 06421/4805275  
>>> E-Mail: matthias.leinwe...@ida-analytics.de 
>>>
>>> Internet: www.ida-analytics.de <http://www.ida-analytics.de> 
>>>  
>>>
>>> Unternehmenssitz: Frankfurt am Main | Handelsregister
>>> beim Amtsgericht: Frankfurt am Main, Registernummer: HRA 49357 | USt.
>>> ID-Nr.: DE310205810 | Finanzamt: Frankfurt am Main 
>>>
>>> Persönlich haftende Gesellschafterin: IDA Intelligent Data Analytics
>>> GmbH | Sitz: Frankfurt am Main | Handelsregister
>>> beim Amtsgericht: Frankfurt am Main | Handelsregister-Nummer: HRB
>>> 106805 | Geschäftsführer: Mohamed Ayadi, Nils Björn Krugmann, Dipl.-Inf.
>>> Matthias Leinweber, Dipl.-Inf. Marc Seidemann 
>>>
>>>   
>>>
>>> If you are not the addressee, please inform us immediately that you have
>>> received this e-mail by mistake, and delete it. We thank you for your
>>> support. 
>>>
>>>
>>>  
>>>
>>> Besuchen Sie uns vom 01.-05. April auf der HANNOVER MESSE. Sie finden
>>> uns auf dem hessischen Gemeinschaftsstand in Halle 6 Stand A24. Weitere
>>> Informationen finden Sie hier.
>>> <https://www.digitalstrategie-hessen.de/hannovermesse>
>>>
>>>
>> 
> 
> -- 
> Jean-Baptiste Onofré
> jbono...@apache.org
> http://blog.nanthrax.net
> Talend - http://www.talend.com

-- 
Jean-Baptiste Onofré
jbono...@apache.org
http://blog.nanthrax.net
Talend - http://www.talend.com


AW: ComponentFactory

2019-03-25 Thread Matthias Leinweber
Thank you very much.

Thanks for the explanation, Tim. I simply thought that it is possible to access 
the (newInstance) components with their configurationPid but it makes totally 
sense that this makes no sense ;)

Also thank you for the decanter link, exactly what i was looking for. And my 
example is working now.

But an additional Question:
Is there a way to list available factoryPids (before creating a configuration)?

best regards,
Matthias





Von: Jean-Baptiste Onofré 
Gesendet: Montag, 25. März 2019 15:42
An: user@karaf.apache.org
Betreff: Re: ComponentFactory

By the way, you also have a "core" example here:

https://github.com/apache/karaf/tree/master/examples/karaf-config-example/karaf-config-example-managed-factory

and the equivalent with SCR:

https://github.com/apache/karaf/tree/master/examples/karaf-config-example/karaf-config-example-scr

Regards
JB

On 25/03/2019 15:39, Jean-Baptiste Onofré wrote:
> Hi Matthias,
>
> What about creating a new service instance with a ManagedServiceFactories ?
>
> If you use SCR, it's pretty easy. It's the way it's implemented in
> Decanter for instance.
>
> For instance, a new TailerListenerAdapter service will be registered for
> each etc/org.apache.karaf.decanter.collector.file-foo.cfg file created:
>
> https://github.com/apache/karaf-decanter/blob/master/collector/file/src/main/java/org/apache/karaf/decanter/collector/file/DecanterTailerListener.java
>
> Is it what you are looking for ?
>
> Regards
> JB
>
> On 25/03/2019 15:32, Matthias Leinweber wrote:
>> Hello Karaf Team,
>>
>>
>> i don't know if it is the correct mailing list, because its just
>> possibly related to karaf specific implementation.
>>
>>
>> I try to configure multiple services which are created by a component
>> factory (newInstance). But i don't find a way how i can give a
>> unique pid to a created service instance.
>>
>> Did i understand something wrong an do i have to use
>> ManagedServiceFactories?
>>
>> regards,
>> Matthias
>>
>>
>> Matthias Leinweber
>>
>> Managing Director & Chief Analytics Officer
>>
>>  1491765456561_darkwtext.resized.png
>>
>> Intelligent Data Analytics GmbH & Co. KG
>>
>>
>>
>> c/o TechQuartier
>>
>> Platz der Einheit 2
>> 60327 Frankfurt
>>
>> Mobil: 0151/73006079
>>
>> Telefon: 06421/4805274
>> Telefax: 06421/4805275
>> E-Mail: matthias.leinwe...@ida-analytics.de
>>
>> Internet: www.ida-analytics.de<http://www.ida-analytics.de>
>>
>>
>> Unternehmenssitz: Frankfurt am Main | Handelsregister
>> beim Amtsgericht: Frankfurt am Main, Registernummer: HRA 49357 | USt.
>> ID-Nr.: DE310205810 | Finanzamt: Frankfurt am Main
>>
>> Persönlich haftende Gesellschafterin: IDA Intelligent Data Analytics
>> GmbH | Sitz: Frankfurt am Main | Handelsregister
>> beim Amtsgericht: Frankfurt am Main | Handelsregister-Nummer: HRB
>> 106805 | Geschäftsführer: Mohamed Ayadi, Nils Björn Krugmann, Dipl.-Inf.
>> Matthias Leinweber, Dipl.-Inf. Marc Seidemann
>>
>>  
>>
>> If you are not the addressee, please inform us immediately that you have
>> received this e-mail by mistake, and delete it. We thank you for your
>> support.
>>
>>
>>
>>
>> Besuchen Sie uns vom 01.-05. April auf der HANNOVER MESSE. Sie finden
>> uns auf dem hessischen Gemeinschaftsstand in Halle 6 Stand A24. Weitere
>> Informationen finden Sie hier.
>> <https://www.digitalstrategie-hessen.de/hannovermesse>
>>
>>
>

--
Jean-Baptiste Onofré
jbono...@apache.org
http://blog.nanthrax.net
Talend - http://www.talend.com


Re: ComponentFactory

2019-03-25 Thread Jean-Baptiste Onofré
By the way, you also have a "core" example here:

https://github.com/apache/karaf/tree/master/examples/karaf-config-example/karaf-config-example-managed-factory

and the equivalent with SCR:

https://github.com/apache/karaf/tree/master/examples/karaf-config-example/karaf-config-example-scr

Regards
JB

On 25/03/2019 15:39, Jean-Baptiste Onofré wrote:
> Hi Matthias,
> 
> What about creating a new service instance with a ManagedServiceFactories ?
> 
> If you use SCR, it's pretty easy. It's the way it's implemented in
> Decanter for instance.
> 
> For instance, a new TailerListenerAdapter service will be registered for
> each etc/org.apache.karaf.decanter.collector.file-foo.cfg file created:
> 
> https://github.com/apache/karaf-decanter/blob/master/collector/file/src/main/java/org/apache/karaf/decanter/collector/file/DecanterTailerListener.java
> 
> Is it what you are looking for ?
> 
> Regards
> JB
> 
> On 25/03/2019 15:32, Matthias Leinweber wrote:
>> Hello Karaf Team, 
>>
>>
>> i don't know if it is the correct mailing list, because its just
>> possibly related to karaf specific implementation.
>>
>>
>> I try to configure multiple services which are created by a component
>> factory (newInstance). But i don't find a way how i can give a
>> unique pid to a created service instance. 
>>
>> Did i understand something wrong an do i have to use
>> ManagedServiceFactories?
>>
>> regards,
>> Matthias
>>
>>
>> Matthias Leinweber 
>>
>> Managing Director & Chief Analytics Officer
>>
>>  1491765456561_darkwtext.resized.png
>>
>> Intelligent Data Analytics GmbH & Co. KG 
>>
>>  
>>
>> c/o TechQuartier 
>>
>> Platz der Einheit 2 
>> 60327 Frankfurt 
>>
>> Mobil: 0151/73006079 
>>
>> Telefon: 06421/4805274  
>> Telefax: 06421/4805275  
>> E-Mail: matthias.leinwe...@ida-analytics.de 
>>
>> Internet: www.ida-analytics.de 
>>  
>>
>> Unternehmenssitz: Frankfurt am Main | Handelsregister
>> beim Amtsgericht: Frankfurt am Main, Registernummer: HRA 49357 | USt.
>> ID-Nr.: DE310205810 | Finanzamt: Frankfurt am Main 
>>
>> Persönlich haftende Gesellschafterin: IDA Intelligent Data Analytics
>> GmbH | Sitz: Frankfurt am Main | Handelsregister
>> beim Amtsgericht: Frankfurt am Main | Handelsregister-Nummer: HRB
>> 106805 | Geschäftsführer: Mohamed Ayadi, Nils Björn Krugmann, Dipl.-Inf.
>> Matthias Leinweber, Dipl.-Inf. Marc Seidemann 
>>
>>   
>>
>> If you are not the addressee, please inform us immediately that you have
>> received this e-mail by mistake, and delete it. We thank you for your
>> support. 
>>
>>
>>  
>>
>> Besuchen Sie uns vom 01.-05. April auf der HANNOVER MESSE. Sie finden
>> uns auf dem hessischen Gemeinschaftsstand in Halle 6 Stand A24. Weitere
>> Informationen finden Sie hier.
>> 
>>
>>
> 

-- 
Jean-Baptiste Onofré
jbono...@apache.org
http://blog.nanthrax.net
Talend - http://www.talend.com


Re: ComponentFactory

2019-03-25 Thread Tim Ward
Hi, 

If you are using Component Factories then you are not also using Managed 
Service Factories, the two are simply not possible to use together.

A component factory lets you supply custom configuration to programmatically 
create multiple instances of a component. These are combined with any static 
properties and any configuration provided to the *singleton* component factory 
via its pid.

Specifying a *required* configuration policy lets you use the configuration pid 
of a DS component as a factory pid. This, in turn, lets you use factory 
configurations to create multiple configured component instances at runtime. 
Importantly these instances are bound to the lifecycle of the factory 
configuration that they correspond to.

As you can see it is simply not possible to mix the two models as they have 
fundamentally different lifecycles. Component Factories are programmatic, 
Factory Configurations (Managed Service Factories) are declarative and bound to 
the lifecycle of the configuration object.

In general you probably don’t want to use a component factory with DS. Factory 
configurations are much less invasive to your code, and much simpler to manage.

Best Regards,

Tim

> On 25 Mar 2019, at 14:32, Matthias Leinweber 
>  wrote:
> 
> Hello Karaf Team, 
> 
> i don't know if it is the correct mailing list, because its just possibly 
> related to karaf specific implementation.
> 
> I try to configure multiple services which are created by a component factory 
> (newInstance). But i don't find a way how i can give a unique pid to a 
> created service instance. 
> 
> Did i understand something wrong an do i have to use ManagedServiceFactories?
> 
> regards,
> Matthias
> 
> Matthias Leinweber 
> Managing Director & Chief Analytics Officer
>  
> Intelligent Data Analytics GmbH & Co. KG 
>  
> c/o TechQuartier 
> Platz der Einheit 2 
> 60327 Frankfurt 
> Mobil: 0151/73006079 
> Telefon: 06421/4805274  
> Telefax: 06421/4805275  
> E-Mail: matthias.leinweber 
> @ida-analytics.de 
>  
> Internet: www.ida-analytics.de  
>  
> Unternehmenssitz: Frankfurt am Main | Handelsregister beim Amtsgericht: 
> Frankfurt am Main, Registernummer: HRA 49357 | USt. ID-Nr.: DE310205810 | 
> Finanzamt: Frankfurt am Main 
> Persönlich haftende Gesellschafterin: IDA Intelligent Data Analytics GmbH | 
> Sitz: Frankfurt am Main | Handelsregister beim Amtsgericht: Frankfurt am Main 
> | Handelsregister-Nummer: HRB 106805 | Geschäftsführer: Mohamed Ayadi, Nils 
> Björn Krugmann, Dipl.-Inf. Matthias Leinweber, Dipl.-Inf. Marc Seidemann 
>   
> If you are not the addressee, please inform us immediately that you have 
> received this e-mail by mistake, and delete it. We thank you for your 
> support. 
> 
> 
>  
> Besuchen Sie uns vom 01.-05. April auf der HANNOVER MESSE. Sie finden uns auf 
> dem hessischen Gemeinschaftsstand in Halle 6 Stand A24. Weitere Informationen 
> finden Sie hier. 


Re: ComponentFactory

2019-03-25 Thread Jean-Baptiste Onofré
Hi Matthias,

What about creating a new service instance with a ManagedServiceFactories ?

If you use SCR, it's pretty easy. It's the way it's implemented in
Decanter for instance.

For instance, a new TailerListenerAdapter service will be registered for
each etc/org.apache.karaf.decanter.collector.file-foo.cfg file created:

https://github.com/apache/karaf-decanter/blob/master/collector/file/src/main/java/org/apache/karaf/decanter/collector/file/DecanterTailerListener.java

Is it what you are looking for ?

Regards
JB

On 25/03/2019 15:32, Matthias Leinweber wrote:
> Hello Karaf Team, 
> 
> 
> i don't know if it is the correct mailing list, because its just
> possibly related to karaf specific implementation.
> 
> 
> I try to configure multiple services which are created by a component
> factory (newInstance). But i don't find a way how i can give a
> unique pid to a created service instance. 
> 
> Did i understand something wrong an do i have to use
> ManagedServiceFactories?
> 
> regards,
> Matthias
> 
> 
> Matthias Leinweber 
> 
> Managing Director & Chief Analytics Officer
> 
>  1491765456561_darkwtext.resized.png
> 
> Intelligent Data Analytics GmbH & Co. KG 
> 
>  
> 
> c/o TechQuartier 
> 
> Platz der Einheit 2 
> 60327 Frankfurt 
> 
> Mobil: 0151/73006079 
> 
> Telefon: 06421/4805274  
> Telefax: 06421/4805275  
> E-Mail: matthias.leinwe...@ida-analytics.de 
> 
> Internet: www.ida-analytics.de 
>  
> 
> Unternehmenssitz: Frankfurt am Main | Handelsregister
> beim Amtsgericht: Frankfurt am Main, Registernummer: HRA 49357 | USt.
> ID-Nr.: DE310205810 | Finanzamt: Frankfurt am Main 
> 
> Persönlich haftende Gesellschafterin: IDA Intelligent Data Analytics
> GmbH | Sitz: Frankfurt am Main | Handelsregister
> beim Amtsgericht: Frankfurt am Main | Handelsregister-Nummer: HRB
> 106805 | Geschäftsführer: Mohamed Ayadi, Nils Björn Krugmann, Dipl.-Inf.
> Matthias Leinweber, Dipl.-Inf. Marc Seidemann 
> 
>   
> 
> If you are not the addressee, please inform us immediately that you have
> received this e-mail by mistake, and delete it. We thank you for your
> support. 
> 
> 
>  
> 
> Besuchen Sie uns vom 01.-05. April auf der HANNOVER MESSE. Sie finden
> uns auf dem hessischen Gemeinschaftsstand in Halle 6 Stand A24. Weitere
> Informationen finden Sie hier.
> 
> 
> 

-- 
Jean-Baptiste Onofré
jbono...@apache.org
http://blog.nanthrax.net
Talend - http://www.talend.com


ComponentFactory

2019-03-25 Thread Matthias Leinweber
Hello Karaf Team,


i don't know if it is the correct mailing list, because its just possibly 
related to karaf specific implementation.


I try to configure multiple services which are created by a component factory 
(newInstance). But i don't find a way how i can give a unique pid to a created 
service instance.

Did i understand something wrong an do i have to use ManagedServiceFactories?

regards,
Matthias


Matthias Leinweber

Managing Director & Chief Analytics Officer

 [1491765456561_darkwtext.resized.png]

Intelligent Data Analytics GmbH & Co. KG



c/o TechQuartier

Platz der Einheit 2
60327 Frankfurt

Mobil: 0151/73006079

Telefon: 06421/4805274
Telefax: 06421/4805275
E-Mail: matthias.leinwe...@ida-analytics.de

Internet: www.ida-analytics.de


Unternehmenssitz: Frankfurt am Main | Handelsregister beim Amtsgericht: 
Frankfurt am Main, Registernummer: HRA 49357 | USt. ID-Nr.: DE310205810 | 
Finanzamt: Frankfurt am Main

Persönlich haftende Gesellschafterin: IDA Intelligent Data Analytics GmbH | 
Sitz: Frankfurt am Main | Handelsregister beim Amtsgericht: Frankfurt am Main | 
Handelsregister-Nummer: HRB 106805 | Geschäftsführer: Mohamed Ayadi, Nils Björn 
Krugmann, Dipl.-Inf. Matthias Leinweber, Dipl.-Inf. Marc Seidemann

 

If you are not the addressee, please inform us immediately that you have 
received this e-mail by mistake, and delete it. We thank you for your support.


[cid:df900148-4c49-4bbd-b0bb-07fb6cec4f91]



Besuchen Sie uns vom 01.-05. April auf der HANNOVER MESSE. Sie finden uns auf 
dem hessischen Gemeinschaftsstand in Halle 6 Stand A24. Weitere Informationen 
finden Sie hier.



Re: Unable to deploy a Karaf kar file containing a ComponentFactory OSGi declarative service

2018-09-14 Thread Thiago Moreira (timba)
  I moved to maven-bundle-plugin with this latest advice and now I'm able
to deploy the kar file without errors.

  Thanks

Thiago Moreira
+55 48 99911-6331


On Wed, Sep 5, 2018 at 1:27 PM Jean-Baptiste Onofré  wrote:

> By the way, a quick workaround for your issue is to use:
>
>
> <_dsannotations-options>nocapabilities,norequirements
>
> in the maven-bundle-plugin configuration instructions.
>
> Regards
> JB
>
> On 01/09/2018 17:52, Thiago Moreira (timba) wrote:
> >
> >   Hey all! Does anyone can help me with this question?
> >
> https://stackoverflow.com/questions/52118716/unable-to-deploy-a-karaf-kar-file-containing-a-componentfactory-osgi-declarative
> >
> >   Thanks
> >
> > p.s. I have tried to send the question directly to here before but seems
> > that I wasn't properly added to the list. Given another try...
> >
> > Thiago Moreira
> > +55 48 99911-6331
>
> --
> Jean-Baptiste Onofré
> jbono...@apache.org
> http://blog.nanthrax.net
> Talend - http://www.talend.com
>


Re: Unable to deploy a Karaf kar file containing a ComponentFactory OSGi declarative service

2018-09-05 Thread Jean-Baptiste Onofré
By the way, a quick workaround for your issue is to use:

<_dsannotations-options>nocapabilities,norequirements

in the maven-bundle-plugin configuration instructions.

Regards
JB

On 01/09/2018 17:52, Thiago Moreira (timba) wrote:
> 
>   Hey all! Does anyone can help me with this question? 
> https://stackoverflow.com/questions/52118716/unable-to-deploy-a-karaf-kar-file-containing-a-componentfactory-osgi-declarative
> 
>   Thanks
> 
> p.s. I have tried to send the question directly to here before but seems
> that I wasn't properly added to the list. Given another try...
> 
> Thiago Moreira
> +55 48 99911-6331

-- 
Jean-Baptiste Onofré
jbono...@apache.org
http://blog.nanthrax.net
Talend - http://www.talend.com


Re: Unable to deploy a Karaf kar file containing a ComponentFactory OSGi declarative service

2018-09-04 Thread Thiago Moreira (timba)
  Hey guys, thanks for your effort!

  I gave a shot on the maven-bundle-plugin without success. Now I'm able to
deploy and activate all bundles BUT no method (BotImpl.run
<https://github.com/tmoreira2020/poc-osgi-whiteboard/blob/100366917e63ac535cdc2f6d390e59d7c8f2ca39/br.com.thiagomoreira.bot.impl/src/main/java/br/com/thiagomoreira/bot/impl/BotImpl.java#L42>)
is called in my code.
 The code is in the branch maven-bundle-plugin
<https://github.com/tmoreira2020/poc-osgi-whiteboard/tree/maven-bundle-plugin>
.

  Thanks

Thiago Moreira
+55 48 99911-6331


On Tue, Sep 4, 2018 at 8:52 AM Jean-Baptiste Onofré  wrote:

> Hi,
>
> Give me some time to complete Cave and I will take a look. The issue is
> not related to KAR, it's around the features resolver. I think it could
> be a race condition or a mistake in the requirements (as I didn't
> reproduce the issue, and we use the same approach in examples without
> problem).
>
> I keep you posted asap.
>
> Regards
> JB
>
> On 04/09/2018 13:47, Francois Papon wrote:
> > Yes, I also tried to install the feature manually (JB tips) outside of
> > the Kar but it didn't solve.
> >
> > May be I missed something in Felix for the registring of the component
> > in the componentFactory.
> >
> > regards,
> >
> > François Papon
> > fpa...@apache.org
> >
> > Le 04/09/2018 à 15:42, Milen Dyankov a écrit :
> >> Oh, you are right. The service is indeed there. I did a quick check
> >> earlier and couldn't find it (may have used the wrong command) and
> >> then I saw "effective:=active" which rings a bell about an old
> >> discussion here about this being or not being enforced in certain
> >> Karaf versions.
> >> On Mon, Sep 3, 2018 at 8:18 PM Thiago Moreira (timba)
> >>  wrote:
> >>>
> >>>  Exactly!
> >>>
> >>> Thiago Moreira
> >>> +55 48 99911-6331
> >>>
> >>>
> >>> On Mon, Sep 3, 2018 at 12:07 PM Francois Papon <
> francois.pa...@openobject.fr> wrote:
> >>>> Hi,
> >>>>
> >>>> When I tried, the bundle "BotImpl" provided the service
> >>>> 'org.osgi.service.component.ComponentFactory', I can see it in the
> >>>> "services" command output.
> >>>>
> >>>> However it's not binded in the BotApplication by the @Reference.
> >>>>
> >>>> regards,
> >>>>
> >>>> François Papon
> >>>> fpa...@apache.org
> >>>>
> >>>> Le 03/09/2018 à 19:02, Jean-Baptiste Onofré a écrit :
> >>>>> Hi Milen,
> >>>>>
> >>>>> effective means that it expects a service available in the registry.
> So,
> >>>>> if ComponentFactory is preset in the registry (you can check with
> the ls
> >>>>> command), it should work via the feature.
> >>>>>
> >>>>> I will provide a fix to Thiago.
> >>>>>
> >>>>> Regards
> >>>>> JB
> >>>>>
> >>>>> On 03/09/2018 16:40, Milen Dyankov wrote:
> >>>>>> This is a shot it the dark and I'm sure JB will correct me if I'm
> >>>>>> wrong but I think it may be due to `effective:=active` directive.
> >>>>>>
> >>>>>> See, if you deploy the `scr` feature and your bundles, they are
> >>>>>> activated. But IMHO the application bundle shouldn't resolve because
> >>>>>> It has
> >>>>>> `Require-Capability: ...
> >>>>>>
> osgi.service;filter:="(objectClass=org.osgi.service.component.ComponentFactory)";effective:=active,
> >>>>>> .`
> >>>>>> but there is no such service registered.
> >>>>>>
> >>>>>> Therefore my guess is that direct deployment of bundles ignores the
> >>>>>> requirement as it is `effective:=active` but it is enforced by the
> >>>>>> feature/kar resolver.
> >>>>>>
> >>>>>> Best,
> >>>>>> Milen
> >>>>>> On Mon, Sep 3, 2018 at 3:55 PM Francois Papon
> >>>>>>  wrote:
> >>>>>>> Hi,
> >>>>>>>
> >>>>>>> I tried yesterday and I'm able to reproduce after migrate on
> maven-bundle-plugin, I will search more deeply for the component-factory ;)
> &g

Re: Unable to deploy a Karaf kar file containing a ComponentFactory OSGi declarative service

2018-09-04 Thread Jean-Baptiste Onofré
Hi,

Give me some time to complete Cave and I will take a look. The issue is
not related to KAR, it's around the features resolver. I think it could
be a race condition or a mistake in the requirements (as I didn't
reproduce the issue, and we use the same approach in examples without
problem).

I keep you posted asap.

Regards
JB

On 04/09/2018 13:47, Francois Papon wrote:
> Yes, I also tried to install the feature manually (JB tips) outside of
> the Kar but it didn't solve.
> 
> May be I missed something in Felix for the registring of the component
> in the componentFactory.
> 
> regards,
> 
> François Papon
> fpa...@apache.org
> 
> Le 04/09/2018 à 15:42, Milen Dyankov a écrit :
>> Oh, you are right. The service is indeed there. I did a quick check
>> earlier and couldn't find it (may have used the wrong command) and
>> then I saw "effective:=active" which rings a bell about an old
>> discussion here about this being or not being enforced in certain
>> Karaf versions.
>> On Mon, Sep 3, 2018 at 8:18 PM Thiago Moreira (timba)
>>  wrote:
>>>
>>>  Exactly!
>>>
>>> Thiago Moreira
>>> +55 48 99911-6331
>>>
>>>
>>> On Mon, Sep 3, 2018 at 12:07 PM Francois Papon 
>>>  wrote:
>>>> Hi,
>>>>
>>>> When I tried, the bundle "BotImpl" provided the service
>>>> 'org.osgi.service.component.ComponentFactory', I can see it in the
>>>> "services" command output.
>>>>
>>>> However it's not binded in the BotApplication by the @Reference.
>>>>
>>>> regards,
>>>>
>>>> François Papon
>>>> fpa...@apache.org
>>>>
>>>> Le 03/09/2018 à 19:02, Jean-Baptiste Onofré a écrit :
>>>>> Hi Milen,
>>>>>
>>>>> effective means that it expects a service available in the registry. So,
>>>>> if ComponentFactory is preset in the registry (you can check with the ls
>>>>> command), it should work via the feature.
>>>>>
>>>>> I will provide a fix to Thiago.
>>>>>
>>>>> Regards
>>>>> JB
>>>>>
>>>>> On 03/09/2018 16:40, Milen Dyankov wrote:
>>>>>> This is a shot it the dark and I'm sure JB will correct me if I'm
>>>>>> wrong but I think it may be due to `effective:=active` directive.
>>>>>>
>>>>>> See, if you deploy the `scr` feature and your bundles, they are
>>>>>> activated. But IMHO the application bundle shouldn't resolve because
>>>>>> It has
>>>>>> `Require-Capability: ...
>>>>>> osgi.service;filter:="(objectClass=org.osgi.service.component.ComponentFactory)";effective:=active,
>>>>>> .`
>>>>>> but there is no such service registered.
>>>>>>
>>>>>> Therefore my guess is that direct deployment of bundles ignores the
>>>>>> requirement as it is `effective:=active` but it is enforced by the
>>>>>> feature/kar resolver.
>>>>>>
>>>>>> Best,
>>>>>> Milen
>>>>>> On Mon, Sep 3, 2018 at 3:55 PM Francois Papon
>>>>>>  wrote:
>>>>>>> Hi,
>>>>>>>
>>>>>>> I tried yesterday and I'm able to reproduce after migrate on 
>>>>>>> maven-bundle-plugin, I will search more deeply for the 
>>>>>>> component-factory ;)
>>>>>>>
>>>>>>> regards,
>>>>>>>
>>>>>>> François Papon
>>>>>>> fpa...@apache.org
>>>>>>>
>>>>>>> Le 03/09/2018 à 17:47, Thiago Moreira (timba) a écrit :
>>>>>>>
>>>>>>>
>>>>>>>   Hey guys, were you able to reproduce the problem?
>>>>>>>
>>>>>>>   Thanks
>>>>>>>
>>>>>>> Thiago Moreira
>>>>>>> +55 48 99911-6331
>>>>>>>
>>>>>>>
>>>>>>> On Sun, Sep 2, 2018 at 1:10 PM Jean-Baptiste Onofré  
>>>>>>> wrote:
>>>>>>>> Some may see this as a pro, some as a cons ;)
>>>>>>>>
>>>>>>>> Anyway, maven-bundle-plugin uses bnd (library). The bnd plugin allows 
>>>>>>>> to
>>>>>>>>

Re: Unable to deploy a Karaf kar file containing a ComponentFactory OSGi declarative service

2018-09-04 Thread Francois Papon
Yes, I also tried to install the feature manually (JB tips) outside of
the Kar but it didn't solve.

May be I missed something in Felix for the registring of the component
in the componentFactory.

regards,

François Papon
fpa...@apache.org

Le 04/09/2018 à 15:42, Milen Dyankov a écrit :
> Oh, you are right. The service is indeed there. I did a quick check
> earlier and couldn't find it (may have used the wrong command) and
> then I saw "effective:=active" which rings a bell about an old
> discussion here about this being or not being enforced in certain
> Karaf versions.
> On Mon, Sep 3, 2018 at 8:18 PM Thiago Moreira (timba)
>  wrote:
>>
>>  Exactly!
>>
>> Thiago Moreira
>> +55 48 99911-6331
>>
>>
>> On Mon, Sep 3, 2018 at 12:07 PM Francois Papon 
>>  wrote:
>>> Hi,
>>>
>>> When I tried, the bundle "BotImpl" provided the service
>>> 'org.osgi.service.component.ComponentFactory', I can see it in the
>>> "services" command output.
>>>
>>> However it's not binded in the BotApplication by the @Reference.
>>>
>>> regards,
>>>
>>> François Papon
>>> fpa...@apache.org
>>>
>>> Le 03/09/2018 à 19:02, Jean-Baptiste Onofré a écrit :
>>>> Hi Milen,
>>>>
>>>> effective means that it expects a service available in the registry. So,
>>>> if ComponentFactory is preset in the registry (you can check with the ls
>>>> command), it should work via the feature.
>>>>
>>>> I will provide a fix to Thiago.
>>>>
>>>> Regards
>>>> JB
>>>>
>>>> On 03/09/2018 16:40, Milen Dyankov wrote:
>>>>> This is a shot it the dark and I'm sure JB will correct me if I'm
>>>>> wrong but I think it may be due to `effective:=active` directive.
>>>>>
>>>>> See, if you deploy the `scr` feature and your bundles, they are
>>>>> activated. But IMHO the application bundle shouldn't resolve because
>>>>> It has
>>>>> `Require-Capability: ...
>>>>> osgi.service;filter:="(objectClass=org.osgi.service.component.ComponentFactory)";effective:=active,
>>>>> .`
>>>>> but there is no such service registered.
>>>>>
>>>>> Therefore my guess is that direct deployment of bundles ignores the
>>>>> requirement as it is `effective:=active` but it is enforced by the
>>>>> feature/kar resolver.
>>>>>
>>>>> Best,
>>>>> Milen
>>>>> On Mon, Sep 3, 2018 at 3:55 PM Francois Papon
>>>>>  wrote:
>>>>>> Hi,
>>>>>>
>>>>>> I tried yesterday and I'm able to reproduce after migrate on 
>>>>>> maven-bundle-plugin, I will search more deeply for the component-factory 
>>>>>> ;)
>>>>>>
>>>>>> regards,
>>>>>>
>>>>>> François Papon
>>>>>> fpa...@apache.org
>>>>>>
>>>>>> Le 03/09/2018 à 17:47, Thiago Moreira (timba) a écrit :
>>>>>>
>>>>>>
>>>>>>   Hey guys, were you able to reproduce the problem?
>>>>>>
>>>>>>   Thanks
>>>>>>
>>>>>> Thiago Moreira
>>>>>> +55 48 99911-6331
>>>>>>
>>>>>>
>>>>>> On Sun, Sep 2, 2018 at 1:10 PM Jean-Baptiste Onofré  
>>>>>> wrote:
>>>>>>> Some may see this as a pro, some as a cons ;)
>>>>>>>
>>>>>>> Anyway, maven-bundle-plugin uses bnd (library). The bnd plugin allows to
>>>>>>> delegate the headers definition in the specific file.
>>>>>>>
>>>>>>> maven-bundle-plugin defines a lot of default headers based on Maven.
>>>>>>> That's what I would like to check (the diff in the generated headers).
>>>>>>>
>>>>>>> Regards
>>>>>>> JB
>>>>>>>
>>>>>>> On 02/09/2018 17:25, Francois Papon wrote:
>>>>>>>> You don't have to declare things in a bnd.bnd file,  you can define it
>>>>>>>> directly in the plugin configuration in your pom.xml like this :
>>>>>>>>
>>>>>>>> 
>>>>>>>> org.apache.felix

Re: Unable to deploy a Karaf kar file containing a ComponentFactory OSGi declarative service

2018-09-04 Thread Milen Dyankov
Oh, you are right. The service is indeed there. I did a quick check
earlier and couldn't find it (may have used the wrong command) and
then I saw "effective:=active" which rings a bell about an old
discussion here about this being or not being enforced in certain
Karaf versions.
On Mon, Sep 3, 2018 at 8:18 PM Thiago Moreira (timba)
 wrote:
>
>
>  Exactly!
>
> Thiago Moreira
> +55 48 99911-6331
>
>
> On Mon, Sep 3, 2018 at 12:07 PM Francois Papon  
> wrote:
>>
>> Hi,
>>
>> When I tried, the bundle "BotImpl" provided the service
>> 'org.osgi.service.component.ComponentFactory', I can see it in the
>> "services" command output.
>>
>> However it's not binded in the BotApplication by the @Reference.
>>
>> regards,
>>
>> François Papon
>> fpa...@apache.org
>>
>> Le 03/09/2018 à 19:02, Jean-Baptiste Onofré a écrit :
>> > Hi Milen,
>> >
>> > effective means that it expects a service available in the registry. So,
>> > if ComponentFactory is preset in the registry (you can check with the ls
>> > command), it should work via the feature.
>> >
>> > I will provide a fix to Thiago.
>> >
>> > Regards
>> > JB
>> >
>> > On 03/09/2018 16:40, Milen Dyankov wrote:
>> >> This is a shot it the dark and I'm sure JB will correct me if I'm
>> >> wrong but I think it may be due to `effective:=active` directive.
>> >>
>> >> See, if you deploy the `scr` feature and your bundles, they are
>> >> activated. But IMHO the application bundle shouldn't resolve because
>> >> It has
>> >> `Require-Capability: ...
>> >> osgi.service;filter:="(objectClass=org.osgi.service.component.ComponentFactory)";effective:=active,
>> >> .`
>> >> but there is no such service registered.
>> >>
>> >> Therefore my guess is that direct deployment of bundles ignores the
>> >> requirement as it is `effective:=active` but it is enforced by the
>> >> feature/kar resolver.
>> >>
>> >> Best,
>> >> Milen
>> >> On Mon, Sep 3, 2018 at 3:55 PM Francois Papon
>> >>  wrote:
>> >>> Hi,
>> >>>
>> >>> I tried yesterday and I'm able to reproduce after migrate on 
>> >>> maven-bundle-plugin, I will search more deeply for the component-factory 
>> >>> ;)
>> >>>
>> >>> regards,
>> >>>
>> >>> François Papon
>> >>> fpa...@apache.org
>> >>>
>> >>> Le 03/09/2018 à 17:47, Thiago Moreira (timba) a écrit :
>> >>>
>> >>>
>> >>>   Hey guys, were you able to reproduce the problem?
>> >>>
>> >>>   Thanks
>> >>>
>> >>> Thiago Moreira
>> >>> +55 48 99911-6331
>> >>>
>> >>>
>> >>> On Sun, Sep 2, 2018 at 1:10 PM Jean-Baptiste Onofré  
>> >>> wrote:
>> >>>> Some may see this as a pro, some as a cons ;)
>> >>>>
>> >>>> Anyway, maven-bundle-plugin uses bnd (library). The bnd plugin allows to
>> >>>> delegate the headers definition in the specific file.
>> >>>>
>> >>>> maven-bundle-plugin defines a lot of default headers based on Maven.
>> >>>> That's what I would like to check (the diff in the generated headers).
>> >>>>
>> >>>> Regards
>> >>>> JB
>> >>>>
>> >>>> On 02/09/2018 17:25, Francois Papon wrote:
>> >>>>> You don't have to declare things in a bnd.bnd file,  you can define it
>> >>>>> directly in the plugin configuration in your pom.xml like this :
>> >>>>>
>> >>>>> 
>> >>>>> org.apache.felix
>> >>>>> maven-bundle-plugin
>> >>>>> 
>> >>>>> 
>> >>>>> 
>> >>>>> org.apache.karaf.vineyard.registry.api
>> >>>>> 
>> >>>>> 
>> >>>>> 
>> >>>>> 
>> >>>>>
>> >>>>> regards,
>> >>>>>
>> &

Re: Unable to deploy a Karaf kar file containing a ComponentFactory OSGi declarative service

2018-09-03 Thread Thiago Moreira (timba)
 Exactly!

Thiago Moreira
+55 48 99911-6331


On Mon, Sep 3, 2018 at 12:07 PM Francois Papon 
wrote:

> Hi,
>
> When I tried, the bundle "BotImpl" provided the service
> 'org.osgi.service.component.ComponentFactory', I can see it in the
> "services" command output.
>
> However it's not binded in the BotApplication by the @Reference.
>
> regards,
>
> François Papon
> fpa...@apache.org
>
> Le 03/09/2018 à 19:02, Jean-Baptiste Onofré a écrit :
> > Hi Milen,
> >
> > effective means that it expects a service available in the registry. So,
> > if ComponentFactory is preset in the registry (you can check with the ls
> > command), it should work via the feature.
> >
> > I will provide a fix to Thiago.
> >
> > Regards
> > JB
> >
> > On 03/09/2018 16:40, Milen Dyankov wrote:
> >> This is a shot it the dark and I'm sure JB will correct me if I'm
> >> wrong but I think it may be due to `effective:=active` directive.
> >>
> >> See, if you deploy the `scr` feature and your bundles, they are
> >> activated. But IMHO the application bundle shouldn't resolve because
> >> It has
> >> `Require-Capability: ...
> >>
> osgi.service;filter:="(objectClass=org.osgi.service.component.ComponentFactory)";effective:=active,
> >> .`
> >> but there is no such service registered.
> >>
> >> Therefore my guess is that direct deployment of bundles ignores the
> >> requirement as it is `effective:=active` but it is enforced by the
> >> feature/kar resolver.
> >>
> >> Best,
> >> Milen
> >> On Mon, Sep 3, 2018 at 3:55 PM Francois Papon
> >>  wrote:
> >>> Hi,
> >>>
> >>> I tried yesterday and I'm able to reproduce after migrate on
> maven-bundle-plugin, I will search more deeply for the component-factory ;)
> >>>
> >>> regards,
> >>>
> >>> François Papon
> >>> fpa...@apache.org
> >>>
> >>> Le 03/09/2018 à 17:47, Thiago Moreira (timba) a écrit :
> >>>
> >>>
> >>>   Hey guys, were you able to reproduce the problem?
> >>>
> >>>   Thanks
> >>>
> >>> Thiago Moreira
> >>> +55 48 99911-6331
> >>>
> >>>
> >>> On Sun, Sep 2, 2018 at 1:10 PM Jean-Baptiste Onofré 
> wrote:
> >>>> Some may see this as a pro, some as a cons ;)
> >>>>
> >>>> Anyway, maven-bundle-plugin uses bnd (library). The bnd plugin allows
> to
> >>>> delegate the headers definition in the specific file.
> >>>>
> >>>> maven-bundle-plugin defines a lot of default headers based on Maven.
> >>>> That's what I would like to check (the diff in the generated headers).
> >>>>
> >>>> Regards
> >>>> JB
> >>>>
> >>>> On 02/09/2018 17:25, Francois Papon wrote:
> >>>>> You don't have to declare things in a bnd.bnd file,  you can define
> it
> >>>>> directly in the plugin configuration in your pom.xml like this :
> >>>>>
> >>>>> 
> >>>>> org.apache.felix
> >>>>> maven-bundle-plugin
> >>>>> 
> >>>>> 
> >>>>> 
> >>>>> org.apache.karaf.vineyard.registry.api
> >>>>> 
> >>>>> 
> >>>>> 
> >>>>> 
> >>>>>
> >>>>> regards,
> >>>>>
> >>>>> François Papon
> >>>>> fpa...@apache.org
> >>>>>
> >>>>> Le 02/09/2018 à 19:21, Thiago Moreira (timba) a écrit :
> >>>>>>   What is the advantages in your point of view of bundle over bnd?
> >>>>>> Maybe I should start another thread...
> >>>>>>
> >>>>>> Thiago Moreira
> >>>>>> +55 48 99911-6331
> >>>>>>
> >>>>>>
> >>>>>> On Sun, Sep 2, 2018 at 12:12 PM Francois Papon
> >>>>>> mailto:francois.pa...@openobject.fr
> >>
> >>>>>> wrote:
> >>>>>>
> >>>>>> Sorry, I missed it, I see it now :)
>

Re: Unable to deploy a Karaf kar file containing a ComponentFactory OSGi declarative service

2018-09-03 Thread Jean-Baptiste Onofré
Let me finish the preparation of the Cave release and I will take a
deeper look.

Regards
JB

On 03/09/2018 15:47, Thiago Moreira (timba) wrote:
> 
>   Hey guys, were you able to reproduce the problem?
> 
>   Thanks
> 
> Thiago Moreira
> +55 48 99911-6331
> 
> 
> On Sun, Sep 2, 2018 at 1:10 PM Jean-Baptiste Onofré  <mailto:j...@nanthrax.net>> wrote:
> 
> Some may see this as a pro, some as a cons ;)
> 
> Anyway, maven-bundle-plugin uses bnd (library). The bnd plugin allows to
> delegate the headers definition in the specific file.
> 
> maven-bundle-plugin defines a lot of default headers based on Maven.
> That's what I would like to check (the diff in the generated headers).
> 
> Regards
> JB
> 
> On 02/09/2018 17:25, Francois Papon wrote:
> > You don't have to declare things in a bnd.bnd file,  you can define it
> > directly in the plugin configuration in your pom.xml like this :
> >
> >             
> >     org.apache.felix
> >     maven-bundle-plugin
> >     
> >     
> >     
> >     org.apache.karaf.vineyard.registry.api
> >     
> >     
> >     
> >     
> >
> > regards,
> >
> > François Papon
> > fpa...@apache.org <mailto:fpa...@apache.org>
> >
> > Le 02/09/2018 à 19:21, Thiago Moreira (timba) a écrit :
> >>
> >>   What is the advantages in your point of view of bundle over bnd?
> >> Maybe I should start another thread...
> >>
> >> Thiago Moreira
> >> +55 48 99911-6331
> >>
> >>
> >> On Sun, Sep 2, 2018 at 12:12 PM Francois Papon
> >>  <mailto:francois.pa...@openobject.fr>
> <mailto:francois.pa...@openobject.fr
> <mailto:francois.pa...@openobject.fr>>>
> >> wrote:
> >>
> >>     Sorry, I missed it, I see it now :)
> >>
> >>     @Component(service = Bot.class, factory = "bot.factory")
> >>     public class BotImpl implements Bot {
> >>
> >>     regards
> >>
> >>     François Papon
> >>     fpa...@apache.org <mailto:fpa...@apache.org>
> <mailto:fpa...@apache.org <mailto:fpa...@apache.org>>
> >>
> >>     Le 02/09/2018 à 19:09, Francois Papon a écrit :
> >>>
> >>>     Ok,
> >>>
> >>>     You should use the maven-bundle-plugin instead of the
> bnd-plugin,
> >>>     it's more convenient ;)
> >>>
> >>>     Btw, I see that in your BotApplication class you are searching a
> >>>     service with a component.factory property = bot.factory but I
> >>>     can't see where you are registring this factory
> >>>
> >>>     @Reference(target = "(component.factory=bot.factory)")
> >>>     protected ComponentFactory factory;
> >>>
> >>>     regards,
> >>>
> >>>     François Papon
> >>>     fpa...@apache.org <mailto:fpa...@apache.org>
> <mailto:fpa...@apache.org <mailto:fpa...@apache.org>>
> >>>     Le 02/09/2018 à 19:01, Thiago Moreira (timba) a écrit :
> >>>>
> >>>>       Nice! I already look the example.
> >>>>
> >>>>     Thiago Moreira
> >>>>     +55 48 99911-6331
> >>>>
> >>>>
> >>>>     On Sun, Sep 2, 2018 at 11:57 AM Francois Papon
> >>>>      <mailto:francois.pa...@openobject.fr>
> >>>>     <mailto:francois.pa...@openobject.fr
> <mailto:francois.pa...@openobject.fr>>> wrote:
> >>>>
> >>>>         I will take a look ;)
> >>>>
> >>>>         You can also take a look on the Karaf SCR example to deal
> >>>>         with scr.
> >>>>
> >>>>         regards,
> >>>>
> >>>>         François Papon
> >>>>         fpa...@apache.org <mailto:fpa...@apache.org>
> <mailto:fpa...@apache.org <mailto:fpa...@apache.org>>
> >>>

Re: Unable to deploy a Karaf kar file containing a ComponentFactory OSGi declarative service

2018-09-03 Thread Francois Papon
Hi,

When I tried, the bundle "BotImpl" provided the service
'org.osgi.service.component.ComponentFactory', I can see it in the
"services" command output.

However it's not binded in the BotApplication by the @Reference.

regards,

François Papon
fpa...@apache.org

Le 03/09/2018 à 19:02, Jean-Baptiste Onofré a écrit :
> Hi Milen,
>
> effective means that it expects a service available in the registry. So,
> if ComponentFactory is preset in the registry (you can check with the ls
> command), it should work via the feature.
>
> I will provide a fix to Thiago.
>
> Regards
> JB
>
> On 03/09/2018 16:40, Milen Dyankov wrote:
>> This is a shot it the dark and I'm sure JB will correct me if I'm
>> wrong but I think it may be due to `effective:=active` directive.
>>
>> See, if you deploy the `scr` feature and your bundles, they are
>> activated. But IMHO the application bundle shouldn't resolve because
>> It has
>> `Require-Capability: ...
>> osgi.service;filter:="(objectClass=org.osgi.service.component.ComponentFactory)";effective:=active,
>> .`
>> but there is no such service registered.
>>
>> Therefore my guess is that direct deployment of bundles ignores the
>> requirement as it is `effective:=active` but it is enforced by the
>> feature/kar resolver.
>>
>> Best,
>> Milen
>> On Mon, Sep 3, 2018 at 3:55 PM Francois Papon
>>  wrote:
>>> Hi,
>>>
>>> I tried yesterday and I'm able to reproduce after migrate on 
>>> maven-bundle-plugin, I will search more deeply for the component-factory ;)
>>>
>>> regards,
>>>
>>> François Papon
>>> fpa...@apache.org
>>>
>>> Le 03/09/2018 à 17:47, Thiago Moreira (timba) a écrit :
>>>
>>>
>>>   Hey guys, were you able to reproduce the problem?
>>>
>>>   Thanks
>>>
>>> Thiago Moreira
>>> +55 48 99911-6331
>>>
>>>
>>> On Sun, Sep 2, 2018 at 1:10 PM Jean-Baptiste Onofré  
>>> wrote:
>>>> Some may see this as a pro, some as a cons ;)
>>>>
>>>> Anyway, maven-bundle-plugin uses bnd (library). The bnd plugin allows to
>>>> delegate the headers definition in the specific file.
>>>>
>>>> maven-bundle-plugin defines a lot of default headers based on Maven.
>>>> That's what I would like to check (the diff in the generated headers).
>>>>
>>>> Regards
>>>> JB
>>>>
>>>> On 02/09/2018 17:25, Francois Papon wrote:
>>>>> You don't have to declare things in a bnd.bnd file,  you can define it
>>>>> directly in the plugin configuration in your pom.xml like this :
>>>>>
>>>>> 
>>>>> org.apache.felix
>>>>> maven-bundle-plugin
>>>>> 
>>>>> 
>>>>> 
>>>>> org.apache.karaf.vineyard.registry.api
>>>>> 
>>>>> 
>>>>> 
>>>>> 
>>>>>
>>>>> regards,
>>>>>
>>>>> François Papon
>>>>> fpa...@apache.org
>>>>>
>>>>> Le 02/09/2018 à 19:21, Thiago Moreira (timba) a écrit :
>>>>>>   What is the advantages in your point of view of bundle over bnd?
>>>>>> Maybe I should start another thread...
>>>>>>
>>>>>> Thiago Moreira
>>>>>> +55 48 99911-6331
>>>>>>
>>>>>>
>>>>>> On Sun, Sep 2, 2018 at 12:12 PM Francois Papon
>>>>>> mailto:francois.pa...@openobject.fr>>
>>>>>> wrote:
>>>>>>
>>>>>> Sorry, I missed it, I see it now :)
>>>>>>
>>>>>> @Component(service = Bot.class, factory = "bot.factory")
>>>>>> public class BotImpl implements Bot {
>>>>>>
>>>>>> regards
>>>>>>
>>>>>> François Papon
>>>>>> fpa...@apache.org <mailto:fpa...@apache.org>
>>>>>>
>>>>>> Le 02/09/2018 à 19:09, Francois Papon a écrit :
>>>>>>> Ok,
>>>>>>>
>>>>>>> You should use the maven-bundle-plugin instead of t

Re: Unable to deploy a Karaf kar file containing a ComponentFactory OSGi declarative service

2018-09-03 Thread Jean-Baptiste Onofré
Hi Milen,

effective means that it expects a service available in the registry. So,
if ComponentFactory is preset in the registry (you can check with the ls
command), it should work via the feature.

I will provide a fix to Thiago.

Regards
JB

On 03/09/2018 16:40, Milen Dyankov wrote:
> This is a shot it the dark and I'm sure JB will correct me if I'm
> wrong but I think it may be due to `effective:=active` directive.
> 
> See, if you deploy the `scr` feature and your bundles, they are
> activated. But IMHO the application bundle shouldn't resolve because
> It has
> `Require-Capability: ...
> osgi.service;filter:="(objectClass=org.osgi.service.component.ComponentFactory)";effective:=active,
> .`
> but there is no such service registered.
> 
> Therefore my guess is that direct deployment of bundles ignores the
> requirement as it is `effective:=active` but it is enforced by the
> feature/kar resolver.
> 
> Best,
> Milen
> On Mon, Sep 3, 2018 at 3:55 PM Francois Papon
>  wrote:
>>
>> Hi,
>>
>> I tried yesterday and I'm able to reproduce after migrate on 
>> maven-bundle-plugin, I will search more deeply for the component-factory ;)
>>
>> regards,
>>
>> François Papon
>> fpa...@apache.org
>>
>> Le 03/09/2018 à 17:47, Thiago Moreira (timba) a écrit :
>>
>>
>>   Hey guys, were you able to reproduce the problem?
>>
>>   Thanks
>>
>> Thiago Moreira
>> +55 48 99911-6331
>>
>>
>> On Sun, Sep 2, 2018 at 1:10 PM Jean-Baptiste Onofré  
>> wrote:
>>>
>>> Some may see this as a pro, some as a cons ;)
>>>
>>> Anyway, maven-bundle-plugin uses bnd (library). The bnd plugin allows to
>>> delegate the headers definition in the specific file.
>>>
>>> maven-bundle-plugin defines a lot of default headers based on Maven.
>>> That's what I would like to check (the diff in the generated headers).
>>>
>>> Regards
>>> JB
>>>
>>> On 02/09/2018 17:25, Francois Papon wrote:
>>>> You don't have to declare things in a bnd.bnd file,  you can define it
>>>> directly in the plugin configuration in your pom.xml like this :
>>>>
>>>> 
>>>> org.apache.felix
>>>> maven-bundle-plugin
>>>> 
>>>> 
>>>> 
>>>> org.apache.karaf.vineyard.registry.api
>>>> 
>>>> 
>>>> 
>>>> 
>>>>
>>>> regards,
>>>>
>>>> François Papon
>>>> fpa...@apache.org
>>>>
>>>> Le 02/09/2018 à 19:21, Thiago Moreira (timba) a écrit :
>>>>>
>>>>>   What is the advantages in your point of view of bundle over bnd?
>>>>> Maybe I should start another thread...
>>>>>
>>>>> Thiago Moreira
>>>>> +55 48 99911-6331
>>>>>
>>>>>
>>>>> On Sun, Sep 2, 2018 at 12:12 PM Francois Papon
>>>>> mailto:francois.pa...@openobject.fr>>
>>>>> wrote:
>>>>>
>>>>> Sorry, I missed it, I see it now :)
>>>>>
>>>>> @Component(service = Bot.class, factory = "bot.factory")
>>>>> public class BotImpl implements Bot {
>>>>>
>>>>> regards
>>>>>
>>>>> François Papon
>>>>> fpa...@apache.org <mailto:fpa...@apache.org>
>>>>>
>>>>> Le 02/09/2018 à 19:09, Francois Papon a écrit :
>>>>>>
>>>>>> Ok,
>>>>>>
>>>>>> You should use the maven-bundle-plugin instead of the bnd-plugin,
>>>>>> it's more convenient ;)
>>>>>>
>>>>>> Btw, I see that in your BotApplication class you are searching a
>>>>>> service with a component.factory property = bot.factory but I
>>>>>> can't see where you are registring this factory
>>>>>>
>>>>>> @Reference(target = "(component.factory=bot.factory)")
>>>>>> protected ComponentFactory factory;
>>>>>>
>>>>>> regards,
>>>>>>
>>>>>> François Papon
>>>>>> 

Re: Unable to deploy a Karaf kar file containing a ComponentFactory OSGi declarative service

2018-09-03 Thread Milen Dyankov
This is a shot it the dark and I'm sure JB will correct me if I'm
wrong but I think it may be due to `effective:=active` directive.

See, if you deploy the `scr` feature and your bundles, they are
activated. But IMHO the application bundle shouldn't resolve because
It has
`Require-Capability: ...
osgi.service;filter:="(objectClass=org.osgi.service.component.ComponentFactory)";effective:=active,
.`
but there is no such service registered.

Therefore my guess is that direct deployment of bundles ignores the
requirement as it is `effective:=active` but it is enforced by the
feature/kar resolver.

Best,
Milen
On Mon, Sep 3, 2018 at 3:55 PM Francois Papon
 wrote:
>
> Hi,
>
> I tried yesterday and I'm able to reproduce after migrate on 
> maven-bundle-plugin, I will search more deeply for the component-factory ;)
>
> regards,
>
> François Papon
> fpa...@apache.org
>
> Le 03/09/2018 à 17:47, Thiago Moreira (timba) a écrit :
>
>
>   Hey guys, were you able to reproduce the problem?
>
>   Thanks
>
> Thiago Moreira
> +55 48 99911-6331
>
>
> On Sun, Sep 2, 2018 at 1:10 PM Jean-Baptiste Onofré  wrote:
>>
>> Some may see this as a pro, some as a cons ;)
>>
>> Anyway, maven-bundle-plugin uses bnd (library). The bnd plugin allows to
>> delegate the headers definition in the specific file.
>>
>> maven-bundle-plugin defines a lot of default headers based on Maven.
>> That's what I would like to check (the diff in the generated headers).
>>
>> Regards
>> JB
>>
>> On 02/09/2018 17:25, Francois Papon wrote:
>> > You don't have to declare things in a bnd.bnd file,  you can define it
>> > directly in the plugin configuration in your pom.xml like this :
>> >
>> > 
>> > org.apache.felix
>> > maven-bundle-plugin
>> > 
>> > 
>> > 
>> > org.apache.karaf.vineyard.registry.api
>> > 
>> > 
>> > 
>> > 
>> >
>> > regards,
>> >
>> > François Papon
>> > fpa...@apache.org
>> >
>> > Le 02/09/2018 à 19:21, Thiago Moreira (timba) a écrit :
>> >>
>> >>   What is the advantages in your point of view of bundle over bnd?
>> >> Maybe I should start another thread...
>> >>
>> >> Thiago Moreira
>> >> +55 48 99911-6331
>> >>
>> >>
>> >> On Sun, Sep 2, 2018 at 12:12 PM Francois Papon
>> >> mailto:francois.pa...@openobject.fr>>
>> >> wrote:
>> >>
>> >> Sorry, I missed it, I see it now :)
>> >>
>> >> @Component(service = Bot.class, factory = "bot.factory")
>> >> public class BotImpl implements Bot {
>> >>
>> >> regards
>> >>
>> >>     François Papon
>> >> fpa...@apache.org <mailto:fpa...@apache.org>
>> >>
>> >> Le 02/09/2018 à 19:09, Francois Papon a écrit :
>> >>>
>> >>> Ok,
>> >>>
>> >>> You should use the maven-bundle-plugin instead of the bnd-plugin,
>> >>> it's more convenient ;)
>> >>>
>> >>> Btw, I see that in your BotApplication class you are searching a
>> >>> service with a component.factory property = bot.factory but I
>> >>> can't see where you are registring this factory
>> >>>
>> >>> @Reference(target = "(component.factory=bot.factory)")
>> >>> protected ComponentFactory factory;
>> >>>
>> >>> regards,
>> >>>
>> >>> François Papon
>> >>> fpa...@apache.org <mailto:fpa...@apache.org>
>> >>> Le 02/09/2018 à 19:01, Thiago Moreira (timba) a écrit :
>> >>>>
>> >>>>   Nice! I already look the example.
>> >>>>
>> >>>> Thiago Moreira
>> >>>> +55 48 99911-6331
>> >>>>
>> >>>>
>> >>>> On Sun, Sep 2, 2018 at 11:57 AM Francois Papon
>> >>>> > >>>> <mailto:francois.pa...@openobject.fr>> wrote:
>> >>>>
>> >>>> I will take a look ;)
>> >>>>
>> >>>> You can also take a look on

Re: Unable to deploy a Karaf kar file containing a ComponentFactory OSGi declarative service

2018-09-03 Thread Francois Papon
Hi,

I tried yesterday and I'm able to reproduce after migrate on
maven-bundle-plugin, I will search more deeply for the component-factory ;)

regards,

François Papon
fpa...@apache.org

Le 03/09/2018 à 17:47, Thiago Moreira (timba) a écrit :
>
>   Hey guys, were you able to reproduce the problem?
>
>   Thanks
>
> Thiago Moreira
> +55 48 99911-6331
>
>
> On Sun, Sep 2, 2018 at 1:10 PM Jean-Baptiste Onofré  <mailto:j...@nanthrax.net>> wrote:
>
> Some may see this as a pro, some as a cons ;)
>
> Anyway, maven-bundle-plugin uses bnd (library). The bnd plugin
> allows to
> delegate the headers definition in the specific file.
>
> maven-bundle-plugin defines a lot of default headers based on Maven.
> That's what I would like to check (the diff in the generated headers).
>
> Regards
> JB
>
> On 02/09/2018 17:25, Francois Papon wrote:
> > You don't have to declare things in a bnd.bnd file,  you can
> define it
> > directly in the plugin configuration in your pom.xml like this :
> >
> >             
> >     org.apache.felix
> >     maven-bundle-plugin
> >     
> >     
> >     
> >     org.apache.karaf.vineyard.registry.api
> >     
> >     
> >     
> >     
> >
> > regards,
> >
> > François Papon
> > fpa...@apache.org <mailto:fpa...@apache.org>
> >
> > Le 02/09/2018 à 19:21, Thiago Moreira (timba) a écrit :
> >>
> >>   What is the advantages in your point of view of bundle over bnd?
> >> Maybe I should start another thread...
> >>
> >> Thiago Moreira
> >> +55 48 99911-6331
> >>
> >>
> >> On Sun, Sep 2, 2018 at 12:12 PM Francois Papon
> >>  <mailto:francois.pa...@openobject.fr>
> <mailto:francois.pa...@openobject.fr
> <mailto:francois.pa...@openobject.fr>>>
> >> wrote:
> >>
> >>     Sorry, I missed it, I see it now :)
> >>
> >>     @Component(service = Bot.class, factory = "bot.factory")
> >>     public class BotImpl implements Bot {
> >>
> >>     regards
> >>
> >>     François Papon
> >>     fpa...@apache.org <mailto:fpa...@apache.org>
> <mailto:fpa...@apache.org <mailto:fpa...@apache.org>>
> >>
> >>     Le 02/09/2018 à 19:09, Francois Papon a écrit :
> >>>
> >>>     Ok,
> >>>
> >>>     You should use the maven-bundle-plugin instead of the
> bnd-plugin,
> >>>     it's more convenient ;)
> >>>
> >>>     Btw, I see that in your BotApplication class you are
> searching a
> >>>     service with a component.factory property = bot.factory but I
> >>>     can't see where you are registring this factory
> >>>
> >>>     @Reference(target = "(component.factory=bot.factory)")
> >>>     protected ComponentFactory factory;
> >>>
> >>>     regards,
> >>>
> >>>     François Papon
> >>>     fpa...@apache.org <mailto:fpa...@apache.org>
> <mailto:fpa...@apache.org <mailto:fpa...@apache.org>>
> >>>     Le 02/09/2018 à 19:01, Thiago Moreira (timba) a écrit :
> >>>>
> >>>>       Nice! I already look the example.
> >>>>
> >>>>     Thiago Moreira
> >>>>     +55 48 99911-6331
> >>>>
> >>>>
> >>>>     On Sun, Sep 2, 2018 at 11:57 AM Francois Papon
> >>>>      <mailto:francois.pa...@openobject.fr>
> >>>>     <mailto:francois.pa...@openobject.fr
> <mailto:francois.pa...@openobject.fr>>> wrote:
> >>>>
> >>>>         I will take a look ;)
> >>>>
> >>>>         You can also take a look on the Karaf SCR example to deal
> >>>>         with scr.
> >>>>
> >>>>         regards,
> >>>>
> >>>>         François Papon
> >>>&

Re: Unable to deploy a Karaf kar file containing a ComponentFactory OSGi declarative service

2018-09-03 Thread Thiago Moreira (timba)
  Hey guys, were you able to reproduce the problem?

  Thanks

Thiago Moreira
+55 48 99911-6331


On Sun, Sep 2, 2018 at 1:10 PM Jean-Baptiste Onofré  wrote:

> Some may see this as a pro, some as a cons ;)
>
> Anyway, maven-bundle-plugin uses bnd (library). The bnd plugin allows to
> delegate the headers definition in the specific file.
>
> maven-bundle-plugin defines a lot of default headers based on Maven.
> That's what I would like to check (the diff in the generated headers).
>
> Regards
> JB
>
> On 02/09/2018 17:25, Francois Papon wrote:
> > You don't have to declare things in a bnd.bnd file,  you can define it
> > directly in the plugin configuration in your pom.xml like this :
> >
> > 
> > org.apache.felix
> > maven-bundle-plugin
> > 
> > 
> > 
> > org.apache.karaf.vineyard.registry.api
> > 
> > 
> > 
> > 
> >
> > regards,
> >
> > François Papon
> > fpa...@apache.org
> >
> > Le 02/09/2018 à 19:21, Thiago Moreira (timba) a écrit :
> >>
> >>   What is the advantages in your point of view of bundle over bnd?
> >> Maybe I should start another thread...
> >>
> >> Thiago Moreira
> >> +55 48 99911-6331
> >>
> >>
> >> On Sun, Sep 2, 2018 at 12:12 PM Francois Papon
> >> mailto:francois.pa...@openobject.fr>>
> >> wrote:
> >>
> >> Sorry, I missed it, I see it now :)
> >>
> >> @Component(service = Bot.class, factory = "bot.factory")
> >> public class BotImpl implements Bot {
> >>
> >> regards
> >>
> >> François Papon
> >> fpa...@apache.org <mailto:fpa...@apache.org>
> >>
> >> Le 02/09/2018 à 19:09, Francois Papon a écrit :
> >>>
> >>> Ok,
> >>>
> >>> You should use the maven-bundle-plugin instead of the bnd-plugin,
> >>> it's more convenient ;)
> >>>
> >>> Btw, I see that in your BotApplication class you are searching a
> >>> service with a component.factory property = bot.factory but I
> >>> can't see where you are registring this factory
> >>>
> >>> @Reference(target = "(component.factory=bot.factory)")
> >>> protected ComponentFactory factory;
> >>>
> >>> regards,
> >>>
> >>> François Papon
> >>> fpa...@apache.org <mailto:fpa...@apache.org>
> >>> Le 02/09/2018 à 19:01, Thiago Moreira (timba) a écrit :
> >>>>
> >>>>   Nice! I already look the example.
> >>>>
> >>>> Thiago Moreira
> >>>> +55 48 99911-6331
> >>>>
> >>>>
> >>>> On Sun, Sep 2, 2018 at 11:57 AM Francois Papon
> >>>>  >>>> <mailto:francois.pa...@openobject.fr>> wrote:
> >>>>
> >>>> I will take a look ;)
> >>>>
> >>>> You can also take a look on the Karaf SCR example to deal
> >>>> with scr.
> >>>>
> >>>> regards,
> >>>>
> >>>> François Papon
> >>>> fpa...@apache.org <mailto:fpa...@apache.org>
> >>>>
> >>>> Le 02/09/2018 à 18:01, Thiago Moreira (timba) a écrit :
> >>>>>
> >>>>>   Hey François, the project is available
> >>>>> here https://github.com/tmoreira2020/poc-osgi-whiteboard
> >>>>>
> >>>>>   Thanks
> >>>>>
> >>>>> Thiago Moreira
> >>>>> +55 48 99911-6331
> >>>>>
> >>>>>
> >>>>> On Sun, Sep 2, 2018 at 10:45 AM francois.papon
> >>>>>  >>>>> <mailto:francois.pa...@openobject.fr>> wrote:
> >>>>>
> >>>>> Hi,
> >>>>>
> >>>>> Can you share your bundle and your feature ?
> >>>>>
> >>>>> Regards,
> >>>>>
> >>>>> François
> >>&g

Re: Unable to deploy a Karaf kar file containing a ComponentFactory OSGi declarative service

2018-09-02 Thread Jean-Baptiste Onofré
Some may see this as a pro, some as a cons ;)

Anyway, maven-bundle-plugin uses bnd (library). The bnd plugin allows to
delegate the headers definition in the specific file.

maven-bundle-plugin defines a lot of default headers based on Maven.
That's what I would like to check (the diff in the generated headers).

Regards
JB

On 02/09/2018 17:25, Francois Papon wrote:
> You don't have to declare things in a bnd.bnd file,  you can define it
> directly in the plugin configuration in your pom.xml like this :
> 
>             
>     org.apache.felix
>     maven-bundle-plugin
>     
>     
>     
>     org.apache.karaf.vineyard.registry.api
>     
>     
>     
>     
> 
> regards,
> 
> François Papon
> fpa...@apache.org
> 
> Le 02/09/2018 à 19:21, Thiago Moreira (timba) a écrit :
>>
>>   What is the advantages in your point of view of bundle over bnd?
>> Maybe I should start another thread...
>>
>> Thiago Moreira
>> +55 48 99911-6331
>>
>>
>> On Sun, Sep 2, 2018 at 12:12 PM Francois Papon
>> mailto:francois.pa...@openobject.fr>>
>> wrote:
>>
>> Sorry, I missed it, I see it now :)
>>
>> @Component(service = Bot.class, factory = "bot.factory")
>> public class BotImpl implements Bot {
>>
>> regards
>>
>> François Papon
>> fpa...@apache.org <mailto:fpa...@apache.org>
>>
>> Le 02/09/2018 à 19:09, Francois Papon a écrit :
>>>
>>> Ok,
>>>
>>> You should use the maven-bundle-plugin instead of the bnd-plugin,
>>> it's more convenient ;)
>>>
>>> Btw, I see that in your BotApplication class you are searching a
>>> service with a component.factory property = bot.factory but I
>>> can't see where you are registring this factory
>>>
>>> @Reference(target = "(component.factory=bot.factory)")
>>> protected ComponentFactory factory;
>>>
>>> regards,
>>>
>>> François Papon
>>> fpa...@apache.org <mailto:fpa...@apache.org>
>>> Le 02/09/2018 à 19:01, Thiago Moreira (timba) a écrit :
>>>>
>>>>   Nice! I already look the example.
>>>>
>>>> Thiago Moreira
>>>> +55 48 99911-6331
>>>>
>>>>
>>>> On Sun, Sep 2, 2018 at 11:57 AM Francois Papon
>>>> >>> <mailto:francois.pa...@openobject.fr>> wrote:
>>>>
>>>> I will take a look ;)
>>>>
>>>> You can also take a look on the Karaf SCR example to deal
>>>> with scr.
>>>>
>>>> regards,
>>>>
>>>> François Papon
>>>> fpa...@apache.org <mailto:fpa...@apache.org>
>>>>
>>>> Le 02/09/2018 à 18:01, Thiago Moreira (timba) a écrit :
>>>>>
>>>>>   Hey François, the project is available
>>>>> here https://github.com/tmoreira2020/poc-osgi-whiteboard
>>>>>
>>>>>   Thanks
>>>>>
>>>>> Thiago Moreira
>>>>>     +55 48 99911-6331
>>>>>
>>>>>
>>>>> On Sun, Sep 2, 2018 at 10:45 AM francois.papon
>>>>> >>>> <mailto:francois.pa...@openobject.fr>> wrote:
>>>>>
>>>>> Hi,
>>>>>
>>>>> Can you share your bundle and your feature ?
>>>>>
>>>>> Regards,
>>>>>
>>>>> François 
>>>>>
>>>>>
>>>>>
>>>>> Envoyé depuis mon smartphone Samsung Galaxy.
>>>>>
>>>>>  Message d'origine 
>>>>> De : "Thiago Moreira (timba)" >>>> <mailto:tmoreira2...@gmail.com>>
>>>>> Date : 02/09/2018 16:14 (GMT+04:00)
>>>>> À : user@karaf.apache.org <mailto:user@karaf.apache.org>
>>>>> Objet : Re: Unable to deploy a Karaf kar file
>>>>> containing a ComponentFactory OSGi declarative service
>>>>>
>>>>>
>>>>>   

Re: Unable to deploy a Karaf kar file containing a ComponentFactory OSGi declarative service

2018-09-02 Thread Francois Papon
You don't have to declare things in a bnd.bnd file,  you can define it
directly in the plugin configuration in your pom.xml like this :

            
    org.apache.felix
    maven-bundle-plugin
    
    
    
    org.apache.karaf.vineyard.registry.api
    
    
    
    

regards,

François Papon
fpa...@apache.org

Le 02/09/2018 à 19:21, Thiago Moreira (timba) a écrit :
>
>   What is the advantages in your point of view of bundle over bnd?
> Maybe I should start another thread...
>
> Thiago Moreira
> +55 48 99911-6331
>
>
> On Sun, Sep 2, 2018 at 12:12 PM Francois Papon
> mailto:francois.pa...@openobject.fr>>
> wrote:
>
> Sorry, I missed it, I see it now :)
>
> @Component(service = Bot.class, factory = "bot.factory")
> public class BotImpl implements Bot {
>
> regards
>
> François Papon
> fpa...@apache.org <mailto:fpa...@apache.org>
>
> Le 02/09/2018 à 19:09, Francois Papon a écrit :
>>
>> Ok,
>>
>> You should use the maven-bundle-plugin instead of the bnd-plugin,
>> it's more convenient ;)
>>
>> Btw, I see that in your BotApplication class you are searching a
>> service with a component.factory property = bot.factory but I
>> can't see where you are registring this factory
>>
>> @Reference(target = "(component.factory=bot.factory)")
>> protected ComponentFactory factory;
>>
>> regards,
>>
>> François Papon
>> fpa...@apache.org <mailto:fpa...@apache.org>
>> Le 02/09/2018 à 19:01, Thiago Moreira (timba) a écrit :
>>>
>>>   Nice! I already look the example.
>>>
>>> Thiago Moreira
>>> +55 48 99911-6331
>>>
>>>
>>> On Sun, Sep 2, 2018 at 11:57 AM Francois Papon
>>> >> <mailto:francois.pa...@openobject.fr>> wrote:
>>>
>>> I will take a look ;)
>>>
>>> You can also take a look on the Karaf SCR example to deal
>>> with scr.
>>>
>>> regards,
>>>
>>> François Papon
>>> fpa...@apache.org <mailto:fpa...@apache.org>
>>>
>>> Le 02/09/2018 à 18:01, Thiago Moreira (timba) a écrit :
>>>>
>>>>   Hey François, the project is available
>>>> here https://github.com/tmoreira2020/poc-osgi-whiteboard
>>>>
>>>>   Thanks
>>>>
>>>> Thiago Moreira
>>>> +55 48 99911-6331
>>>>
>>>>
>>>> On Sun, Sep 2, 2018 at 10:45 AM francois.papon
>>>> >>> <mailto:francois.pa...@openobject.fr>> wrote:
>>>>
>>>>     Hi,
>>>>
>>>> Can you share your bundle and your feature ?
>>>>
>>>> Regards,
>>>>
>>>> François 
>>>>
>>>>
>>>>
>>>> Envoyé depuis mon smartphone Samsung Galaxy.
>>>>
>>>>  Message d'origine 
>>>> De : "Thiago Moreira (timba)" >>> <mailto:tmoreira2...@gmail.com>>
>>>> Date : 02/09/2018 16:14 (GMT+04:00)
>>>> À : user@karaf.apache.org <mailto:user@karaf.apache.org>
>>>> Objet : Re: Unable to deploy a Karaf kar file
>>>> containing a ComponentFactory OSGi declarative service
>>>>
>>>>
>>>>   I have tried with Karaf 4.2.1 without lucky. My steps:
>>>>
>>>>  1. Unzip the bundle
>>>>  2. Start with karaf command
>>>>  3. Build the project with mvn clean install
>>>>  4. Install the kar file
>>>>  1. Copy the kar file
>>>> br.com.thiagomoreira.kar-1.0.0-SNAPSHOT.kar to
>>>> the deploy folder
>>>>  2. Or use the kar:install command
>>>>  5. Logs and console prints the exception: *Unable to
>>>> resolve
>>>> br.com.thiagomoreira.application/1.0.0.201809021204:
>>>> missing requirement
>>&

Re: Unable to deploy a Karaf kar file containing a ComponentFactory OSGi declarative service

2018-09-02 Thread Thiago Moreira (timba)
  What is the advantages in your point of view of bundle over bnd? Maybe I
should start another thread...

Thiago Moreira
+55 48 99911-6331


On Sun, Sep 2, 2018 at 12:12 PM Francois Papon 
wrote:

> Sorry, I missed it, I see it now :)
>
> @Component(service = Bot.class, factory = "bot.factory")
> public class BotImpl implements Bot {
>
> regards
>
> François paponfpa...@apache.org
>
> Le 02/09/2018 à 19:09, Francois Papon a écrit :
>
> Ok,
>
> You should use the maven-bundle-plugin instead of the bnd-plugin, it's
> more convenient ;)
>
> Btw, I see that in your BotApplication class you are searching a service
> with a component.factory property = bot.factory but I can't see where you
> are registring this factory
>
> @Reference(target = "(component.factory=bot.factory)")
> protected ComponentFactory factory;
>
> regards,
>
> François paponfpa...@apache.org
>
> Le 02/09/2018 à 19:01, Thiago Moreira (timba) a écrit :
>
>
>   Nice! I already look the example.
>
> Thiago Moreira
> +55 48 99911-6331
>
>
> On Sun, Sep 2, 2018 at 11:57 AM Francois Papon <
> francois.pa...@openobject.fr> wrote:
>
>> I will take a look ;)
>>
>> You can also take a look on the Karaf SCR example to deal with scr.
>>
>> regards,
>>
>> François paponfpa...@apache.org
>>
>> Le 02/09/2018 à 18:01, Thiago Moreira (timba) a écrit :
>>
>>
>>   Hey François, the project is available here
>> https://github.com/tmoreira2020/poc-osgi-whiteboard
>>
>>   Thanks
>>
>> Thiago Moreira
>> +55 48 99911-6331
>>
>>
>> On Sun, Sep 2, 2018 at 10:45 AM francois.papon <
>> francois.pa...@openobject.fr> wrote:
>>
>>> Hi,
>>>
>>> Can you share your bundle and your feature ?
>>>
>>> Regards,
>>>
>>> François
>>>
>>>
>>>
>>> Envoyé depuis mon smartphone Samsung Galaxy.
>>>
>>>  Message d'origine 
>>> De : "Thiago Moreira (timba)" 
>>> Date : 02/09/2018 16:14 (GMT+04:00)
>>> À : user@karaf.apache.org
>>> Objet : Re: Unable to deploy a Karaf kar file containing a
>>> ComponentFactory OSGi declarative service
>>>
>>>
>>>   I have tried with Karaf 4.2.1 without lucky. My steps:
>>>
>>>1. Unzip the bundle
>>>2. Start with karaf command
>>>3. Build the project with mvn clean install
>>>4. Install the kar file
>>>   1. Copy the kar file br.com.thiagomoreira.kar-1.0.0-SNAPSHOT.kar
>>>   to the deploy folder
>>>   2. Or use the kar:install command
>>>5. Logs and console prints the exception: *Unable to resolve
>>>br.com.thiagomoreira.application/1.0.0.201809021204: missing requirement
>>>[br.com.thiagomoreira.application/1.0.0.201809021204] osgi.service;
>>>filter:="(objectClass=org.osgi.service.component.ComponentFactory)";
>>>effective:=active*
>>>
>>>   I have tried to install SCR feature before the kar fail too, without
>>> lucky. What I'm missing?
>>>
>>>   Yes, I was using ServiceMix 7.0.1 but now I switched to Karaf 4.2.1
>>> (after your reply in the ServiceMix mailing list)
>>>
>>>   Thanks
>>>
>>> Thiago Moreira
>>> +55 48 99911-6331
>>>
>>>
>>> On Sun, Sep 2, 2018 at 1:53 AM Jean-Baptiste Onofré 
>>> wrote:
>>>
>>>> Hi,
>>>>
>>>> I tried on both Karaf 4.1.6 and Karaf 4.2.1, and it works fine for me:
>>>> the SCR feature is installed and my SCR bundle starts correctly when I
>>>> put the kar in the deploy folder or when I use kar:install.
>>>>
>>>> So, you are using SMX 7.0.1 as Karaf version ?
>>>>
>>>> Regards
>>>> JB
>>>>
>>>> On 01/09/2018 19:10, Thiago Moreira (timba) wrote:
>>>> >
>>>> >   I need scr as prerequisite to run my app. The thing is I'm running a
>>>> > docker that has a vanilla ServiceMix (7.0.1) installation and my goal
>>>> is
>>>> > to be able to deploy a single file with everything that I need.
>>>> >
>>>> >   I tried to install scr and then deploy the kar (via deploy folder)
>>>> but
>>>> > not lucky
>>>> >
>>>> >   Yes, the service org.osgi.service.component.ComponentFactory is
>>>> > installe

Re: Unable to deploy a Karaf kar file containing a ComponentFactory OSGi declarative service

2018-09-02 Thread Francois Papon
Sorry, I missed it, I see it now :)

@Component(service = Bot.class, factory = "bot.factory")
public class BotImpl implements Bot {

regards

François Papon
fpa...@apache.org

Le 02/09/2018 à 19:09, Francois Papon a écrit :
>
> Ok,
>
> You should use the maven-bundle-plugin instead of the bnd-plugin, it's
> more convenient ;)
>
> Btw, I see that in your BotApplication class you are searching a
> service with a component.factory property = bot.factory but I can't
> see where you are registring this factory
>
> @Reference(target = "(component.factory=bot.factory)")
> protected ComponentFactory factory;
>
> regards,
>
> François Papon
> fpa...@apache.org
> Le 02/09/2018 à 19:01, Thiago Moreira (timba) a écrit :
>>
>>   Nice! I already look the example.
>>
>> Thiago Moreira
>> +55 48 99911-6331
>>
>>
>> On Sun, Sep 2, 2018 at 11:57 AM Francois Papon
>> mailto:francois.pa...@openobject.fr>>
>> wrote:
>>
>> I will take a look ;)
>>
>> You can also take a look on the Karaf SCR example to deal with scr.
>>
>> regards,
>>
>> François Papon
>> fpa...@apache.org <mailto:fpa...@apache.org>
>>
>> Le 02/09/2018 à 18:01, Thiago Moreira (timba) a écrit :
>>>
>>>   Hey François, the project is available
>>> here https://github.com/tmoreira2020/poc-osgi-whiteboard
>>>
>>>   Thanks
>>>
>>> Thiago Moreira
>>> +55 48 99911-6331
>>>
>>>
>>> On Sun, Sep 2, 2018 at 10:45 AM francois.papon
>>> >> <mailto:francois.pa...@openobject.fr>> wrote:
>>>
>>> Hi,
>>>
>>> Can you share your bundle and your feature ?
>>>
>>> Regards,
>>>
>>> François 
>>>
>>>
>>>
>>> Envoyé depuis mon smartphone Samsung Galaxy.
>>>
>>>  Message d'origine 
>>> De : "Thiago Moreira (timba)" >> <mailto:tmoreira2...@gmail.com>>
>>> Date : 02/09/2018 16:14 (GMT+04:00)
>>> À : user@karaf.apache.org <mailto:user@karaf.apache.org>
>>> Objet : Re: Unable to deploy a Karaf kar file containing a
>>> ComponentFactory OSGi declarative service
>>>
>>>
>>>   I have tried with Karaf 4.2.1 without lucky. My steps:
>>>
>>>  1. Unzip the bundle
>>>  2. Start with karaf command
>>>  3. Build the project with mvn clean install
>>>  4. Install the kar file
>>>  1. Copy the kar file
>>> br.com.thiagomoreira.kar-1.0.0-SNAPSHOT.kar to the
>>> deploy folder
>>>  2. Or use the kar:install command
>>>  5. Logs and console prints the exception: *Unable to
>>> resolve
>>> br.com.thiagomoreira.application/1.0.0.201809021204:
>>> missing requirement
>>> [br.com.thiagomoreira.application/1.0.0.201809021204]
>>> osgi.service;
>>> 
>>> filter:="(objectClass=org.osgi.service.component.ComponentFactory)";
>>> effective:=active*
>>>
>>>   I have tried to install SCR feature before the kar fail
>>> too, without lucky. What I'm missing?
>>>
>>>   Yes, I was using ServiceMix 7.0.1 but now I switched to
>>> Karaf 4.2.1 (after your reply in the ServiceMix mailing list)
>>>
>>>   Thanks
>>>
>>> Thiago Moreira
>>> +55 48 99911-6331
>>>
>>>
>>> On Sun, Sep 2, 2018 at 1:53 AM Jean-Baptiste Onofré
>>> mailto:j...@nanthrax.net>> wrote:
>>>
>>> Hi,
>>>
>>> I tried on both Karaf 4.1.6 and Karaf 4.2.1, and it
>>> works fine for me:
>>> the SCR feature is installed and my SCR bundle starts
>>> correctly when I
>>> put the kar in the deploy folder or when I use kar:install.
>>>
>>> So, you are using SMX 7.0.1 as Karaf version ?
>>>
>>> Regards
>>> JB
>>>
>>> On 01/09/2018 19:10, Thiago Moreira (timba) wrote:
>>> >
>>> >   I need scr

Re: Unable to deploy a Karaf kar file containing a ComponentFactory OSGi declarative service

2018-09-02 Thread Francois Papon
Ok,

You should use the maven-bundle-plugin instead of the bnd-plugin, it's
more convenient ;)

Btw, I see that in your BotApplication class you are searching a service
with a component.factory property = bot.factory but I can't see where
you are registring this factory

@Reference(target = "(component.factory=bot.factory)")
protected ComponentFactory factory;

regards,

François Papon
fpa...@apache.org

Le 02/09/2018 à 19:01, Thiago Moreira (timba) a écrit :
>
>   Nice! I already look the example.
>
> Thiago Moreira
> +55 48 99911-6331
>
>
> On Sun, Sep 2, 2018 at 11:57 AM Francois Papon
> mailto:francois.pa...@openobject.fr>>
> wrote:
>
> I will take a look ;)
>
> You can also take a look on the Karaf SCR example to deal with scr.
>
> regards,
>
> François Papon
> fpa...@apache.org <mailto:fpa...@apache.org>
>
> Le 02/09/2018 à 18:01, Thiago Moreira (timba) a écrit :
>>
>>   Hey François, the project is available
>> here https://github.com/tmoreira2020/poc-osgi-whiteboard
>>
>>   Thanks
>>
>> Thiago Moreira
>> +55 48 99911-6331
>>
>>
>> On Sun, Sep 2, 2018 at 10:45 AM francois.papon
>> > <mailto:francois.pa...@openobject.fr>> wrote:
>>
>> Hi,
>>
>> Can you share your bundle and your feature ?
>>
>> Regards,
>>
>> François 
>>
>>
>>
>> Envoyé depuis mon smartphone Samsung Galaxy.
>>
>>  Message d'origine 
>> De : "Thiago Moreira (timba)" > <mailto:tmoreira2...@gmail.com>>
>> Date : 02/09/2018 16:14 (GMT+04:00)
>> À : user@karaf.apache.org <mailto:user@karaf.apache.org>
>> Objet : Re: Unable to deploy a Karaf kar file containing a
>> ComponentFactory OSGi declarative service
>>
>>
>>   I have tried with Karaf 4.2.1 without lucky. My steps:
>>
>>  1. Unzip the bundle
>>  2. Start with karaf command
>>  3. Build the project with mvn clean install
>>  4. Install the kar file
>>  1. Copy the kar file
>> br.com.thiagomoreira.kar-1.0.0-SNAPSHOT.kar to the
>> deploy folder
>>  2. Or use the kar:install command
>>  5. Logs and console prints the exception: *Unable to resolve
>> br.com.thiagomoreira.application/1.0.0.201809021204:
>> missing requirement
>> [br.com.thiagomoreira.application/1.0.0.201809021204]
>> osgi.service;
>> 
>> filter:="(objectClass=org.osgi.service.component.ComponentFactory)";
>> effective:=active*
>>
>>   I have tried to install SCR feature before the kar fail
>> too, without lucky. What I'm missing?
>>
>>   Yes, I was using ServiceMix 7.0.1 but now I switched to
>> Karaf 4.2.1 (after your reply in the ServiceMix mailing list)
>>
>>   Thanks
>>
>> Thiago Moreira
>> +55 48 99911-6331
>>
>>
>> On Sun, Sep 2, 2018 at 1:53 AM Jean-Baptiste Onofré
>> mailto:j...@nanthrax.net>> wrote:
>>
>> Hi,
>>
>> I tried on both Karaf 4.1.6 and Karaf 4.2.1, and it works
>> fine for me:
>> the SCR feature is installed and my SCR bundle starts
>> correctly when I
>> put the kar in the deploy folder or when I use kar:install.
>>
>> So, you are using SMX 7.0.1 as Karaf version ?
>>
>> Regards
>> JB
>>
>> On 01/09/2018 19:10, Thiago Moreira (timba) wrote:
>> >
>> >   I need scr as prerequisite to run my app. The thing
>> is I'm running a
>> > docker that has a vanilla ServiceMix (7.0.1)
>> installation and my goal is
>> > to be able to deploy a single file with everything that
>> I need.
>> >
>> >   I tried to install scr and then deploy the kar (via
>> deploy folder) but
>> > not lucky
>> >
>> >   Yes, the
>> service org.osgi.service.component.ComponentFactory is
>> > installed and it is provided by my "Bot Implementation"
>>

Re: Unable to deploy a Karaf kar file containing a ComponentFactory OSGi declarative service

2018-09-02 Thread Thiago Moreira (timba)
  Nice! I already look the example.

Thiago Moreira
+55 48 99911-6331


On Sun, Sep 2, 2018 at 11:57 AM Francois Papon 
wrote:

> I will take a look ;)
>
> You can also take a look on the Karaf SCR example to deal with scr.
>
> regards,
>
> François paponfpa...@apache.org
>
> Le 02/09/2018 à 18:01, Thiago Moreira (timba) a écrit :
>
>
>   Hey François, the project is available here
> https://github.com/tmoreira2020/poc-osgi-whiteboard
>
>   Thanks
>
> Thiago Moreira
> +55 48 99911-6331
>
>
> On Sun, Sep 2, 2018 at 10:45 AM francois.papon <
> francois.pa...@openobject.fr> wrote:
>
>> Hi,
>>
>> Can you share your bundle and your feature ?
>>
>> Regards,
>>
>> François
>>
>>
>>
>> Envoyé depuis mon smartphone Samsung Galaxy.
>>
>>  Message d'origine 
>> De : "Thiago Moreira (timba)" 
>> Date : 02/09/2018 16:14 (GMT+04:00)
>> À : user@karaf.apache.org
>> Objet : Re: Unable to deploy a Karaf kar file containing a
>> ComponentFactory OSGi declarative service
>>
>>
>>   I have tried with Karaf 4.2.1 without lucky. My steps:
>>
>>1. Unzip the bundle
>>2. Start with karaf command
>>3. Build the project with mvn clean install
>>4. Install the kar file
>>   1. Copy the kar file br.com.thiagomoreira.kar-1.0.0-SNAPSHOT.kar
>>   to the deploy folder
>>   2. Or use the kar:install command
>>5. Logs and console prints the exception: *Unable to resolve
>>br.com.thiagomoreira.application/1.0.0.201809021204: missing requirement
>>[br.com.thiagomoreira.application/1.0.0.201809021204] osgi.service;
>>filter:="(objectClass=org.osgi.service.component.ComponentFactory)";
>>effective:=active*
>>
>>   I have tried to install SCR feature before the kar fail too, without
>> lucky. What I'm missing?
>>
>>   Yes, I was using ServiceMix 7.0.1 but now I switched to Karaf 4.2.1
>> (after your reply in the ServiceMix mailing list)
>>
>>   Thanks
>>
>> Thiago Moreira
>> +55 48 99911-6331
>>
>>
>> On Sun, Sep 2, 2018 at 1:53 AM Jean-Baptiste Onofré 
>> wrote:
>>
>>> Hi,
>>>
>>> I tried on both Karaf 4.1.6 and Karaf 4.2.1, and it works fine for me:
>>> the SCR feature is installed and my SCR bundle starts correctly when I
>>> put the kar in the deploy folder or when I use kar:install.
>>>
>>> So, you are using SMX 7.0.1 as Karaf version ?
>>>
>>> Regards
>>> JB
>>>
>>> On 01/09/2018 19:10, Thiago Moreira (timba) wrote:
>>> >
>>> >   I need scr as prerequisite to run my app. The thing is I'm running a
>>> > docker that has a vanilla ServiceMix (7.0.1) installation and my goal
>>> is
>>> > to be able to deploy a single file with everything that I need.
>>> >
>>> >   I tried to install scr and then deploy the kar (via deploy folder)
>>> but
>>> > not lucky
>>> >
>>> >   Yes, the service org.osgi.service.component.ComponentFactory is
>>> > installed and it is provided by my "Bot Implementation" bundle.
>>> >
>>> >   I didn't understand your last question. Is there another way to
>>> > achieve the installation of everything at once (like EARs)?
>>> >
>>> >   BTW, I'm an OSGi/Karaf/ServiceMix beginner. :D
>>> >
>>> > Thiago Moreira
>>> > +55 48 99911-6331
>>> >
>>> >
>>> > On Sat, Sep 1, 2018 at 1:28 PM Jean-Baptiste Onofré >> > <mailto:j...@nanthrax.net>> wrote:
>>> >
>>> > Oh sorry, I missed the cause:  the service
>>> > org.osgi.service.component.ComponentFactory is not there ;)
>>> >
>>> > Why do you have as a prerequisite ?
>>> >
>>> > I guess that if you install the scr feature before the kar it
>>> works fine
>>> > right ?
>>> >
>>> > Can you check if you have the ComponentFactory service ?
>>> >
>>> > By the way, why did you define the requirement in your bundle ?
>>> >
>>> > Regards
>>> > JB
>>> >
>>> > On 01/09/2018 18:19, Thiago Moreira (timba) wrote:
>>> > >
>>> > >   Hey JB, yes it does. Check it here feature.xml
>>> > >
>>> > <
>

Re: Unable to deploy a Karaf kar file containing a ComponentFactory OSGi declarative service

2018-09-02 Thread Francois Papon
I will take a look ;)

You can also take a look on the Karaf SCR example to deal with scr.

regards,

François Papon
fpa...@apache.org

Le 02/09/2018 à 18:01, Thiago Moreira (timba) a écrit :
>
>   Hey François, the project is available
> here https://github.com/tmoreira2020/poc-osgi-whiteboard
>
>   Thanks
>
> Thiago Moreira
> +55 48 99911-6331
>
>
> On Sun, Sep 2, 2018 at 10:45 AM francois.papon
> mailto:francois.pa...@openobject.fr>>
> wrote:
>
> Hi,
>
> Can you share your bundle and your feature ?
>
> Regards,
>
> François 
>
>
>
> Envoyé depuis mon smartphone Samsung Galaxy.
>
>  Message d'origine 
> De : "Thiago Moreira (timba)"  <mailto:tmoreira2...@gmail.com>>
> Date : 02/09/2018 16:14 (GMT+04:00)
> À : user@karaf.apache.org <mailto:user@karaf.apache.org>
> Objet : Re: Unable to deploy a Karaf kar file containing a
> ComponentFactory OSGi declarative service
>
>
>   I have tried with Karaf 4.2.1 without lucky. My steps:
>
>  1. Unzip the bundle
>  2. Start with karaf command
>  3. Build the project with mvn clean install
>  4. Install the kar file
>  1. Copy the kar file
> br.com.thiagomoreira.kar-1.0.0-SNAPSHOT.kar to the deploy
> folder
>  2. Or use the kar:install command
>  5. Logs and console prints the exception: *Unable to resolve
> br.com.thiagomoreira.application/1.0.0.201809021204: missing
> requirement
> [br.com.thiagomoreira.application/1.0.0.201809021204]
> osgi.service;
> filter:="(objectClass=org.osgi.service.component.ComponentFactory)";
> effective:=active*
>
>   I have tried to install SCR feature before the kar fail too,
> without lucky. What I'm missing?
>
>   Yes, I was using ServiceMix 7.0.1 but now I switched to Karaf
> 4.2.1 (after your reply in the ServiceMix mailing list)
>
>   Thanks
>
> Thiago Moreira
> +55 48 99911-6331
>
>
> On Sun, Sep 2, 2018 at 1:53 AM Jean-Baptiste Onofré
> mailto:j...@nanthrax.net>> wrote:
>
> Hi,
>
> I tried on both Karaf 4.1.6 and Karaf 4.2.1, and it works fine
> for me:
> the SCR feature is installed and my SCR bundle starts
> correctly when I
> put the kar in the deploy folder or when I use kar:install.
>
> So, you are using SMX 7.0.1 as Karaf version ?
>
> Regards
> JB
>
> On 01/09/2018 19:10, Thiago Moreira (timba) wrote:
> >
> >   I need scr as prerequisite to run my app. The thing is I'm
> running a
> > docker that has a vanilla ServiceMix (7.0.1) installation
> and my goal is
> > to be able to deploy a single file with everything that I need.
> >
> >   I tried to install scr and then deploy the kar (via deploy
> folder) but
> > not lucky
> >
> >   Yes, the
> service org.osgi.service.component.ComponentFactory is
> > installed and it is provided by my "Bot Implementation" bundle.
> >
> >   I didn't understand your last question. Is there another
> way to
> > achieve the installation of everything at once (like EARs)? 
> >
> >   BTW, I'm an OSGi/Karaf/ServiceMix beginner. :D
> >   
> > Thiago Moreira
> > +55 48 99911-6331
> >
> >
> > On Sat, Sep 1, 2018 at 1:28 PM Jean-Baptiste Onofré
> mailto:j...@nanthrax.net>
> > <mailto:j...@nanthrax.net <mailto:j...@nanthrax.net>>> wrote:
> >
> >     Oh sorry, I missed the cause:  the service
> >     org.osgi.service.component.ComponentFactory is not there ;)
> >
> >     Why do you have as a prerequisite ?
> >
> >     I guess that if you install the scr feature before the
> kar it works fine
> >     right ?
> >
> >     Can you check if you have the ComponentFactory service ?
> >
> >     By the way, why did you define the requirement in your
> bundle ?
> >
> >     Regards
> >     JB
> >
> >     On 01/09/2018 18:19, Thiago Moreira (timba) wrote:
> >     >
> >     >   Hey JB, yes it does. Check it here feature.xml
> &

Re: Unable to deploy a Karaf kar file containing a ComponentFactory OSGi declarative service

2018-09-02 Thread Jean-Baptiste Onofré
By the way, I saw you are using the maven bnd plugin, whereas I used the
maven-bundle-plugin from Felix. Let me check the generated headers.

Regards
JB

On 02/09/2018 14:14, Thiago Moreira (timba) wrote:
> 
>   I have tried with Karaf 4.2.1 without lucky. My steps:
> 
>  1. Unzip the bundle
>  2. Start with karaf command
>  3. Build the project with mvn clean install
>  4. Install the kar file
>  1. Copy the kar file br.com.thiagomoreira.kar-1.0.0-SNAPSHOT.kar to
> the deploy folder
>  2. Or use the kar:install command
>  5. Logs and console prints the exception: *Unable to resolve
> br.com.thiagomoreira.application/1.0.0.201809021204: missing
> requirement [br.com.thiagomoreira.application/1.0.0.201809021204]
> osgi.service;
> filter:="(objectClass=org.osgi.service.component.ComponentFactory)";
> effective:=active*
> 
>   I have tried to install SCR feature before the kar fail too, without
> lucky. What I'm missing?
> 
>   Yes, I was using ServiceMix 7.0.1 but now I switched to Karaf 4.2.1
> (after your reply in the ServiceMix mailing list)
> 
>   Thanks
> 
> Thiago Moreira
> +55 48 99911-6331
> 
> 
> On Sun, Sep 2, 2018 at 1:53 AM Jean-Baptiste Onofré  <mailto:j...@nanthrax.net>> wrote:
> 
> Hi,
> 
> I tried on both Karaf 4.1.6 and Karaf 4.2.1, and it works fine for me:
> the SCR feature is installed and my SCR bundle starts correctly when I
> put the kar in the deploy folder or when I use kar:install.
> 
> So, you are using SMX 7.0.1 as Karaf version ?
> 
> Regards
> JB
> 
> On 01/09/2018 19:10, Thiago Moreira (timba) wrote:
> >
> >   I need scr as prerequisite to run my app. The thing is I'm running a
> > docker that has a vanilla ServiceMix (7.0.1) installation and my
> goal is
> > to be able to deploy a single file with everything that I need.
> >
> >   I tried to install scr and then deploy the kar (via deploy
> folder) but
> > not lucky
> >
> >   Yes, the service org.osgi.service.component.ComponentFactory is
> > installed and it is provided by my "Bot Implementation" bundle.
> >
> >   I didn't understand your last question. Is there another way to
> > achieve the installation of everything at once (like EARs)? 
> >
> >   BTW, I'm an OSGi/Karaf/ServiceMix beginner. :D
> >   
> > Thiago Moreira
> > +55 48 99911-6331
> >
> >
> > On Sat, Sep 1, 2018 at 1:28 PM Jean-Baptiste Onofré
> mailto:j...@nanthrax.net>
> > <mailto:j...@nanthrax.net <mailto:j...@nanthrax.net>>> wrote:
> >
> >     Oh sorry, I missed the cause:  the service
> >     org.osgi.service.component.ComponentFactory is not there ;)
> >
> >     Why do you have as a prerequisite ?
> >
> >     I guess that if you install the scr feature before the kar it
> works fine
> >     right ?
> >
> >     Can you check if you have the ComponentFactory service ?
> >
> >     By the way, why did you define the requirement in your bundle ?
> >
> >     Regards
> >     JB
> >
> >     On 01/09/2018 18:19, Thiago Moreira (timba) wrote:
> >     >
> >     >   Hey JB, yes it does. Check it here feature.xml
> >     >
> >   
>  
> <https://github.com/tmoreira2020/poc-osgi-whiteboard/blob/master/br.com.thiagomoreira.kar/src/main/feature/feature.xml>
> >     >
> >     > Thiago Moreira
> >     > +55 48 99911-6331
> >     >
> >     >
> >     > On Sat, Sep 1, 2018 at 1:05 PM Jean-Baptiste Onofré
> >     mailto:j...@nanthrax.net>
> <mailto:j...@nanthrax.net <mailto:j...@nanthrax.net>>
> >     > <mailto:j...@nanthrax.net <mailto:j...@nanthrax.net>
> <mailto:j...@nanthrax.net <mailto:j...@nanthrax.net>>>> wrote:
> >     >
> >     >     Hi,
> >     >
> >     >     does the features XML used to create the kar contain the scr
> >     feature ?
> >     >
> >     >     Basically, as you are using DS, you have to install the scr
> >     feature.
> >     >
> >     >     Regards
> >     >     JB
> >     >
> >     >     On 01/09/2018 17:52, Thiago Moreira (timba) wrote:
> >     >     >
> >     >     >   Hey all! Does anyon

Re: Unable to deploy a Karaf kar file containing a ComponentFactory OSGi declarative service

2018-09-02 Thread Thiago Moreira (timba)
  Hey François, the project is available here
https://github.com/tmoreira2020/poc-osgi-whiteboard

  Thanks

Thiago Moreira
+55 48 99911-6331


On Sun, Sep 2, 2018 at 10:45 AM francois.papon 
wrote:

> Hi,
>
> Can you share your bundle and your feature ?
>
> Regards,
>
> François
>
>
>
> Envoyé depuis mon smartphone Samsung Galaxy.
>
>  Message d'origine 
> De : "Thiago Moreira (timba)" 
> Date : 02/09/2018 16:14 (GMT+04:00)
> À : user@karaf.apache.org
> Objet : Re: Unable to deploy a Karaf kar file containing a
> ComponentFactory OSGi declarative service
>
>
>   I have tried with Karaf 4.2.1 without lucky. My steps:
>
>1. Unzip the bundle
>2. Start with karaf command
>3. Build the project with mvn clean install
>4. Install the kar file
>   1. Copy the kar file br.com.thiagomoreira.kar-1.0.0-SNAPSHOT.kar to
>   the deploy folder
>   2. Or use the kar:install command
>5. Logs and console prints the exception: *Unable to resolve
>br.com.thiagomoreira.application/1.0.0.201809021204: missing requirement
>[br.com.thiagomoreira.application/1.0.0.201809021204] osgi.service;
>filter:="(objectClass=org.osgi.service.component.ComponentFactory)";
>effective:=active*
>
>   I have tried to install SCR feature before the kar fail too, without
> lucky. What I'm missing?
>
>   Yes, I was using ServiceMix 7.0.1 but now I switched to Karaf 4.2.1
> (after your reply in the ServiceMix mailing list)
>
>   Thanks
>
> Thiago Moreira
> +55 48 99911-6331
>
>
> On Sun, Sep 2, 2018 at 1:53 AM Jean-Baptiste Onofré 
> wrote:
>
>> Hi,
>>
>> I tried on both Karaf 4.1.6 and Karaf 4.2.1, and it works fine for me:
>> the SCR feature is installed and my SCR bundle starts correctly when I
>> put the kar in the deploy folder or when I use kar:install.
>>
>> So, you are using SMX 7.0.1 as Karaf version ?
>>
>> Regards
>> JB
>>
>> On 01/09/2018 19:10, Thiago Moreira (timba) wrote:
>> >
>> >   I need scr as prerequisite to run my app. The thing is I'm running a
>> > docker that has a vanilla ServiceMix (7.0.1) installation and my goal is
>> > to be able to deploy a single file with everything that I need.
>> >
>> >   I tried to install scr and then deploy the kar (via deploy folder) but
>> > not lucky
>> >
>> >   Yes, the service org.osgi.service.component.ComponentFactory is
>> > installed and it is provided by my "Bot Implementation" bundle.
>> >
>> >   I didn't understand your last question. Is there another way to
>> > achieve the installation of everything at once (like EARs)?
>> >
>> >   BTW, I'm an OSGi/Karaf/ServiceMix beginner. :D
>> >
>> > Thiago Moreira
>> > +55 48 99911-6331
>> >
>> >
>> > On Sat, Sep 1, 2018 at 1:28 PM Jean-Baptiste Onofré > > <mailto:j...@nanthrax.net>> wrote:
>> >
>> > Oh sorry, I missed the cause:  the service
>> > org.osgi.service.component.ComponentFactory is not there ;)
>> >
>> > Why do you have as a prerequisite ?
>> >
>> > I guess that if you install the scr feature before the kar it works
>> fine
>> > right ?
>> >
>> > Can you check if you have the ComponentFactory service ?
>> >
>> > By the way, why did you define the requirement in your bundle ?
>> >
>> > Regards
>> > JB
>> >
>> > On 01/09/2018 18:19, Thiago Moreira (timba) wrote:
>> > >
>> > >   Hey JB, yes it does. Check it here feature.xml
>> > >
>> > <
>> https://github.com/tmoreira2020/poc-osgi-whiteboard/blob/master/br.com.thiagomoreira.kar/src/main/feature/feature.xml
>> >
>> > >
>> > > Thiago Moreira
>> > > +55 48 99911-6331
>> > >
>> > >
>> > > On Sat, Sep 1, 2018 at 1:05 PM Jean-Baptiste Onofré
>> > mailto:j...@nanthrax.net>
>> > > <mailto:j...@nanthrax.net <mailto:j...@nanthrax.net>>> wrote:
>> > >
>> > > Hi,
>> > >
>> > > does the features XML used to create the kar contain the scr
>> > feature ?
>> > >
>> > > Basically, as you are using DS, you have to install the scr
>> > feature.
>> > >
>> > > Regards
>> > > JB
>> > 

Re: Unable to deploy a Karaf kar file containing a ComponentFactory OSGi declarative service

2018-09-02 Thread francois.papon
Hi,
Can you share your bundle and your feature ?
Regards,
François 


Envoyé depuis mon smartphone Samsung Galaxy.
 Message d'origine De : "Thiago Moreira (timba)" 
 Date : 02/09/2018  16:14  (GMT+04:00) À : 
user@karaf.apache.org Objet : Re: Unable to deploy a Karaf kar file containing 
a ComponentFactory OSGi declarative service 

  I have tried with Karaf 4.2.1 without lucky. My steps:Unzip the bundleStart 
with karaf commandBuild the project with mvn clean install
Install the kar fileCopy the kar file 
br.com.thiagomoreira.kar-1.0.0-SNAPSHOT.kar to the deploy folderOr use the 
kar:install commandLogs and console prints the exception: Unable to resolve 
br.com.thiagomoreira.application/1.0.0.201809021204: missing requirement 
[br.com.thiagomoreira.application/1.0.0.201809021204] osgi.service; 
filter:="(objectClass=org.osgi.service.component.ComponentFactory)"; 
effective:=active  I have tried to install SCR feature before the kar fail too, 
without lucky. What I'm missing?
  Yes, I was using ServiceMix 7.0.1 but now I switched to Karaf 4.2.1 (after 
your reply in the ServiceMix mailing list)
  Thanks
Thiago Moreira+55 48 99911-6331

On Sun, Sep 2, 2018 at 1:53 AM Jean-Baptiste Onofré  wrote:
Hi,



I tried on both Karaf 4.1.6 and Karaf 4.2.1, and it works fine for me:

the SCR feature is installed and my SCR bundle starts correctly when I

put the kar in the deploy folder or when I use kar:install.



So, you are using SMX 7.0.1 as Karaf version ?



Regards

JB



On 01/09/2018 19:10, Thiago Moreira (timba) wrote:

> 

>   I need scr as prerequisite to run my app. The thing is I'm running a

> docker that has a vanilla ServiceMix (7.0.1) installation and my goal is

> to be able to deploy a single file with everything that I need.

> 

>   I tried to install scr and then deploy the kar (via deploy folder) but

> not lucky

> 

>   Yes, the service org.osgi.service.component.ComponentFactory is

> installed and it is provided by my "Bot Implementation" bundle.

> 

>   I didn't understand your last question. Is there another way to

> achieve the installation of everything at once (like EARs)? 

> 

>   BTW, I'm an OSGi/Karaf/ServiceMix beginner. :D

>   

> Thiago Moreira

> +55 48 99911-6331

> 

> 

> On Sat, Sep 1, 2018 at 1:28 PM Jean-Baptiste Onofré  <mailto:j...@nanthrax.net>> wrote:

> 

>     Oh sorry, I missed the cause:  the service

>     org.osgi.service.component.ComponentFactory is not there ;)

> 

>     Why do you have as a prerequisite ?

> 

>     I guess that if you install the scr feature before the kar it works fine

>     right ?

> 

>     Can you check if you have the ComponentFactory service ?

> 

>     By the way, why did you define the requirement in your bundle ?

> 

>     Regards

>     JB

> 

>     On 01/09/2018 18:19, Thiago Moreira (timba) wrote:

>     >

>     >   Hey JB, yes it does. Check it here feature.xml

>     >

>     
><https://github.com/tmoreira2020/poc-osgi-whiteboard/blob/master/br.com.thiagomoreira.kar/src/main/feature/feature.xml>

>     >

>     > Thiago Moreira

>     > +55 48 99911-6331

>     >

>     >

>     > On Sat, Sep 1, 2018 at 1:05 PM Jean-Baptiste Onofré

>     mailto:j...@nanthrax.net>

>     > <mailto:j...@nanthrax.net <mailto:j...@nanthrax.net>>> wrote:

>     >

>     >     Hi,

>     >

>     >     does the features XML used to create the kar contain the scr

>     feature ?

>     >

>     >     Basically, as you are using DS, you have to install the scr

>     feature.

>     >

>     >     Regards

>     >     JB

>     >

>     >     On 01/09/2018 17:52, Thiago Moreira (timba) wrote:

>     >     >

>     >     >   Hey all! Does anyone can help me with this question? 

>     >     >

>     >   

>      
>https://stackoverflow.com/questions/52118716/unable-to-deploy-a-karaf-kar-file-containing-a-componentfactory-osgi-declarative

>     >     >

>     >     >   Thanks

>     >     >

>     >     > p.s. I have tried to send the question directly to here

>     before but

>     >     seems

>     >     > that I wasn't properly added to the list. Given another try...

>     >     >

>     >     > Thiago Moreira

>     >     > +55 48 99911-6331

>     >

>     >     --

>     >     Jean-Baptiste Onofré

>     >     jbono...@apache.org <mailto:jbono...@apache.org>

>     <mailto:jbono...@apache.org <mailto:jbono...@apache.org>>

>     >     http://blog.nanthrax.net

>     >     Talend - http://www.talend.com

>     >

> 

>     -- 

>     Jean-Baptiste Onofré

>     jbono...@apache.org <mailto:jbono...@apache.org>

>     http://blog.nanthrax.net

>     Talend - http://www.talend.com

> 



-- 

Jean-Baptiste Onofré

jbono...@apache.org

http://blog.nanthrax.net

Talend - http://www.talend.com




Re: Unable to deploy a Karaf kar file containing a ComponentFactory OSGi declarative service

2018-09-02 Thread Thiago Moreira (timba)
  I have tried with Karaf 4.2.1 without lucky. My steps:

   1. Unzip the bundle
   2. Start with karaf command
   3. Build the project with mvn clean install
   4. Install the kar file
  1. Copy the kar file br.com.thiagomoreira.kar-1.0.0-SNAPSHOT.kar to
  the deploy folder
  2. Or use the kar:install command
   5. Logs and console prints the exception: *Unable to resolve
   br.com.thiagomoreira.application/1.0.0.201809021204: missing requirement
   [br.com.thiagomoreira.application/1.0.0.201809021204] osgi.service;
   filter:="(objectClass=org.osgi.service.component.ComponentFactory)";
   effective:=active*

  I have tried to install SCR feature before the kar fail too, without
lucky. What I'm missing?

  Yes, I was using ServiceMix 7.0.1 but now I switched to Karaf 4.2.1
(after your reply in the ServiceMix mailing list)

  Thanks

Thiago Moreira
+55 48 99911-6331


On Sun, Sep 2, 2018 at 1:53 AM Jean-Baptiste Onofré  wrote:

> Hi,
>
> I tried on both Karaf 4.1.6 and Karaf 4.2.1, and it works fine for me:
> the SCR feature is installed and my SCR bundle starts correctly when I
> put the kar in the deploy folder or when I use kar:install.
>
> So, you are using SMX 7.0.1 as Karaf version ?
>
> Regards
> JB
>
> On 01/09/2018 19:10, Thiago Moreira (timba) wrote:
> >
> >   I need scr as prerequisite to run my app. The thing is I'm running a
> > docker that has a vanilla ServiceMix (7.0.1) installation and my goal is
> > to be able to deploy a single file with everything that I need.
> >
> >   I tried to install scr and then deploy the kar (via deploy folder) but
> > not lucky
> >
> >   Yes, the service org.osgi.service.component.ComponentFactory is
> > installed and it is provided by my "Bot Implementation" bundle.
> >
> >   I didn't understand your last question. Is there another way to
> > achieve the installation of everything at once (like EARs)?
> >
> >   BTW, I'm an OSGi/Karaf/ServiceMix beginner. :D
> >
> > Thiago Moreira
> > +55 48 99911-6331
> >
> >
> > On Sat, Sep 1, 2018 at 1:28 PM Jean-Baptiste Onofré  > <mailto:j...@nanthrax.net>> wrote:
> >
> > Oh sorry, I missed the cause:  the service
> > org.osgi.service.component.ComponentFactory is not there ;)
> >
> > Why do you have as a prerequisite ?
> >
> > I guess that if you install the scr feature before the kar it works
> fine
> > right ?
> >
> > Can you check if you have the ComponentFactory service ?
> >
> > By the way, why did you define the requirement in your bundle ?
> >
> > Regards
> > JB
> >
> > On 01/09/2018 18:19, Thiago Moreira (timba) wrote:
> > >
> > >   Hey JB, yes it does. Check it here feature.xml
> > >
> > <
> https://github.com/tmoreira2020/poc-osgi-whiteboard/blob/master/br.com.thiagomoreira.kar/src/main/feature/feature.xml
> >
> > >
> > > Thiago Moreira
> > > +55 48 99911-6331
> > >
> > >
> > > On Sat, Sep 1, 2018 at 1:05 PM Jean-Baptiste Onofré
> > mailto:j...@nanthrax.net>
> > > <mailto:j...@nanthrax.net <mailto:j...@nanthrax.net>>> wrote:
> > >
> > > Hi,
> > >
> > > does the features XML used to create the kar contain the scr
> > feature ?
> > >
> > > Basically, as you are using DS, you have to install the scr
> > feature.
> > >
> > > Regards
> > > JB
> > >
> > > On 01/09/2018 17:52, Thiago Moreira (timba) wrote:
> > > >
> > > >   Hey all! Does anyone can help me with this question?
> > > >
> > >
> >
> https://stackoverflow.com/questions/52118716/unable-to-deploy-a-karaf-kar-file-containing-a-componentfactory-osgi-declarative
> > > >
> > > >   Thanks
> > > >
> > > > p.s. I have tried to send the question directly to here
> > before but
> > > seems
> > > > that I wasn't properly added to the list. Given another
> try...
> > > >
> > > > Thiago Moreira
> > > > +55 48 99911-6331
> > >
> > > --
> > > Jean-Baptiste Onofré
> > > jbono...@apache.org <mailto:jbono...@apache.org>
> > <mailto:jbono...@apache.org <mailto:jbono...@apache.org>>
> > > http://blog.nanthrax.net
> > > Talend - http://www.talend.com
> > >
> >
> > --
> > Jean-Baptiste Onofré
> > jbono...@apache.org <mailto:jbono...@apache.org>
> > http://blog.nanthrax.net
> > Talend - http://www.talend.com
> >
>
> --
> Jean-Baptiste Onofré
> jbono...@apache.org
> http://blog.nanthrax.net
> Talend - http://www.talend.com
>


Re: Unable to deploy a Karaf kar file containing a ComponentFactory OSGi declarative service

2018-09-01 Thread Jean-Baptiste Onofré
Hi,

I tried on both Karaf 4.1.6 and Karaf 4.2.1, and it works fine for me:
the SCR feature is installed and my SCR bundle starts correctly when I
put the kar in the deploy folder or when I use kar:install.

So, you are using SMX 7.0.1 as Karaf version ?

Regards
JB

On 01/09/2018 19:10, Thiago Moreira (timba) wrote:
> 
>   I need scr as prerequisite to run my app. The thing is I'm running a
> docker that has a vanilla ServiceMix (7.0.1) installation and my goal is
> to be able to deploy a single file with everything that I need.
> 
>   I tried to install scr and then deploy the kar (via deploy folder) but
> not lucky
> 
>   Yes, the service org.osgi.service.component.ComponentFactory is
> installed and it is provided by my "Bot Implementation" bundle.
> 
>   I didn't understand your last question. Is there another way to
> achieve the installation of everything at once (like EARs)? 
> 
>   BTW, I'm an OSGi/Karaf/ServiceMix beginner. :D
>   
> Thiago Moreira
> +55 48 99911-6331
> 
> 
> On Sat, Sep 1, 2018 at 1:28 PM Jean-Baptiste Onofré  <mailto:j...@nanthrax.net>> wrote:
> 
> Oh sorry, I missed the cause:  the service
> org.osgi.service.component.ComponentFactory is not there ;)
> 
> Why do you have as a prerequisite ?
> 
> I guess that if you install the scr feature before the kar it works fine
> right ?
> 
> Can you check if you have the ComponentFactory service ?
> 
> By the way, why did you define the requirement in your bundle ?
> 
> Regards
> JB
> 
> On 01/09/2018 18:19, Thiago Moreira (timba) wrote:
> >
> >   Hey JB, yes it does. Check it here feature.xml
> >
> 
> <https://github.com/tmoreira2020/poc-osgi-whiteboard/blob/master/br.com.thiagomoreira.kar/src/main/feature/feature.xml>
> >
> > Thiago Moreira
> > +55 48 99911-6331
> >
> >
> > On Sat, Sep 1, 2018 at 1:05 PM Jean-Baptiste Onofré
> mailto:j...@nanthrax.net>
> > <mailto:j...@nanthrax.net <mailto:j...@nanthrax.net>>> wrote:
> >
> >     Hi,
> >
> >     does the features XML used to create the kar contain the scr
> feature ?
> >
> >     Basically, as you are using DS, you have to install the scr
> feature.
> >
> >     Regards
> >     JB
> >
> >     On 01/09/2018 17:52, Thiago Moreira (timba) wrote:
> >     >
> >     >   Hey all! Does anyone can help me with this question? 
> >     >
> >   
>  
> https://stackoverflow.com/questions/52118716/unable-to-deploy-a-karaf-kar-file-containing-a-componentfactory-osgi-declarative
> >     >
> >     >   Thanks
> >     >
> >     > p.s. I have tried to send the question directly to here
> before but
> >     seems
> >     > that I wasn't properly added to the list. Given another try...
> >     >
> >     > Thiago Moreira
> >     > +55 48 99911-6331
> >
> >     --
> >     Jean-Baptiste Onofré
> >     jbono...@apache.org <mailto:jbono...@apache.org>
> <mailto:jbono...@apache.org <mailto:jbono...@apache.org>>
> >     http://blog.nanthrax.net
> >     Talend - http://www.talend.com
> >
> 
> -- 
> Jean-Baptiste Onofré
> jbono...@apache.org <mailto:jbono...@apache.org>
> http://blog.nanthrax.net
> Talend - http://www.talend.com
> 

-- 
Jean-Baptiste Onofré
jbono...@apache.org
http://blog.nanthrax.net
Talend - http://www.talend.com


Re: Unable to deploy a Karaf kar file containing a ComponentFactory OSGi declarative service

2018-09-01 Thread Thiago Moreira (timba)
  I need scr as prerequisite to run my app. The thing is I'm running a
docker that has a vanilla ServiceMix (7.0.1) installation and my goal is to
be able to deploy a single file with everything that I need.

  I tried to install scr and then deploy the kar (via deploy folder) but
not lucky

  Yes, the service org.osgi.service.component.ComponentFactory is installed
and it is provided by my "Bot Implementation" bundle.

  I didn't understand your last question. Is there another way to achieve
the installation of everything at once (like EARs)?

  BTW, I'm an OSGi/Karaf/ServiceMix beginner. :D

Thiago Moreira
+55 48 99911-6331


On Sat, Sep 1, 2018 at 1:28 PM Jean-Baptiste Onofré  wrote:

> Oh sorry, I missed the cause:  the service
> org.osgi.service.component.ComponentFactory is not there ;)
>
> Why do you have as a prerequisite ?
>
> I guess that if you install the scr feature before the kar it works fine
> right ?
>
> Can you check if you have the ComponentFactory service ?
>
> By the way, why did you define the requirement in your bundle ?
>
> Regards
> JB
>
> On 01/09/2018 18:19, Thiago Moreira (timba) wrote:
> >
> >   Hey JB, yes it does. Check it here feature.xml
> > <
> https://github.com/tmoreira2020/poc-osgi-whiteboard/blob/master/br.com.thiagomoreira.kar/src/main/feature/feature.xml
> >
> >
> > Thiago Moreira
> > +55 48 99911-6331
> >
> >
> > On Sat, Sep 1, 2018 at 1:05 PM Jean-Baptiste Onofré  > <mailto:j...@nanthrax.net>> wrote:
> >
> > Hi,
> >
> > does the features XML used to create the kar contain the scr feature
> ?
> >
> > Basically, as you are using DS, you have to install the scr feature.
> >
> > Regards
> > JB
> >
> > On 01/09/2018 17:52, Thiago Moreira (timba) wrote:
> > >
> > >   Hey all! Does anyone can help me with this question?
> > >
> >
> https://stackoverflow.com/questions/52118716/unable-to-deploy-a-karaf-kar-file-containing-a-componentfactory-osgi-declarative
> > >
> > >   Thanks
> > >
> > > p.s. I have tried to send the question directly to here before but
> > seems
> > > that I wasn't properly added to the list. Given another try...
> > >
> > > Thiago Moreira
> > > +55 48 99911-6331
> >
> > --
> > Jean-Baptiste Onofré
> > jbono...@apache.org <mailto:jbono...@apache.org>
> > http://blog.nanthrax.net
> > Talend - http://www.talend.com
> >
>
> --
> Jean-Baptiste Onofré
> jbono...@apache.org
> http://blog.nanthrax.net
> Talend - http://www.talend.com
>


Re: Unable to deploy a Karaf kar file containing a ComponentFactory OSGi declarative service

2018-09-01 Thread Jean-Baptiste Onofré
Oh sorry, I missed the cause:  the service
org.osgi.service.component.ComponentFactory is not there ;)

Why do you have as a prerequisite ?

I guess that if you install the scr feature before the kar it works fine
right ?

Can you check if you have the ComponentFactory service ?

By the way, why did you define the requirement in your bundle ?

Regards
JB

On 01/09/2018 18:19, Thiago Moreira (timba) wrote:
> 
>   Hey JB, yes it does. Check it here feature.xml
> <https://github.com/tmoreira2020/poc-osgi-whiteboard/blob/master/br.com.thiagomoreira.kar/src/main/feature/feature.xml>
> 
> Thiago Moreira
> +55 48 99911-6331
> 
> 
> On Sat, Sep 1, 2018 at 1:05 PM Jean-Baptiste Onofré  <mailto:j...@nanthrax.net>> wrote:
> 
> Hi,
> 
> does the features XML used to create the kar contain the scr feature ?
> 
> Basically, as you are using DS, you have to install the scr feature.
> 
> Regards
> JB
> 
> On 01/09/2018 17:52, Thiago Moreira (timba) wrote:
> >
> >   Hey all! Does anyone can help me with this question? 
> >
> 
> https://stackoverflow.com/questions/52118716/unable-to-deploy-a-karaf-kar-file-containing-a-componentfactory-osgi-declarative
> >
> >   Thanks
> >
> > p.s. I have tried to send the question directly to here before but
> seems
> > that I wasn't properly added to the list. Given another try...
> >
> > Thiago Moreira
> > +55 48 99911-6331
> 
> -- 
> Jean-Baptiste Onofré
> jbono...@apache.org <mailto:jbono...@apache.org>
> http://blog.nanthrax.net
> Talend - http://www.talend.com
> 

-- 
Jean-Baptiste Onofré
jbono...@apache.org
http://blog.nanthrax.net
Talend - http://www.talend.com


Re: Unable to deploy a Karaf kar file containing a ComponentFactory OSGi declarative service

2018-09-01 Thread Thiago Moreira (timba)
  Hey JB, yes it does. Check it here feature.xml
<https://github.com/tmoreira2020/poc-osgi-whiteboard/blob/master/br.com.thiagomoreira.kar/src/main/feature/feature.xml>

Thiago Moreira
+55 48 99911-6331


On Sat, Sep 1, 2018 at 1:05 PM Jean-Baptiste Onofré  wrote:

> Hi,
>
> does the features XML used to create the kar contain the scr feature ?
>
> Basically, as you are using DS, you have to install the scr feature.
>
> Regards
> JB
>
> On 01/09/2018 17:52, Thiago Moreira (timba) wrote:
> >
> >   Hey all! Does anyone can help me with this question?
> >
> https://stackoverflow.com/questions/52118716/unable-to-deploy-a-karaf-kar-file-containing-a-componentfactory-osgi-declarative
> >
> >   Thanks
> >
> > p.s. I have tried to send the question directly to here before but seems
> > that I wasn't properly added to the list. Given another try...
> >
> > Thiago Moreira
> > +55 48 99911-6331
>
> --
> Jean-Baptiste Onofré
> jbono...@apache.org
> http://blog.nanthrax.net
> Talend - http://www.talend.com
>


Re: Unable to deploy a Karaf kar file containing a ComponentFactory OSGi declarative service

2018-09-01 Thread Jean-Baptiste Onofré
Hi,

does the features XML used to create the kar contain the scr feature ?

Basically, as you are using DS, you have to install the scr feature.

Regards
JB

On 01/09/2018 17:52, Thiago Moreira (timba) wrote:
> 
>   Hey all! Does anyone can help me with this question? 
> https://stackoverflow.com/questions/52118716/unable-to-deploy-a-karaf-kar-file-containing-a-componentfactory-osgi-declarative
> 
>   Thanks
> 
> p.s. I have tried to send the question directly to here before but seems
> that I wasn't properly added to the list. Given another try...
> 
> Thiago Moreira
> +55 48 99911-6331

-- 
Jean-Baptiste Onofré
jbono...@apache.org
http://blog.nanthrax.net
Talend - http://www.talend.com