Re: OPS4J Pax JDBC + Derby = Duplicate DataSource

2019-02-01 Thread Jean-Baptiste Onofré
That's what I'm testing: still keeping pax-jdbc-derby feature but just
installing the derby bundle (not the pax-jdbc wrapper bundle).

Regards
JB

On 02/02/2019 07:35, Christian Schneider wrote:
> If derby now provides a DataSourceFactory then we should remove
> pax-jdbc-derby from the feature.
> 
> I guess at some point derby started providing the DSF and we just forgot
> to remove the adapter bundle.
> 
> Christian
> 
> Am Sa., 2. Feb. 2019 um 07:19 Uhr schrieb Jean-Baptiste Onofré
> mailto:j...@nanthrax.net>>:
> 
> By the way, a simple workaround is to stop or even remove the
> pax-jdbc-derby bundle, and use only the derby bundle (or the opposite).
> 
> Regards
> JB
> 
> On 02/02/2019 06:55, Jean-Baptiste Onofré wrote:
> > OK, I think I found the problem: installing the pax-jdbc-derby feature
> > actually registers two DataSourceFactory services:
> >
> > 1. a DataSourceFactory service coming from pax-jdbc-derby bundle
> (which
> > is normal) (org.apache.derby.jdbc.EmbeddedDriver)
> > 2. a DataSourceFactory service coming from directly Derby bundle
> > (org.apache.derby.jdbc.AutoloadedDriver).
> >
> > Both using the same derby value for osgi.jdbc.driver.name
>  service property.
> >
> > So pax-jdbc-config sees two factory and so it creates one
> datasource per
> > factory.
> >
> > That's why it's only when you use derby and actually, the two
> datasource
> > services come from the two factories.
> >
> > I'm fixing that.
> >
> > Regards
> > JB
> >
> > On 01/02/2019 19:10, Alex Soto wrote:
> >> Oh, thanks!
> >>
> >> Can you suggest a work around? 
> >> What s the ETA for a fix? 
> >> I have a release deadline looming and I am afraid I can't wait
> too long.  
> >>
> >> Thank you for the prompt response.
> >>
> >> Best regards,
> >> Alex soto
> >>
> >>
> >>
> >>
> >>> On Feb 1, 2019, at 1:05 PM, Jean-Baptiste Onofré
> mailto:j...@nanthrax.net>
> >>> >> wrote:
> >>>
> >>> Indeed, I can reproduce the issue embedded:
> >>>
> >>> Name    │ Service Id │ Product  │ Version   │ URL
> >>>    │ Status
> >>>
> 
> ┼┼──┼───┼───┼───
> >>> querier │ 91 │ Apache Derby │ 10.13.1.1 - (1765088) │
> >>> jdbc:derby:derby-data/querier │ OK
> >>> querier │ 92 │ Apache Derby │ 10.13.1.1 - (1765088) │
> >>> jdbc:derby:derby-data/querier │ OK
> >>>
> >>> I will fix that.
> >>>
> >>> Regards
> >>> JB
> >>>
> >>> On 01/02/2019 19:01, Alex Soto wrote:
> > How to do you provision the datasource cfg file ?
> > Using a feature or by dropping the file in the etc folder ?
> 
> 
>  Dropping file in the etc/ directory
> 
>  Best regards,
>  Alex soto
> 
> 
> 
> 
> > On Feb 1, 2019, at 12:57 PM, Jean-Baptiste Onofré
> mailto:j...@nanthrax.net>
> > >
> > >> wrote:
> >
> > Hi,
> >
> > I just did a blog where I'm using a derby datasource (on Karaf
> > 4.2.3-SNAPSHOT): http://blog.nanthrax.net/?p=874
> >
> > If you install an unique provider (only derby or derbyclient,
> but not
> > both), then, it should work.
> >
> > I did:
> >
> > feature:install pax-jdbc-derbyclient
> >
> > then:
> >
> > jdbc:ds-create -dn derbyclient -url
> jdbc:derby://localhost:1527/foo foo
> >
> > And I see only one datasource service:
> >
> > karaf@root()> jdbc:ds-list
> > Name  │ Service Id │ Product  │ Version
>   │ URL
> >  │ Status
> >
> 
> ┼┼──┼───┼───┼───
> > foo │ 91 │ Apache Derby │ 10.14.2.0 - (1828579) │
> > jdbc:derby://localhost:1527/scheduler │ OK
> >
> > In your case, it seems that pax-jdbc-config is in cause, like it
> > bootstrap two db.  How to do you provision the datasource cfg
> file ?
> > Using a feature or by dropping the file in the etc folder ?
> >
> > I will check when my build is complete.
> >
> > Regards
> > JB
> >
> > On 01/02/2019 18:48, Alex Soto wrote:
> >> Hello,
> >>
> >> I am experiencing a problem where /pax-jdbc-config/ (version
> 1.3.0) is
> >> creating 

Re: OPS4J Pax JDBC + Derby = Duplicate DataSource

2019-02-01 Thread Christian Schneider
If derby now provides a DataSourceFactory then we should remove
pax-jdbc-derby from the feature.

I guess at some point derby started providing the DSF and we just forgot to
remove the adapter bundle.

Christian

Am Sa., 2. Feb. 2019 um 07:19 Uhr schrieb Jean-Baptiste Onofré <
j...@nanthrax.net>:

> By the way, a simple workaround is to stop or even remove the
> pax-jdbc-derby bundle, and use only the derby bundle (or the opposite).
>
> Regards
> JB
>
> On 02/02/2019 06:55, Jean-Baptiste Onofré wrote:
> > OK, I think I found the problem: installing the pax-jdbc-derby feature
> > actually registers two DataSourceFactory services:
> >
> > 1. a DataSourceFactory service coming from pax-jdbc-derby bundle (which
> > is normal) (org.apache.derby.jdbc.EmbeddedDriver)
> > 2. a DataSourceFactory service coming from directly Derby bundle
> > (org.apache.derby.jdbc.AutoloadedDriver).
> >
> > Both using the same derby value for osgi.jdbc.driver.name service
> property.
> >
> > So pax-jdbc-config sees two factory and so it creates one datasource per
> > factory.
> >
> > That's why it's only when you use derby and actually, the two datasource
> > services come from the two factories.
> >
> > I'm fixing that.
> >
> > Regards
> > JB
> >
> > On 01/02/2019 19:10, Alex Soto wrote:
> >> Oh, thanks!
> >>
> >> Can you suggest a work around?
> >> What s the ETA for a fix?
> >> I have a release deadline looming and I am afraid I can't wait too
> long.
> >>
> >> Thank you for the prompt response.
> >>
> >> Best regards,
> >> Alex soto
> >>
> >>
> >>
> >>
> >>> On Feb 1, 2019, at 1:05 PM, Jean-Baptiste Onofré  >>> > wrote:
> >>>
> >>> Indeed, I can reproduce the issue embedded:
> >>>
> >>> Name│ Service Id │ Product  │ Version   │ URL
> >>>│ Status
> >>>
> ┼┼──┼───┼───┼───
> >>> querier │ 91 │ Apache Derby │ 10.13.1.1 - (1765088) │
> >>> jdbc:derby:derby-data/querier │ OK
> >>> querier │ 92 │ Apache Derby │ 10.13.1.1 - (1765088) │
> >>> jdbc:derby:derby-data/querier │ OK
> >>>
> >>> I will fix that.
> >>>
> >>> Regards
> >>> JB
> >>>
> >>> On 01/02/2019 19:01, Alex Soto wrote:
> > How to do you provision the datasource cfg file ?
> > Using a feature or by dropping the file in the etc folder ?
> 
> 
>  Dropping file in the etc/ directory
> 
>  Best regards,
>  Alex soto
> 
> 
> 
> 
> > On Feb 1, 2019, at 12:57 PM, Jean-Baptiste Onofré  > 
> > > wrote:
> >
> > Hi,
> >
> > I just did a blog where I'm using a derby datasource (on Karaf
> > 4.2.3-SNAPSHOT): http://blog.nanthrax.net/?p=874
> >
> > If you install an unique provider (only derby or derbyclient, but not
> > both), then, it should work.
> >
> > I did:
> >
> > feature:install pax-jdbc-derbyclient
> >
> > then:
> >
> > jdbc:ds-create -dn derbyclient -url
> jdbc:derby://localhost:1527/foo foo
> >
> > And I see only one datasource service:
> >
> > karaf@root()> jdbc:ds-list
> > Name  │ Service Id │ Product  │ Version   │ URL
> >  │ Status
> >
> ┼┼──┼───┼───┼───
> > foo │ 91 │ Apache Derby │ 10.14.2.0 - (1828579) │
> > jdbc:derby://localhost:1527/scheduler │ OK
> >
> > In your case, it seems that pax-jdbc-config is in cause, like it
> > bootstrap two db.  How to do you provision the datasource cfg file ?
> > Using a feature or by dropping the file in the etc folder ?
> >
> > I will check when my build is complete.
> >
> > Regards
> > JB
> >
> > On 01/02/2019 18:48, Alex Soto wrote:
> >> Hello,
> >>
> >> I am experiencing a problem where /pax-jdbc-config/ (version 1.3.0)
> is
> >> creating duplicate Derby Data Sources.  I copy the data source
> >> configuration file to  Karaf's /etc/ /directory, after a while I
> >> can see
> >> it created two identical Data Sources.
> >>
> >> The configuration file: /org.ops4j.datasource-querier.cfg/
> >>
> >>osgi.jdbc.driver.name = derby
> >>dataSourceName=querier
> >>url=jdbc:derby:derby-data/querier;create=true
> >>
> >>user=enquery
> >>password=
> >>databaseName=querier
> >>
> >>ops4j.preHook=querierDB
> >>
> >>
> >> It creates duplicate Data Sources:
> >>
> >>karaf@root()> service:list DataSource
>
> >>
>
> >>
>
> >>
> >>[javax.sql.DataSource]
> >>--
> >> databaseName = querier
> >> dataSourceName = querier
> >> felix.fileinstall.filename =
> >>

Re: OPS4J Pax JDBC + Derby = Duplicate DataSource

2019-02-01 Thread Jean-Baptiste Onofré
By the way, a simple workaround is to stop or even remove the
pax-jdbc-derby bundle, and use only the derby bundle (or the opposite).

Regards
JB

On 02/02/2019 06:55, Jean-Baptiste Onofré wrote:
> OK, I think I found the problem: installing the pax-jdbc-derby feature
> actually registers two DataSourceFactory services:
> 
> 1. a DataSourceFactory service coming from pax-jdbc-derby bundle (which
> is normal) (org.apache.derby.jdbc.EmbeddedDriver)
> 2. a DataSourceFactory service coming from directly Derby bundle
> (org.apache.derby.jdbc.AutoloadedDriver).
> 
> Both using the same derby value for osgi.jdbc.driver.name service property.
> 
> So pax-jdbc-config sees two factory and so it creates one datasource per
> factory.
> 
> That's why it's only when you use derby and actually, the two datasource
> services come from the two factories.
> 
> I'm fixing that.
> 
> Regards
> JB
> 
> On 01/02/2019 19:10, Alex Soto wrote:
>> Oh, thanks!
>>
>> Can you suggest a work around? 
>> What s the ETA for a fix? 
>> I have a release deadline looming and I am afraid I can't wait too long.  
>>
>> Thank you for the prompt response.
>>
>> Best regards,
>> Alex soto
>>
>>
>>
>>
>>> On Feb 1, 2019, at 1:05 PM, Jean-Baptiste Onofré >> > wrote:
>>>
>>> Indeed, I can reproduce the issue embedded:
>>>
>>> Name    │ Service Id │ Product  │ Version   │ URL
>>>    │ Status
>>> ┼┼──┼───┼───┼───
>>> querier │ 91 │ Apache Derby │ 10.13.1.1 - (1765088) │
>>> jdbc:derby:derby-data/querier │ OK
>>> querier │ 92 │ Apache Derby │ 10.13.1.1 - (1765088) │
>>> jdbc:derby:derby-data/querier │ OK
>>>
>>> I will fix that.
>>>
>>> Regards
>>> JB
>>>
>>> On 01/02/2019 19:01, Alex Soto wrote:
> How to do you provision the datasource cfg file ?
> Using a feature or by dropping the file in the etc folder ?


 Dropping file in the etc/ directory

 Best regards,
 Alex soto




> On Feb 1, 2019, at 12:57 PM, Jean-Baptiste Onofré  
> > wrote:
>
> Hi,
>
> I just did a blog where I'm using a derby datasource (on Karaf
> 4.2.3-SNAPSHOT): http://blog.nanthrax.net/?p=874
>
> If you install an unique provider (only derby or derbyclient, but not
> both), then, it should work.
>
> I did:
>
> feature:install pax-jdbc-derbyclient
>
> then:
>
> jdbc:ds-create -dn derbyclient -url jdbc:derby://localhost:1527/foo foo
>
> And I see only one datasource service:
>
> karaf@root()> jdbc:ds-list
> Name  │ Service Id │ Product  │ Version   │ URL
>  │ Status
> ┼┼──┼───┼───┼───
> foo │ 91 │ Apache Derby │ 10.14.2.0 - (1828579) │
> jdbc:derby://localhost:1527/scheduler │ OK
>
> In your case, it seems that pax-jdbc-config is in cause, like it
> bootstrap two db.  How to do you provision the datasource cfg file ?
> Using a feature or by dropping the file in the etc folder ?
>
> I will check when my build is complete.
>
> Regards
> JB
>
> On 01/02/2019 18:48, Alex Soto wrote:
>> Hello,
>>
>> I am experiencing a problem where /pax-jdbc-config/ (version 1.3.0) is
>> creating duplicate Derby Data Sources.  I copy the data source
>> configuration file to  Karaf's /etc/ /directory, after a while I
>> can see
>> it created two identical Data Sources.
>>
>> The configuration file: /org.ops4j.datasource-querier.cfg/
>>
>>    osgi.jdbc.driver.name = derby
>>    dataSourceName=querier
>>    url=jdbc:derby:derby-data/querier;create=true
>>
>>    user=enquery
>>    password=
>>    databaseName=querier
>>
>>    ops4j.preHook=querierDB
>>
>>
>> It creates duplicate Data Sources:
>>
>>    karaf@root()> service:list DataSource                              
>>                                                                   
>>                                                                   
>>               
>>    [javax.sql.DataSource]
>>    --
>> databaseName = querier
>> dataSourceName = querier
>> felix.fileinstall.filename =
>>    file:/Users/asoto/test/etc/org.ops4j.datasource-querier.cfg
>> ops4j.preHook = querierDB
>> osgi.jdbc.driver.name = derby
>> osgi.jndi.service.name = querier
>> password = enquery
>> pax.jdbc.managed = true
>> service.bundleid = 169
>> service.factoryPid = org.ops4j.datasource
>> service.id
>>   > 

Re: OPS4J Pax JDBC + Derby = Duplicate DataSource

2019-02-01 Thread Jean-Baptiste Onofré
OK, I think I found the problem: installing the pax-jdbc-derby feature
actually registers two DataSourceFactory services:

1. a DataSourceFactory service coming from pax-jdbc-derby bundle (which
is normal) (org.apache.derby.jdbc.EmbeddedDriver)
2. a DataSourceFactory service coming from directly Derby bundle
(org.apache.derby.jdbc.AutoloadedDriver).

Both using the same derby value for osgi.jdbc.driver.name service property.

So pax-jdbc-config sees two factory and so it creates one datasource per
factory.

That's why it's only when you use derby and actually, the two datasource
services come from the two factories.

I'm fixing that.

Regards
JB

On 01/02/2019 19:10, Alex Soto wrote:
> Oh, thanks!
> 
> Can you suggest a work around? 
> What s the ETA for a fix? 
> I have a release deadline looming and I am afraid I can't wait too long.  
> 
> Thank you for the prompt response.
> 
> Best regards,
> Alex soto
> 
> 
> 
> 
>> On Feb 1, 2019, at 1:05 PM, Jean-Baptiste Onofré > > wrote:
>>
>> Indeed, I can reproduce the issue embedded:
>>
>> Name    │ Service Id │ Product  │ Version   │ URL
>>    │ Status
>> ┼┼──┼───┼───┼───
>> querier │ 91 │ Apache Derby │ 10.13.1.1 - (1765088) │
>> jdbc:derby:derby-data/querier │ OK
>> querier │ 92 │ Apache Derby │ 10.13.1.1 - (1765088) │
>> jdbc:derby:derby-data/querier │ OK
>>
>> I will fix that.
>>
>> Regards
>> JB
>>
>> On 01/02/2019 19:01, Alex Soto wrote:
 How to do you provision the datasource cfg file ?
 Using a feature or by dropping the file in the etc folder ?
>>>
>>>
>>> Dropping file in the etc/ directory
>>>
>>> Best regards,
>>> Alex soto
>>>
>>>
>>>
>>>
 On Feb 1, 2019, at 12:57 PM, Jean-Baptiste Onofré >>> 
 > wrote:

 Hi,

 I just did a blog where I'm using a derby datasource (on Karaf
 4.2.3-SNAPSHOT): http://blog.nanthrax.net/?p=874

 If you install an unique provider (only derby or derbyclient, but not
 both), then, it should work.

 I did:

 feature:install pax-jdbc-derbyclient

 then:

 jdbc:ds-create -dn derbyclient -url jdbc:derby://localhost:1527/foo foo

 And I see only one datasource service:

 karaf@root()> jdbc:ds-list
 Name  │ Service Id │ Product  │ Version   │ URL
  │ Status
 ┼┼──┼───┼───┼───
 foo │ 91 │ Apache Derby │ 10.14.2.0 - (1828579) │
 jdbc:derby://localhost:1527/scheduler │ OK

 In your case, it seems that pax-jdbc-config is in cause, like it
 bootstrap two db.  How to do you provision the datasource cfg file ?
 Using a feature or by dropping the file in the etc folder ?

 I will check when my build is complete.

 Regards
 JB

 On 01/02/2019 18:48, Alex Soto wrote:
> Hello,
>
> I am experiencing a problem where /pax-jdbc-config/ (version 1.3.0) is
> creating duplicate Derby Data Sources.  I copy the data source
> configuration file to  Karaf's /etc/ /directory, after a while I
> can see
> it created two identical Data Sources.
>
> The configuration file: /org.ops4j.datasource-querier.cfg/
>
>    osgi.jdbc.driver.name = derby
>    dataSourceName=querier
>    url=jdbc:derby:derby-data/querier;create=true
>
>    user=enquery
>    password=
>    databaseName=querier
>
>    ops4j.preHook=querierDB
>
>
> It creates duplicate Data Sources:
>
>    karaf@root()> service:list DataSource                              
>                                                                   
>                                                                   
>               
>    [javax.sql.DataSource]
>    --
> databaseName = querier
> dataSourceName = querier
> felix.fileinstall.filename =
>    file:/Users/asoto/test/etc/org.ops4j.datasource-querier.cfg
> ops4j.preHook = querierDB
> osgi.jdbc.driver.name = derby
> osgi.jndi.service.name = querier
> password = enquery
> pax.jdbc.managed = true
> service.bundleid = 169
> service.factoryPid = org.ops4j.datasource
> service.id
>    
> > = 238
> service.pid =
> org.ops4j.datasource.b161e768-e5f8-40bb-b19f-40cab9111316
> service.scope = singleton
> url = jdbc:derby:derby-data/querier;create=true
> user = enquery
>    Provided by : 
> OPS4J Pax JDBC Config (169)
>    Used by: 
> JPA (22)
>  

Re: OPS4J Pax JDBC + Derby = Duplicate DataSource

2019-02-01 Thread Jean-Baptiste Onofré
It would certainly require a new pax-jdbc release.

Anyway, it's not a blocker IMHO (having two service is not a big deal).

I hope to fix that today in order to include in Karaf 4.2.3 release.

Regards
JB

On 01/02/2019 19:10, Alex Soto wrote:
> Oh, thanks!
> 
> Can you suggest a work around? 
> What s the ETA for a fix? 
> I have a release deadline looming and I am afraid I can't wait too long.  
> 
> Thank you for the prompt response.
> 
> Best regards,
> Alex soto
> 
> 
> 
> 
>> On Feb 1, 2019, at 1:05 PM, Jean-Baptiste Onofré > > wrote:
>>
>> Indeed, I can reproduce the issue embedded:
>>
>> Name    │ Service Id │ Product  │ Version   │ URL
>>    │ Status
>> ┼┼──┼───┼───┼───
>> querier │ 91 │ Apache Derby │ 10.13.1.1 - (1765088) │
>> jdbc:derby:derby-data/querier │ OK
>> querier │ 92 │ Apache Derby │ 10.13.1.1 - (1765088) │
>> jdbc:derby:derby-data/querier │ OK
>>
>> I will fix that.
>>
>> Regards
>> JB
>>
>> On 01/02/2019 19:01, Alex Soto wrote:
 How to do you provision the datasource cfg file ?
 Using a feature or by dropping the file in the etc folder ?
>>>
>>>
>>> Dropping file in the etc/ directory
>>>
>>> Best regards,
>>> Alex soto
>>>
>>>
>>>
>>>
 On Feb 1, 2019, at 12:57 PM, Jean-Baptiste Onofré >>> 
 > wrote:

 Hi,

 I just did a blog where I'm using a derby datasource (on Karaf
 4.2.3-SNAPSHOT): http://blog.nanthrax.net/?p=874

 If you install an unique provider (only derby or derbyclient, but not
 both), then, it should work.

 I did:

 feature:install pax-jdbc-derbyclient

 then:

 jdbc:ds-create -dn derbyclient -url jdbc:derby://localhost:1527/foo foo

 And I see only one datasource service:

 karaf@root()> jdbc:ds-list
 Name  │ Service Id │ Product  │ Version   │ URL
  │ Status
 ┼┼──┼───┼───┼───
 foo │ 91 │ Apache Derby │ 10.14.2.0 - (1828579) │
 jdbc:derby://localhost:1527/scheduler │ OK

 In your case, it seems that pax-jdbc-config is in cause, like it
 bootstrap two db.  How to do you provision the datasource cfg file ?
 Using a feature or by dropping the file in the etc folder ?

 I will check when my build is complete.

 Regards
 JB

 On 01/02/2019 18:48, Alex Soto wrote:
> Hello,
>
> I am experiencing a problem where /pax-jdbc-config/ (version 1.3.0) is
> creating duplicate Derby Data Sources.  I copy the data source
> configuration file to  Karaf's /etc/ /directory, after a while I
> can see
> it created two identical Data Sources.
>
> The configuration file: /org.ops4j.datasource-querier.cfg/
>
>    osgi.jdbc.driver.name = derby
>    dataSourceName=querier
>    url=jdbc:derby:derby-data/querier;create=true
>
>    user=enquery
>    password=
>    databaseName=querier
>
>    ops4j.preHook=querierDB
>
>
> It creates duplicate Data Sources:
>
>    karaf@root()> service:list DataSource                              
>                                                                   
>                                                                   
>               
>    [javax.sql.DataSource]
>    --
> databaseName = querier
> dataSourceName = querier
> felix.fileinstall.filename =
>    file:/Users/asoto/test/etc/org.ops4j.datasource-querier.cfg
> ops4j.preHook = querierDB
> osgi.jdbc.driver.name = derby
> osgi.jndi.service.name = querier
> password = enquery
> pax.jdbc.managed = true
> service.bundleid = 169
> service.factoryPid = org.ops4j.datasource
> service.id
>    
> > = 238
> service.pid =
> org.ops4j.datasource.b161e768-e5f8-40bb-b19f-40cab9111316
> service.scope = singleton
> url = jdbc:derby:derby-data/querier;create=true
> user = enquery
>    Provided by : 
> OPS4J Pax JDBC Config (169)
>    Used by: 
> JPA (22)
>    [javax.sql.DataSource]
>    --
> databaseName = querier
> dataSourceName = querier
> felix.fileinstall.filename
>    = file:/Users/asoto/test/etc/org.ops4j.datasource-querier.cfg
> ops4j.preHook = querierDB
> osgi.jdbc.driver.name = derby
> osgi.jndi.service.name = querier
> password = enquery
> pax.jdbc.managed = true
> service.bundleid = 169

Re: OPS4J Pax JDBC + Derby = Duplicate DataSource

2019-02-01 Thread Alex Soto
Oh, thanks!

Can you suggest a work around? 
What s the ETA for a fix? 
I have a release deadline looming and I am afraid I can't wait too long.  

Thank you for the prompt response.

Best regards,
Alex soto




> On Feb 1, 2019, at 1:05 PM, Jean-Baptiste Onofré  wrote:
> 
> Indeed, I can reproduce the issue embedded:
> 
> Name│ Service Id │ Product  │ Version   │ URL
>│ Status
> ┼┼──┼───┼───┼───
> querier │ 91 │ Apache Derby │ 10.13.1.1 - (1765088) │
> jdbc:derby:derby-data/querier │ OK
> querier │ 92 │ Apache Derby │ 10.13.1.1 - (1765088) │
> jdbc:derby:derby-data/querier │ OK
> 
> I will fix that.
> 
> Regards
> JB
> 
> On 01/02/2019 19:01, Alex Soto wrote:
>>> How to do you provision the datasource cfg file ?
>>> Using a feature or by dropping the file in the etc folder ?
>> 
>> 
>> Dropping file in the etc/ directory
>> 
>> Best regards,
>> Alex soto
>> 
>> 
>> 
>> 
>>> On Feb 1, 2019, at 12:57 PM, Jean-Baptiste Onofré >> >> wrote:
>>> 
>>> Hi,
>>> 
>>> I just did a blog where I'm using a derby datasource (on Karaf
>>> 4.2.3-SNAPSHOT): http://blog.nanthrax.net/?p=874 
>>> 
>>> 
>>> If you install an unique provider (only derby or derbyclient, but not
>>> both), then, it should work.
>>> 
>>> I did:
>>> 
>>> feature:install pax-jdbc-derbyclient
>>> 
>>> then:
>>> 
>>> jdbc:ds-create -dn derbyclient -url jdbc:derby://localhost:1527/foo 
>>>  foo
>>> 
>>> And I see only one datasource service:
>>> 
>>> karaf@root()> jdbc:ds-list
>>> Name  │ Service Id │ Product  │ Version   │ URL
>>>  │ Status
>>> ┼┼──┼───┼───┼───
>>> foo │ 91 │ Apache Derby │ 10.14.2.0 - (1828579) │
>>> jdbc:derby://localhost:1527/scheduler  │ 
>>> OK
>>> 
>>> In your case, it seems that pax-jdbc-config is in cause, like it
>>> bootstrap two db.  How to do you provision the datasource cfg file ?
>>> Using a feature or by dropping the file in the etc folder ?
>>> 
>>> I will check when my build is complete.
>>> 
>>> Regards
>>> JB
>>> 
>>> On 01/02/2019 18:48, Alex Soto wrote:
 Hello,
 
 I am experiencing a problem where /pax-jdbc-config/ (version 1.3.0) is
 creating duplicate Derby Data Sources.  I copy the data source
 configuration file to  Karaf's /etc/ /directory, after a while I can see
 it created two identical Data Sources.
 
 The configuration file: /org.ops4j.datasource-querier.cfg/
 
osgi.jdbc.driver.name = derby
dataSourceName=querier
url=jdbc:derby:derby-data/querier;create=true
 
user=enquery
password=
databaseName=querier
 
ops4j.preHook=querierDB
 
 
 It creates duplicate Data Sources:
 
karaf@root()> service:list DataSource  
   
   
   
[javax.sql.DataSource]
--
 databaseName = querier
 dataSourceName = querier
 felix.fileinstall.filename =
file:/Users/asoto/test/etc/org.ops4j.datasource-querier.cfg
 ops4j.preHook = querierDB
 osgi.jdbc.driver.name = derby
 osgi.jndi.service.name = querier
 password = enquery
 pax.jdbc.managed = true
 service.bundleid = 169
 service.factoryPid = org.ops4j.datasource
 service.id  > 
 >> = 238
 service.pid =
 org.ops4j.datasource.b161e768-e5f8-40bb-b19f-40cab9111316
 service.scope = singleton
 url = jdbc:derby:derby-data/querier;create=true
 user = enquery
Provided by : 
 OPS4J Pax JDBC Config (169)
Used by: 
 JPA (22)
[javax.sql.DataSource]
--
 databaseName = querier
 dataSourceName = querier
 felix.fileinstall.filename
= file:/Users/asoto/test/etc/org.ops4j.datasource-querier.cfg
 ops4j.preHook = querierDB
 osgi.jdbc.driver.name = derby
 osgi.jndi.service.name = querier
 password = enquery
 pax.jdbc.managed = true
 service.bundleid = 169
 service.factoryPid = org.ops4j.datasource
 service.id  > 
 > = 282
 service.pid =
 org.ops4j.datasource.b161e768-e5f8-40bb-b19f-40cab9111316
 service.scope 

Re: OPS4J Pax JDBC + Derby = Duplicate DataSource

2019-02-01 Thread Jean-Baptiste Onofré
Indeed, I can reproduce the issue embedded:

Name│ Service Id │ Product  │ Version   │ URL
│ Status
┼┼──┼───┼───┼───
querier │ 91 │ Apache Derby │ 10.13.1.1 - (1765088) │
jdbc:derby:derby-data/querier │ OK
querier │ 92 │ Apache Derby │ 10.13.1.1 - (1765088) │
jdbc:derby:derby-data/querier │ OK

I will fix that.

Regards
JB

On 01/02/2019 19:01, Alex Soto wrote:
>> How to do you provision the datasource cfg file ?
>> Using a feature or by dropping the file in the etc folder ?
> 
> 
> Dropping file in the etc/ directory
> 
> Best regards,
> Alex soto
> 
> 
> 
> 
>> On Feb 1, 2019, at 12:57 PM, Jean-Baptiste Onofré > > wrote:
>>
>> Hi,
>>
>> I just did a blog where I'm using a derby datasource (on Karaf
>> 4.2.3-SNAPSHOT): http://blog.nanthrax.net/?p=874
>>
>> If you install an unique provider (only derby or derbyclient, but not
>> both), then, it should work.
>>
>> I did:
>>
>> feature:install pax-jdbc-derbyclient
>>
>> then:
>>
>> jdbc:ds-create -dn derbyclient -url jdbc:derby://localhost:1527/foo foo
>>
>> And I see only one datasource service:
>>
>> karaf@root()> jdbc:ds-list
>> Name  │ Service Id │ Product  │ Version   │ URL
>>  │ Status
>> ┼┼──┼───┼───┼───
>> foo │ 91 │ Apache Derby │ 10.14.2.0 - (1828579) │
>> jdbc:derby://localhost:1527/scheduler │ OK
>>
>> In your case, it seems that pax-jdbc-config is in cause, like it
>> bootstrap two db.  How to do you provision the datasource cfg file ?
>> Using a feature or by dropping the file in the etc folder ?
>>
>> I will check when my build is complete.
>>
>> Regards
>> JB
>>
>> On 01/02/2019 18:48, Alex Soto wrote:
>>> Hello,
>>>
>>> I am experiencing a problem where /pax-jdbc-config/ (version 1.3.0) is
>>> creating duplicate Derby Data Sources.  I copy the data source
>>> configuration file to  Karaf's /etc/ /directory, after a while I can see
>>> it created two identical Data Sources.
>>>
>>> The configuration file: /org.ops4j.datasource-querier.cfg/
>>>
>>>    osgi.jdbc.driver.name = derby
>>>    dataSourceName=querier
>>>    url=jdbc:derby:derby-data/querier;create=true
>>>
>>>    user=enquery
>>>    password=
>>>    databaseName=querier
>>>
>>>    ops4j.preHook=querierDB
>>>
>>>
>>> It creates duplicate Data Sources:
>>>
>>>    karaf@root()> service:list DataSource                              
>>>                                                                   
>>>                                                                   
>>>               
>>>    [javax.sql.DataSource]
>>>    --
>>> databaseName = querier
>>> dataSourceName = querier
>>> felix.fileinstall.filename =
>>>    file:/Users/asoto/test/etc/org.ops4j.datasource-querier.cfg
>>> ops4j.preHook = querierDB
>>> osgi.jdbc.driver.name = derby
>>> osgi.jndi.service.name = querier
>>> password = enquery
>>> pax.jdbc.managed = true
>>> service.bundleid = 169
>>> service.factoryPid = org.ops4j.datasource
>>> service.id  >> > = 238
>>> service.pid =
>>> org.ops4j.datasource.b161e768-e5f8-40bb-b19f-40cab9111316
>>> service.scope = singleton
>>> url = jdbc:derby:derby-data/querier;create=true
>>> user = enquery
>>>    Provided by : 
>>> OPS4J Pax JDBC Config (169)
>>>    Used by: 
>>> JPA (22)
>>>    [javax.sql.DataSource]
>>>    --
>>> databaseName = querier
>>> dataSourceName = querier
>>> felix.fileinstall.filename
>>>    = file:/Users/asoto/test/etc/org.ops4j.datasource-querier.cfg
>>> ops4j.preHook = querierDB
>>> osgi.jdbc.driver.name = derby
>>> osgi.jndi.service.name = querier
>>> password = enquery
>>> pax.jdbc.managed = true
>>> service.bundleid = 169
>>> service.factoryPid = org.ops4j.datasource
>>> service.id  >> > = 282
>>> service.pid =
>>> org.ops4j.datasource.b161e768-e5f8-40bb-b19f-40cab9111316
>>> service.scope = singleton
>>> url = jdbc:derby:derby-data/querier;create=true
>>> user = enquery
>>>    Provided by : 
>>> OPS4J Pax JDBC Config (169)
>>>
>>>
>>> Also:
>>>
>>>    karaf@root()> jdbc:ds-list
>>>    Name    │ Product      │ Version               │ URL                
>>>          │ Status
>>>    
>>> ┼──┼───┼───┼───
>>>    querier │ Apache Derby │ 10.13.1.1 - (1765088) │
>>>    jdbc:derby:derby-data/querier │ OK
>>>    querier │ Apache Derby │ 10.13.1.1 - (1765088) │
>>>    jdbc:derby:derby-data/querier │ OK
>>>
>>>
>>>
>>> I think it must be specific to Derby, as the same works fine 

Re: OPS4J Pax JDBC + Derby = Duplicate DataSource

2019-02-01 Thread Alex Soto
> How to do you provision the datasource cfg file ?
> Using a feature or by dropping the file in the etc folder ?


Dropping file in the etc/ directory

Best regards,
Alex soto




> On Feb 1, 2019, at 12:57 PM, Jean-Baptiste Onofré  wrote:
> 
> Hi,
> 
> I just did a blog where I'm using a derby datasource (on Karaf
> 4.2.3-SNAPSHOT): http://blog.nanthrax.net/?p=874 
> 
> 
> If you install an unique provider (only derby or derbyclient, but not
> both), then, it should work.
> 
> I did:
> 
> feature:install pax-jdbc-derbyclient
> 
> then:
> 
> jdbc:ds-create -dn derbyclient -url jdbc:derby://localhost:1527/foo 
>  foo
> 
> And I see only one datasource service:
> 
> karaf@root()> jdbc:ds-list
> Name  │ Service Id │ Product  │ Version   │ URL
>  │ Status
> ┼┼──┼───┼───┼───
> foo │ 91 │ Apache Derby │ 10.14.2.0 - (1828579) │
> jdbc:derby://localhost:1527/scheduler  │ OK
> 
> In your case, it seems that pax-jdbc-config is in cause, like it
> bootstrap two db.  How to do you provision the datasource cfg file ?
> Using a feature or by dropping the file in the etc folder ?
> 
> I will check when my build is complete.
> 
> Regards
> JB
> 
> On 01/02/2019 18:48, Alex Soto wrote:
>> Hello,
>> 
>> I am experiencing a problem where /pax-jdbc-config/ (version 1.3.0) is
>> creating duplicate Derby Data Sources.  I copy the data source
>> configuration file to  Karaf's /etc/ /directory, after a while I can see
>> it created two identical Data Sources.
>> 
>> The configuration file: /org.ops4j.datasource-querier.cfg/
>> 
>>osgi.jdbc.driver.name = derby
>>dataSourceName=querier
>>url=jdbc:derby:derby-data/querier;create=true
>> 
>>user=enquery
>>password=
>>databaseName=querier
>> 
>>ops4j.preHook=querierDB
>> 
>> 
>> It creates duplicate Data Sources:
>> 
>>karaf@root()> service:list DataSource  
>>   
>>   
>>   
>>[javax.sql.DataSource]
>>--
>> databaseName = querier
>> dataSourceName = querier
>> felix.fileinstall.filename =
>>file:/Users/asoto/test/etc/org.ops4j.datasource-querier.cfg
>> ops4j.preHook = querierDB
>> osgi.jdbc.driver.name = derby
>> osgi.jndi.service.name = querier
>> password = enquery
>> pax.jdbc.managed = true
>> service.bundleid = 169
>> service.factoryPid = org.ops4j.datasource
>> service.id  > 
>> = 238
>> service.pid = org.ops4j.datasource.b161e768-e5f8-40bb-b19f-40cab9111316
>> service.scope = singleton
>> url = jdbc:derby:derby-data/querier;create=true
>> user = enquery
>>Provided by : 
>> OPS4J Pax JDBC Config (169)
>>Used by: 
>> JPA (22)
>>[javax.sql.DataSource]
>>--
>> databaseName = querier
>> dataSourceName = querier
>> felix.fileinstall.filename
>>= file:/Users/asoto/test/etc/org.ops4j.datasource-querier.cfg
>> ops4j.preHook = querierDB
>> osgi.jdbc.driver.name = derby
>> osgi.jndi.service.name = querier
>> password = enquery
>> pax.jdbc.managed = true
>> service.bundleid = 169
>> service.factoryPid = org.ops4j.datasource
>> service.id  > 
>> = 282
>> service.pid = org.ops4j.datasource.b161e768-e5f8-40bb-b19f-40cab9111316
>> service.scope = singleton
>> url = jdbc:derby:derby-data/querier;create=true
>> user = enquery
>>Provided by : 
>> OPS4J Pax JDBC Config (169)
>> 
>> 
>> Also:
>> 
>>karaf@root()> jdbc:ds-list
>>Name│ Product  │ Version   │ URL
>>  │ Status
>>
>> ┼──┼───┼───┼───
>>querier │ Apache Derby │ 10.13.1.1 - (1765088) │
>>jdbc:derby:derby-data/querier │ OK
>>querier │ Apache Derby │ 10.13.1.1 - (1765088) │
>>jdbc:derby:derby-data/querier │ OK
>> 
>> 
>> 
>> I think it must be specific to Derby, as the same works fine if the
>> driver is MariaDB.
>> Any clues?
>> 
>> Best regards,
>> Alex soto
>> 
>> 
>> 
>> 
> 
> -- 
> Jean-Baptiste Onofré
> jbono...@apache.org 
> http://blog.nanthrax.net 
> Talend - http://www.talend.com 


Re: OPS4J Pax JDBC + Derby = Duplicate DataSource

2019-02-01 Thread Jean-Baptiste Onofré
Hi,

I just did a blog where I'm using a derby datasource (on Karaf
4.2.3-SNAPSHOT): http://blog.nanthrax.net/?p=874

If you install an unique provider (only derby or derbyclient, but not
both), then, it should work.

I did:

feature:install pax-jdbc-derbyclient

then:

jdbc:ds-create -dn derbyclient -url jdbc:derby://localhost:1527/foo foo

And I see only one datasource service:

karaf@root()> jdbc:ds-list
Name  │ Service Id │ Product  │ Version   │ URL
  │ Status
┼┼──┼───┼───┼───
foo │ 91 │ Apache Derby │ 10.14.2.0 - (1828579) │
jdbc:derby://localhost:1527/scheduler │ OK

In your case, it seems that pax-jdbc-config is in cause, like it
bootstrap two db.  How to do you provision the datasource cfg file ?
Using a feature or by dropping the file in the etc folder ?

I will check when my build is complete.

Regards
JB

On 01/02/2019 18:48, Alex Soto wrote:
> Hello,
> 
> I am experiencing a problem where /pax-jdbc-config/ (version 1.3.0) is
> creating duplicate Derby Data Sources.  I copy the data source
> configuration file to  Karaf's /etc/ /directory, after a while I can see
> it created two identical Data Sources.
> 
> The configuration file: /org.ops4j.datasource-querier.cfg/
> 
> osgi.jdbc.driver.name = derby
> dataSourceName=querier
> url=jdbc:derby:derby-data/querier;create=true
> 
> user=enquery
> password=
> databaseName=querier
> 
> ops4j.preHook=querierDB
> 
> 
> It creates duplicate Data Sources:
> 
> karaf@root()> service:list DataSource                              
>                                                                    
>                                                                    
>                
> [javax.sql.DataSource]
> --
>  databaseName = querier
>  dataSourceName = querier
>  felix.fileinstall.filename =
> file:/Users/asoto/test/etc/org.ops4j.datasource-querier.cfg
>  ops4j.preHook = querierDB
>  osgi.jdbc.driver.name = derby
>  osgi.jndi.service.name = querier
>  password = enquery
>  pax.jdbc.managed = true
>  service.bundleid = 169
>  service.factoryPid = org.ops4j.datasource
>  service.id  = 238
>  service.pid = org.ops4j.datasource.b161e768-e5f8-40bb-b19f-40cab9111316
>  service.scope = singleton
>  url = jdbc:derby:derby-data/querier;create=true
>  user = enquery
> Provided by : 
>  OPS4J Pax JDBC Config (169)
> Used by: 
>  JPA (22)
> [javax.sql.DataSource]
> --
>  databaseName = querier
>  dataSourceName = querier
>  felix.fileinstall.filename
> = file:/Users/asoto/test/etc/org.ops4j.datasource-querier.cfg
>  ops4j.preHook = querierDB
>  osgi.jdbc.driver.name = derby
>  osgi.jndi.service.name = querier
>  password = enquery
>  pax.jdbc.managed = true
>  service.bundleid = 169
>  service.factoryPid = org.ops4j.datasource
>  service.id  = 282
>  service.pid = org.ops4j.datasource.b161e768-e5f8-40bb-b19f-40cab9111316
>  service.scope = singleton
>  url = jdbc:derby:derby-data/querier;create=true
>  user = enquery
> Provided by : 
>  OPS4J Pax JDBC Config (169)
> 
> 
> Also:
> 
> karaf@root()> jdbc:ds-list
> Name    │ Product      │ Version               │ URL                
>           │ Status
> 
> ┼──┼───┼───┼───
> querier │ Apache Derby │ 10.13.1.1 - (1765088) │
> jdbc:derby:derby-data/querier │ OK
> querier │ Apache Derby │ 10.13.1.1 - (1765088) │
> jdbc:derby:derby-data/querier │ OK
> 
> 
> 
> I think it must be specific to Derby, as the same works fine if the
> driver is MariaDB.
> Any clues?
> 
> Best regards,
> Alex soto
> 
> 
> 
> 

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


OPS4J Pax JDBC + Derby = Duplicate DataSource

2019-02-01 Thread Alex Soto
Hello,

I am experiencing a problem where pax-jdbc-config (version 1.3.0) is creating 
duplicate Derby Data Sources.  I copy the data source configuration file to  
Karaf's etc/ directory, after a while I can see it created two identical Data 
Sources.

The configuration file: org.ops4j.datasource-querier.cfg

osgi.jdbc.driver.name = derby
dataSourceName=querier
url=jdbc:derby:derby-data/querier;create=true

user=enquery
password=
databaseName=querier

ops4j.preHook=querierDB

It creates duplicate Data Sources:

karaf@root()> service:list DataSource   

   
[javax.sql.DataSource]
--
 databaseName = querier
 dataSourceName = querier
 felix.fileinstall.filename = 
file:/Users/asoto/test/etc/org.ops4j.datasource-querier.cfg
 ops4j.preHook = querierDB
 osgi.jdbc.driver.name = derby
 osgi.jndi.service.name = querier
 password = enquery
 pax.jdbc.managed = true
 service.bundleid = 169
 service.factoryPid = org.ops4j.datasource
 service.id = 238
 service.pid = org.ops4j.datasource.b161e768-e5f8-40bb-b19f-40cab9111316
 service.scope = singleton
 url = jdbc:derby:derby-data/querier;create=true
 user = enquery
Provided by : 
 OPS4J Pax JDBC Config (169)
Used by: 
 JPA (22)
[javax.sql.DataSource]
--
 databaseName = querier
 dataSourceName = querier
 felix.fileinstall.filename = 
file:/Users/asoto/test/etc/org.ops4j.datasource-querier.cfg
 ops4j.preHook = querierDB
 osgi.jdbc.driver.name = derby
 osgi.jndi.service.name = querier
 password = enquery
 pax.jdbc.managed = true
 service.bundleid = 169
 service.factoryPid = org.ops4j.datasource
 service.id = 282
 service.pid = org.ops4j.datasource.b161e768-e5f8-40bb-b19f-40cab9111316
 service.scope = singleton
 url = jdbc:derby:derby-data/querier;create=true
 user = enquery
Provided by : 
 OPS4J Pax JDBC Config (169)

Also:

karaf@root()> jdbc:ds-list
Name│ Product  │ Version   │ URL   
│ Status
┼──┼───┼───┼───
querier │ Apache Derby │ 10.13.1.1 - (1765088) │ jdbc:derby:derby-data/querier 
│ OK
querier │ Apache Derby │ 10.13.1.1 - (1765088) │ jdbc:derby:derby-data/querier 
│ OK


I think it must be specific to Derby, as the same works fine if the driver is 
MariaDB.
Any clues?

Best regards,
Alex soto






Re: Ignite won't start in Karaf after restart

2019-02-01 Thread Jean-Baptiste Onofré
Thanks for the update. I'm busy with Karaf 4.2.3 preparation right now,
I will take a look tomorrow.

Regards
JB

On 01/02/2019 17:26, Oleksii Mohylin wrote:
> Hi, 
> 
> I tried this  setup with Karaf 4.2.2 as well and had the same error.
> Looking forward to hearing from you.
> 
> Best regards,
> Oleksii
> 
> -Original Message-
> From: Jean-Baptiste Onofré  
> Sent: Tuesday, January 29, 2019 6:50 PM
> To: user@karaf.apache.org
> Subject: Re: Ignite won't start in Karaf after restart
> 
> Hi,
> 
> I will try and fix eventually. AFAIR, we did a fix about the fragment
> recently (in Karaf 4.2.2).
> Let me take a look.
> 
> Regards
> JB
> 
> On 29/01/2019 15:52, Oleksii Mohylin wrote:
>> Hello
>>
>>  
>>
>> I’m trying to use Ignite 2.7 in Karaf 4.2.0. It works fine at initial 
>> installation, but after Karaf restart Ignite just doesn’t start and I 
>> see this error in log:
>>
>>  
>>
>> org.osgi.framework.BundleException: Unable to resolve ki-test-core 
>> [70](R 70.0): missing requirement [ki-test-core [70](R 70.0)] 
>> osgi.wiring.package;
>> (&(osgi.wiring.package=org.apache.ignite.osgi.classloaders)(version>=2
>> .7.0)(!(version>=3.0.0))) [caused by: Unable to resolve 
>> org.apache.ignite.ignite-osgi [86](R
>> 86.0): missing requirement [org.apache.ignite.ignite-osgi [86](R 
>> 86.0)] osgi.wiring.host; 
>> (&(osgi.wiring.host=org.apache.ignite.ignite-core)(bundle-version>=0.0
>> .0))] Unresolved requirements: [[ki-test-core [70](R 70.0)] 
>> osgi.wiring.package; 
>> (&(osgi.wiring.package=org.apache.ignite.osgi.classloaders)(version>=2
>> .7.0)(!(version>=3.0.0)))]
>>
>>  
>>
>> It looks like fragment ignite-osgi cannot find it’s host ignite-core. 
>> In reality bundle ignite-core is present and Active.
>>
>> Here is my dummy project I created to show more details about the issue:
>> https://github.com/leshkm/karaf-ignite-test
>>
>>  
>>
>> Anyone has successful experience in using recent versions (2.4+) of 
>> Ignite in Karaf?
>>
>>  
>>
>> Any ideas why ignite-osgi fragment can fail to attach to it’s host 
>> after Karaf restart?
>>
>>  
>>
>> Thanks
>>
>> Oleksii
>>
> 
> --
> 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: Deploy karaf 4.2.2 to multiple envs with different configurations

2019-02-01 Thread Jean-Baptiste Onofré
It would be the same, you will be able to apply a profile setting the
properties, but you would have to restart anyway.

As the system.properties is equivalent of doing java -Dfoo=bar, you have
to restart the JVM (that's not Karaf specific, it's the way it works in
Java).
If your application uses env or ConfigAdmin, that would be different.

Regards
JB

On 01/02/2019 17:34, Cantbebotheredtothinkofauserna wrote:
> Yes these properties need to be in system.properties since one of our core
> applications gets them via System.getProperty("..."). 
> 
> Is this something that can be achieved using profiles? 
> 
> 
> 
> --
> Sent from: http://karaf.922171.n3.nabble.com/Karaf-User-f930749.html
> 

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


RE: Ignite won't start in Karaf after restart

2019-02-01 Thread Oleksii Mohylin
Hi, 

I tried this  setup with Karaf 4.2.2 as well and had the same error.
Looking forward to hearing from you.

Best regards,
Oleksii

-Original Message-
From: Jean-Baptiste Onofré  
Sent: Tuesday, January 29, 2019 6:50 PM
To: user@karaf.apache.org
Subject: Re: Ignite won't start in Karaf after restart

Hi,

I will try and fix eventually. AFAIR, we did a fix about the fragment
recently (in Karaf 4.2.2).
Let me take a look.

Regards
JB

On 29/01/2019 15:52, Oleksii Mohylin wrote:
> Hello
> 
>  
> 
> I’m trying to use Ignite 2.7 in Karaf 4.2.0. It works fine at initial 
> installation, but after Karaf restart Ignite just doesn’t start and I 
> see this error in log:
> 
>  
> 
> org.osgi.framework.BundleException: Unable to resolve ki-test-core 
> [70](R 70.0): missing requirement [ki-test-core [70](R 70.0)] 
> osgi.wiring.package;
> (&(osgi.wiring.package=org.apache.ignite.osgi.classloaders)(version>=2
> .7.0)(!(version>=3.0.0))) [caused by: Unable to resolve 
> org.apache.ignite.ignite-osgi [86](R
> 86.0): missing requirement [org.apache.ignite.ignite-osgi [86](R 
> 86.0)] osgi.wiring.host; 
> (&(osgi.wiring.host=org.apache.ignite.ignite-core)(bundle-version>=0.0
> .0))] Unresolved requirements: [[ki-test-core [70](R 70.0)] 
> osgi.wiring.package; 
> (&(osgi.wiring.package=org.apache.ignite.osgi.classloaders)(version>=2
> .7.0)(!(version>=3.0.0)))]
> 
>  
> 
> It looks like fragment ignite-osgi cannot find it’s host ignite-core. 
> In reality bundle ignite-core is present and Active.
> 
> Here is my dummy project I created to show more details about the issue:
> https://github.com/leshkm/karaf-ignite-test
> 
>  
> 
> Anyone has successful experience in using recent versions (2.4+) of 
> Ignite in Karaf?
> 
>  
> 
> Any ideas why ignite-osgi fragment can fail to attach to it’s host 
> after Karaf restart?
> 
>  
> 
> Thanks
> 
> Oleksii
> 

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



Re: Deploy karaf 4.2.2 to multiple envs with different configurations

2019-02-01 Thread Jean-Baptiste Onofré
That's normal: the system.properties are loaded by Karaf Main, before
any other service (including ConfigAdmin).

Do you really need system properties there ?

Regards
JB

On 01/02/2019 17:11, Cantbebotheredtothinkofauserna wrote:
> I'm trying to add system properties via
> 
> 
>override="true">file:${env.config.path}/custom.system.properties
> 
> 
>  This file gets updated but I have to restart karat for the properties to
> actually get picked up. I have this as a startup feature - I guess even at
> this stage it's too late for the properties to get registered?
> 
> 
> 
> --
> Sent from: http://karaf.922171.n3.nabble.com/Karaf-User-f930749.html
> 

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


Re: Deploy karaf 4.2.2 to multiple envs with different configurations

2019-02-01 Thread Cantbebotheredtothinkofauserna
I'm trying to add system properties via


  file:${env.config.path}/custom.system.properties


 This file gets updated but I have to restart karat for the properties to
actually get picked up. I have this as a startup feature - I guess even at
this stage it's too late for the properties to get registered?



--
Sent from: http://karaf.922171.n3.nabble.com/Karaf-User-f930749.html


Re: Deploy karaf 4.2.2 to multiple envs with different configurations

2019-02-01 Thread Jean-Baptiste Onofré
feature works with any file and provisioning.

For instance, you can do:


  mvn:groupId/artifactId/1.0-SNAPSHOT/uat/cfg
  mvn:groupId/artifactId-foo/1.0-SNAPSHOT/uat/xml



  mvn:groupId/artifactId/1.0-SNAPSHOT/qa/cfg
  mvn:groupId/artifactId-foo/1.0-SNAPSHOT/qa/xml


Regards
JB

On 01/02/2019 16:10, Cantbebotheredtothinkofauserna wrote:
> Hi, does the feature approach only work for cfg files? What about .properties
> files?
> 
> 
> 
> --
> Sent from: http://karaf.922171.n3.nabble.com/Karaf-User-f930749.html
> 

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


Re: Deploy karaf 4.2.2 to multiple envs with different configurations

2019-02-01 Thread Jean-Baptiste Onofré
Before talking about profile (that could be used there), you can also
create env specific feature just containing the config.

For the profile, you can take a look on the example:

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

I'm planning to blog and update the documentation with profile use case.

Regards
JB

On 01/02/2019 14:59, Cantbebotheredtothinkofauserna wrote:
> I'm building a 4.2.2 custom distribution which is to be deployed to multiple
> environments. Each env should have it's own config, but shouldn't know about
> other env's configs. I wanted to use Karaf profiles but there isn't any
> documentation on it, and I'm not sure if itll abide by the "no env should
> know about other envs config" rule.
> 
> What's the best approach in this case? Ideally I'd like to have a config
> file (containting values for things like http port) placed in each env then
> picked up by Karaf when launched (before the bundles start up). The config
> files in each env would have the same relative path from the karaf assembly. 
> 
> 
> 
> --
> Sent from: http://karaf.922171.n3.nabble.com/Karaf-User-f930749.html
> 

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


Use environment specific config on startup

2019-02-01 Thread Cantbebotheredtothinkofauserna
I'm building a 4.2.2 custom distribution which is to be deployed to multiple
environments. Each env should have it's own config, but shouldn't know about
other env's configs. I wanted to use Karaf profiles but there isn't any
documentation on it, and I'm not sure if itll abide by the "no env should
know about other envs config" rule.

What's the best approach in this case? Ideally I'd like to have a config
file (containting values for things like http port) placed in each env then
picked up by Karaf when launched (before the bundles start up). The config
files in each env would have the same relative path from the karaf assembly. 



--
Sent from: http://karaf.922171.n3.nabble.com/Karaf-User-f930749.html


Deploy karaf 4.2.2 to multiple envs with different configurations

2019-02-01 Thread Cantbebotheredtothinkofauserna
I'm building a 4.2.2 custom distribution which is to be deployed to multiple
environments. Each env should have it's own config, but shouldn't know about
other env's configs. I wanted to use Karaf profiles but there isn't any
documentation on it, and I'm not sure if itll abide by the "no env should
know about other envs config" rule.

What's the best approach in this case? Ideally I'd like to have a config
file (containting values for things like http port) placed in each env then
picked up by Karaf when launched (before the bundles start up). The config
files in each env would have the same relative path from the karaf assembly. 



--
Sent from: http://karaf.922171.n3.nabble.com/Karaf-User-f930749.html