Re: pax-jdbc-config connection pool configuration

2018-05-14 Thread Alex Soto
Sure, but I can’t find where, can you share a link?

Best regards,
Alex soto




> On May 14, 2018, at 4:07 PM, Jean-Baptiste Onofré  wrote:
> 
> Hi Alex,
> 
> the MariaDbDataSourceFactory uses MySQLDataSource internally. And the 
> properties is not passed in the factory.
> 
> Can you please create a Jira at pax jdbc ?
> 
> Thanks
> Regards
> JB
> 
> On 14/05/2018 21:47, Alex Soto wrote:
>> Using Karaf  4.2.0, I am trying to configure connection pool using 
>> pax-jdbc-config  approach.  I installed features:
>>pax-jdbc-mariadb
>>pax-jdbc-config
>>pax-jdbc-pool-dbcp2
>> I dropped a /org.ops4j.datasource-responder.cfg/ file in the etc directory:
>>osgi.jdbc.driver.name = mariadb
>>dataSourceName=responder
>>url = jdbc:mariadb://localhost:3306/responder
>>user=
>>password=
>>pool=dbcp2
>>xa=true
>>databaseName=responder
>>jdbc.pool.maxTotal=8
>> The last line causes this error:
>>cannot set properties [pool.maxTotal]
>>java.sql.SQLException: cannot set properties [pool.maxTotal]
>>at 
>> org.ops4j.pax.jdbc.mariadb.impl.MariaDbDataSourceFactory.setProperties(MariaDbDataSourceFactory.java:70)
>>~[?:?]
>>at 
>> org.ops4j.pax.jdbc.mariadb.impl.MariaDbDataSourceFactory.createDataSource(MariaDbDataSourceFactory.java:36)
>>~[?:?]
>>at
>>
>> org.ops4j.pax.jdbc.config.impl.DataSourceRegistration.createDs(DataSourceRegistration.java:134)
>>~[?:?]
>>at
>>
>> org.ops4j.pax.jdbc.config.impl.DataSourceRegistration.(DataSourceRegistration.java:80)
>>~[?:?]
>>at
>>
>> org.ops4j.pax.jdbc.config.impl.DataSourceConfigManager.lambda$null$0(DataSourceConfigManager.java:81)
>>~[?:?]
>>at
>>
>> org.ops4j.pax.jdbc.config.impl.ServiceTrackerHelper$1.addingService(ServiceTrackerHelper.java:131)
>>~[?:?]
>>at
>>
>> org.osgi.util.tracker.ServiceTracker$Tracked.customizerAdding(ServiceTracker.java:941)
>>~[?:?]
>>at
>>
>> org.osgi.util.tracker.ServiceTracker$Tracked.customizerAdding(ServiceTracker.java:870)
>>~[?:?]
>>at
>>
>> org.osgi.util.tracker.AbstractTracked.trackAdding(AbstractTracked.java:256)
>>~[?:?]
>>at
>>
>> org.osgi.util.tracker.AbstractTracked.trackInitial(AbstractTracked.java:183)
>>~[?:?]
>>at
>>org.osgi.util.tracker.ServiceTracker.open(ServiceTracker.java:318)
>>~[?:?]
>>at
>>org.osgi.util.tracker.ServiceTracker.open(ServiceTracker.java:261)
>>~[?:?]
>>at
>>
>> org.ops4j.pax.jdbc.config.impl.ServiceTrackerHelper.track(ServiceTrackerHelper.java:140)
>>~[?:?]
>>at
>>
>> org.ops4j.pax.jdbc.config.impl.DataSourceConfigManager.lambda$null$1(DataSourceConfigManager.java:77)
>>~[?:?]
>>at
>>
>> org.ops4j.pax.jdbc.config.impl.ServiceTrackerHelper.track(ServiceTrackerHelper.java:146)
>>~[?:?]
>>at
>>
>> org.ops4j.pax.jdbc.config.impl.ServiceTrackerHelper.track(ServiceTrackerHelper.java:85)
>>~[?:?]
>>at
>>
>> org.ops4j.pax.jdbc.config.impl.DataSourceConfigManager.lambda$null$2(DataSourceConfigManager.java:76)
>>~[?:?]
>>at
>>
>> org.ops4j.pax.jdbc.config.impl.ServiceTrackerHelper$1.addingService(ServiceTrackerHelper.java:131)
>>~[?:?]
>>at
>>
>> org.osgi.util.tracker.ServiceTracker$Tracked.customizerAdding(ServiceTracker.java:941)
>>~[?:?]
>>at
>>
>> org.osgi.util.tracker.ServiceTracker$Tracked.customizerAdding(ServiceTracker.java:870)
>>~[?:?]
>>at
>>
>> org.osgi.util.tracker.AbstractTracked.trackAdding(AbstractTracked.java:256)
>>~[?:?]
>>at
>>
>> org.osgi.util.tracker.AbstractTracked.trackInitial(AbstractTracked.java:183)
>>~[?:?]
>>at
>>org.osgi.util.tracker.ServiceTracker.open(ServiceTracker.java:318)
>>~[?:?]
>>at
>>org.osgi.util.tracker.ServiceTracker.open(ServiceTracker.java:261)
>>~[?:?]
>>at
>>
>> org.ops4j.pax.jdbc.config.impl.ServiceTrackerHelper.track(ServiceTrackerHelper.java:140)
>>~[14:org.ops4j.pax.jdbc.config:1.2.0]
>>at
>>
>> org.ops4j.pax.jdbc.config.impl.ServiceTrackerHelper.track(ServiceTrackerHelper.java:85)
>>~[14:org.ops4j.pax.jdbc.config:1.2.0]
>>at 
>> org.ops4j.pax.jdbc.config.impl.DataSourceConfigManager.lambda$updated$3(DataSourceConfigManager.java:75)
>>~[14:org.ops4j.pax.jdbc.config:1.2.0]
>>at
>>
>> org.ops4j.pax.jdbc.config.impl.ServiceTrackerHelper.track(ServiceTrackerHelper.java:146)
>>  [14:org.ops4j.pax.jdbc.config:1.2.0]
>>at
>>
>> org.ops4j.pax.jdbc.config.impl.ServiceTrackerHelper.track(ServiceTrackerHelper.java:85)
>>  [14:org.ops4j.pax.jdbc.config:1.2.0]
>>at
>>
>> org.ops4j.pax.jdbc.config.impl.DataSourceConfigManager.updated(DataSourceConfigManager.java:74)
>>  [14:org.ops4j.pax.jdbc.config:1.2.0]
>>at 
>> org.apache.felix.cm.impl.helper.ManagedServiceFactoryTracker.updated(ManagedServiceFactoryTracker.java:159)
>>  [8:org.apache.felix.configadmin:1.8.16]
>>at 

Re: pax-jdbc-config connection pool configuration

2018-05-14 Thread Jean-Baptiste Onofré

Hi Alex,

the MariaDbDataSourceFactory uses MySQLDataSource internally. And the 
properties is not passed in the factory.


Can you please create a Jira at pax jdbc ?

Thanks
Regards
JB

On 14/05/2018 21:47, Alex Soto wrote:
Using Karaf  4.2.0, I am trying to configure connection pool 
using pax-jdbc-config  approach.  I installed features:


pax-jdbc-mariadb
pax-jdbc-config
pax-jdbc-pool-dbcp2




I dropped a /org.ops4j.datasource-responder.cfg/ file in the etc directory:


osgi.jdbc.driver.name = mariadb
dataSourceName=responder
url = jdbc:mariadb://localhost:3306/responder
user=
password=
pool=dbcp2
xa=true
databaseName=responder
jdbc.pool.maxTotal=8


The last line causes this error:

cannot set properties [pool.maxTotal]
java.sql.SQLException: cannot set properties [pool.maxTotal]
at 
org.ops4j.pax.jdbc.mariadb.impl.MariaDbDataSourceFactory.setProperties(MariaDbDataSourceFactory.java:70)
~[?:?]
at 
org.ops4j.pax.jdbc.mariadb.impl.MariaDbDataSourceFactory.createDataSource(MariaDbDataSourceFactory.java:36)
~[?:?]
at

org.ops4j.pax.jdbc.config.impl.DataSourceRegistration.createDs(DataSourceRegistration.java:134)
~[?:?]
at

org.ops4j.pax.jdbc.config.impl.DataSourceRegistration.(DataSourceRegistration.java:80)
~[?:?]
at

org.ops4j.pax.jdbc.config.impl.DataSourceConfigManager.lambda$null$0(DataSourceConfigManager.java:81)
~[?:?]
at

org.ops4j.pax.jdbc.config.impl.ServiceTrackerHelper$1.addingService(ServiceTrackerHelper.java:131)
~[?:?]
at

org.osgi.util.tracker.ServiceTracker$Tracked.customizerAdding(ServiceTracker.java:941)
~[?:?]
at

org.osgi.util.tracker.ServiceTracker$Tracked.customizerAdding(ServiceTracker.java:870)
~[?:?]
at
org.osgi.util.tracker.AbstractTracked.trackAdding(AbstractTracked.java:256)
~[?:?]
at
org.osgi.util.tracker.AbstractTracked.trackInitial(AbstractTracked.java:183)
~[?:?]
at
org.osgi.util.tracker.ServiceTracker.open(ServiceTracker.java:318)
~[?:?]
at
org.osgi.util.tracker.ServiceTracker.open(ServiceTracker.java:261)
~[?:?]
at

org.ops4j.pax.jdbc.config.impl.ServiceTrackerHelper.track(ServiceTrackerHelper.java:140)
~[?:?]
at

org.ops4j.pax.jdbc.config.impl.DataSourceConfigManager.lambda$null$1(DataSourceConfigManager.java:77)
~[?:?]
at

org.ops4j.pax.jdbc.config.impl.ServiceTrackerHelper.track(ServiceTrackerHelper.java:146)
~[?:?]
at

org.ops4j.pax.jdbc.config.impl.ServiceTrackerHelper.track(ServiceTrackerHelper.java:85)
~[?:?]
at

org.ops4j.pax.jdbc.config.impl.DataSourceConfigManager.lambda$null$2(DataSourceConfigManager.java:76)
~[?:?]
at

org.ops4j.pax.jdbc.config.impl.ServiceTrackerHelper$1.addingService(ServiceTrackerHelper.java:131)
~[?:?]
at

org.osgi.util.tracker.ServiceTracker$Tracked.customizerAdding(ServiceTracker.java:941)
~[?:?]
at

org.osgi.util.tracker.ServiceTracker$Tracked.customizerAdding(ServiceTracker.java:870)
~[?:?]
at
org.osgi.util.tracker.AbstractTracked.trackAdding(AbstractTracked.java:256)
~[?:?]
at
org.osgi.util.tracker.AbstractTracked.trackInitial(AbstractTracked.java:183)
~[?:?]
at
org.osgi.util.tracker.ServiceTracker.open(ServiceTracker.java:318)
~[?:?]
at
org.osgi.util.tracker.ServiceTracker.open(ServiceTracker.java:261)
~[?:?]
at

org.ops4j.pax.jdbc.config.impl.ServiceTrackerHelper.track(ServiceTrackerHelper.java:140)
~[14:org.ops4j.pax.jdbc.config:1.2.0]
at

org.ops4j.pax.jdbc.config.impl.ServiceTrackerHelper.track(ServiceTrackerHelper.java:85)
~[14:org.ops4j.pax.jdbc.config:1.2.0]
at 
org.ops4j.pax.jdbc.config.impl.DataSourceConfigManager.lambda$updated$3(DataSourceConfigManager.java:75)
~[14:org.ops4j.pax.jdbc.config:1.2.0]
at

org.ops4j.pax.jdbc.config.impl.ServiceTrackerHelper.track(ServiceTrackerHelper.java:146)
 [14:org.ops4j.pax.jdbc.config:1.2.0]
at

org.ops4j.pax.jdbc.config.impl.ServiceTrackerHelper.track(ServiceTrackerHelper.java:85)
 [14:org.ops4j.pax.jdbc.config:1.2.0]
at

org.ops4j.pax.jdbc.config.impl.DataSourceConfigManager.updated(DataSourceConfigManager.java:74)
 [14:org.ops4j.pax.jdbc.config:1.2.0]
at 
org.apache.felix.cm.impl.helper.ManagedServiceFactoryTracker.updated(ManagedServiceFactoryTracker.java:159)
 [8:org.apache.felix.configadmin:1.8.16]
at 
org.apache.felix.cm.impl.helper.ManagedServiceFactoryTracker.provideConfiguration(ManagedServiceFactoryTracker.java:93)
[8:org.apache.felix.configadmin:1.8.16]
at

org.apache.felix.cm.impl.ConfigurationManager$UpdateConfiguration.run(ConfigurationManager.java:1792)
 [8:org.apache.felix.configadmin:1.8.16]
at
org.apache.felix.cm.impl.UpdateThread.run0(UpdateThread.java:141) 
[8:org.apache.felix.configadmin:1.8.16]
at

pax-jdbc-config connection pool configuration

2018-05-14 Thread Alex Soto
Using Karaf  4.2.0, I am trying to configure connection pool using 
pax-jdbc-config  approach.  I installed features:

pax-jdbc-mariadb
pax-jdbc-config
pax-jdbc-pool-dbcp2



I dropped a org.ops4j.datasource-responder.cfg file in the etc directory:

osgi.jdbc.driver.name = mariadb
dataSourceName=responder
url = jdbc:mariadb://localhost:3306/responder
user=
password=
pool=dbcp2
xa=true
databaseName=responder
jdbc.pool.maxTotal=8


The last line causes this error:

cannot set properties [pool.maxTotal]
java.sql.SQLException: cannot set properties [pool.maxTotal]
at 
org.ops4j.pax.jdbc.mariadb.impl.MariaDbDataSourceFactory.setProperties(MariaDbDataSourceFactory.java:70)
 ~[?:?]
at 
org.ops4j.pax.jdbc.mariadb.impl.MariaDbDataSourceFactory.createDataSource(MariaDbDataSourceFactory.java:36)
 ~[?:?]
at 
org.ops4j.pax.jdbc.config.impl.DataSourceRegistration.createDs(DataSourceRegistration.java:134)
 ~[?:?]
at 
org.ops4j.pax.jdbc.config.impl.DataSourceRegistration.(DataSourceRegistration.java:80)
 ~[?:?]
at 
org.ops4j.pax.jdbc.config.impl.DataSourceConfigManager.lambda$null$0(DataSourceConfigManager.java:81)
 ~[?:?]
at 
org.ops4j.pax.jdbc.config.impl.ServiceTrackerHelper$1.addingService(ServiceTrackerHelper.java:131)
 ~[?:?]
at 
org.osgi.util.tracker.ServiceTracker$Tracked.customizerAdding(ServiceTracker.java:941)
 ~[?:?]
at 
org.osgi.util.tracker.ServiceTracker$Tracked.customizerAdding(ServiceTracker.java:870)
 ~[?:?]
at 
org.osgi.util.tracker.AbstractTracked.trackAdding(AbstractTracked.java:256) 
~[?:?]
at 
org.osgi.util.tracker.AbstractTracked.trackInitial(AbstractTracked.java:183) 
~[?:?]
at org.osgi.util.tracker.ServiceTracker.open(ServiceTracker.java:318) 
~[?:?]
at org.osgi.util.tracker.ServiceTracker.open(ServiceTracker.java:261) 
~[?:?]
at 
org.ops4j.pax.jdbc.config.impl.ServiceTrackerHelper.track(ServiceTrackerHelper.java:140)
 ~[?:?]
at 
org.ops4j.pax.jdbc.config.impl.DataSourceConfigManager.lambda$null$1(DataSourceConfigManager.java:77)
 ~[?:?]
at 
org.ops4j.pax.jdbc.config.impl.ServiceTrackerHelper.track(ServiceTrackerHelper.java:146)
 ~[?:?]
at 
org.ops4j.pax.jdbc.config.impl.ServiceTrackerHelper.track(ServiceTrackerHelper.java:85)
 ~[?:?]
at 
org.ops4j.pax.jdbc.config.impl.DataSourceConfigManager.lambda$null$2(DataSourceConfigManager.java:76)
 ~[?:?]
at 
org.ops4j.pax.jdbc.config.impl.ServiceTrackerHelper$1.addingService(ServiceTrackerHelper.java:131)
 ~[?:?]
at 
org.osgi.util.tracker.ServiceTracker$Tracked.customizerAdding(ServiceTracker.java:941)
 ~[?:?]
at 
org.osgi.util.tracker.ServiceTracker$Tracked.customizerAdding(ServiceTracker.java:870)
 ~[?:?]
at 
org.osgi.util.tracker.AbstractTracked.trackAdding(AbstractTracked.java:256) 
~[?:?]
at 
org.osgi.util.tracker.AbstractTracked.trackInitial(AbstractTracked.java:183) 
~[?:?]
at org.osgi.util.tracker.ServiceTracker.open(ServiceTracker.java:318) 
~[?:?]
at org.osgi.util.tracker.ServiceTracker.open(ServiceTracker.java:261) 
~[?:?]
at 
org.ops4j.pax.jdbc.config.impl.ServiceTrackerHelper.track(ServiceTrackerHelper.java:140)
 ~[14:org.ops4j.pax.jdbc.config:1.2.0]
at 
org.ops4j.pax.jdbc.config.impl.ServiceTrackerHelper.track(ServiceTrackerHelper.java:85)
 ~[14:org.ops4j.pax.jdbc.config:1.2.0]
at 
org.ops4j.pax.jdbc.config.impl.DataSourceConfigManager.lambda$updated$3(DataSourceConfigManager.java:75)
 ~[14:org.ops4j.pax.jdbc.config:1.2.0]
at 
org.ops4j.pax.jdbc.config.impl.ServiceTrackerHelper.track(ServiceTrackerHelper.java:146)
 [14:org.ops4j.pax.jdbc.config:1.2.0]
at 
org.ops4j.pax.jdbc.config.impl.ServiceTrackerHelper.track(ServiceTrackerHelper.java:85)
 [14:org.ops4j.pax.jdbc.config:1.2.0]
at 
org.ops4j.pax.jdbc.config.impl.DataSourceConfigManager.updated(DataSourceConfigManager.java:74)
 [14:org.ops4j.pax.jdbc.config:1.2.0]
at 
org.apache.felix.cm.impl.helper.ManagedServiceFactoryTracker.updated(ManagedServiceFactoryTracker.java:159)
 [8:org.apache.felix.configadmin:1.8.16]
at 
org.apache.felix.cm.impl.helper.ManagedServiceFactoryTracker.provideConfiguration(ManagedServiceFactoryTracker.java:93)
 [8:org.apache.felix.configadmin:1.8.16]
at 
org.apache.felix.cm.impl.ConfigurationManager$UpdateConfiguration.run(ConfigurationManager.java:1792)
 [8:org.apache.felix.configadmin:1.8.16]
at org.apache.felix.cm.impl.UpdateThread.run0(UpdateThread.java:141) 
[8:org.apache.felix.configadmin:1.8.16]
at org.apache.felix.cm.impl.UpdateThread.run(UpdateThread.java:109) 
[8:org.apache.felix.configadmin:1.8.16]
at java.lang.Thread.run(Thread.java:748) [?:?]


How do I configure the various parameters of the connection pool?


Best regards,
Alex soto






Re: Odd feature repo behavior in 4.2.0 custom distro

2018-05-14 Thread Jean-Baptiste Onofré

Hi Erwin,

I think I missed your e-mail. Can you please send to jbono...@apache.org ?

Thanks
Regards
JB

On 14/05/2018 12:14, Erwin Hogeweg wrote:

Hi François,


I'm agree, it will be better that you share your project with JB ;)

I did. I sent it in a private email.

Thanks,

Erwin



François


Le 13/05/2018 à 23:08, Jean-Baptiste Onofré a écrit :

Hi Erwin,

could you please share the project with me, I will fix your issue.

Regards
JB

On 13/05/2018 21:00, Erwin Hogeweg wrote:

Hi JB,

Thanks for your reply


eclipselink should be not a startup feature: startup feature is not
actually a feature, the bundles contained in the feature are added
in etc/startup.properties.

So eclipselink should be a boot feature.

Same for jndi.

Thanks, I fixed that.


The scope runtime on deps means that they will be added in the Karaf
repo. I don't see the standard repo in your pom.

I had the enterprise in there. It was my understanding that is a
superset of standard.


I advise to fix that first.

Added standard repo but no difference.

karaf@root()> feature:repo-list
Repository│ URL
──┼─

enterprise-4.2.0  │
mvn:org.apache.karaf.features/enterprise/4.2.0/xml/features
pax-transx-0.2.0  │
mvn:org.ops4j.pax.transx/pax-transx-features/0.2.0/xml/features
framework-4.2.0   │
mvn:org.apache.karaf.features/framework/4.2.0/xml/features
org.ops4j.pax.web-7.0.0   │
mvn:org.ops4j.pax.web/pax-web-features/7.0.0/xml/features
hibernate-validator-osgi-features │
mvn:org.hibernate.validator/hibernate-validator-osgi-karaf-features/6.0.9.Final/xml/features
hibernate-osgi│
mvn:org.hibernate/hibernate-osgi/5.2.9.Final/xml/karaf
rome-features │
mvn:com.seecago.rome.server/rome-features/1.0.0-SNAPSHOT/xml/features
pax-jms-0.3.0 │
mvn:org.ops4j.pax.jms/pax-jms-features/0.3.0/xml/features
org.ops4j.pax.cdi-1.0.0   │
mvn:org.ops4j.pax.cdi/pax-cdi-features/1.0.0/xml/features
cxf-3.1.1 │
mvn:org.apache.cxf.karaf/apache-cxf/3.1.1/xml/features
standard-4.2.0│
mvn:org.apache.karaf.features/standard/4.2.0/xml/features
org.ops4j.pax.jdbc-1.2.0  │
mvn:org.ops4j.pax.jdbc/pax-jdbc-features/1.2.0/xml/features
aries-jpa-2.6.1   │
mvn:org.apache.aries.jpa/jpa-features/2.6.1/xml/features
cxf-dosgi-1.7.0   │
mvn:org.apache.cxf.dosgi/cxf-dosgi/1.7.0/xml/features
karaf@root()> feature:list | grep -i rome
karaf@root()>

Note: To be able to install my feature I have to rebuild w/o adding
the feature-repo and then manually add the repo and the feature. This
works w/o making any other changes which seems to suggest that the
feature itself is correct.


Regards,

Erwin



Regards
JB

On 13/05/2018 17:12, Erwin Hogeweg wrote:

François,


Can you share your pom.xml from the assembly module ?


Attached.
Erwin

Le 13/05/2018 à 18:11, Erwin Hogeweg a écrit :

Hi François,

Thanks for your reply.


Did the feature:list show your feature un your custom
distribution ?


Nope.


You also set log to debug and see if there is something wrong.


Hmmm…
2018-05-13T15:48:05,948 | DEBUG | activator-1-thread-1 |
AetherBasedResolver  | 2 - org.ops4j.pax.url.mvn - 2.5.4
| Resolved
(com.seecago.rome.server:rome-features:xml:features:1.0.0-SNAPSHOT)
as
<…>/Users/erwin/work/Rome/trunk/src/server/karaf.distro/target/assembly/system/com/seecago/rome/server/rome-features/1.0.0-SNAPSHOT/rome-features-1.0.0-SNAPSHOT-features.xml

… I think I see what the issue is… the referenced feature is
empty, or pretty much empty.


http://karaf.apache.org/xmlns/features/v1.5.0;
name="rome-features"/>

That is not the feature.xml I had in mind. The one from .m2 looks
much different. Wasn’t there a Jira issue raised a couple of
weeks ago about feature.xml not being generated completely? Or
was that a config file? I can’t find it anymore.



Thanks,

Erwin


François

Le 13 mai 2018 00:43, Erwin Hogeweg  > a
écrit :

Hi -

I ran into an issue with a custom distro.

Installing a local feature from the console works just fine, but
when I include the feature repo in the
org.apache.karaf.features.cfg file the feature won’t load
because karaf thinks it doesn’t exist.

This is what I get when I install from the console while the :

karaf@root()> feature:repo-add 
mvn:com.myproject/my-features/1.0.0-SNAPSHOT/xml/features

karaf@root()> feature:repo-list
  my-features-1.0.0-SNAPSHOT   │
mvn:com.myproject/my-features/1.0.0-SNAPSHOT/xml/features
karaf@root()> feature:install my-feature
karaf@root()>

This is the entry in the distro pom to add the repo to the
config file:


com.myproject

Re: Odd feature repo behavior in 4.2.0 custom distro

2018-05-14 Thread Erwin Hogeweg
Hi François,

> I'm agree, it will be better that you share your project with JB ;)
I did. I sent it in a private email.

Thanks,

Erwin

> 
> François
> 
> 
> Le 13/05/2018 à 23:08, Jean-Baptiste Onofré a écrit :
>> Hi Erwin,
>> 
>> could you please share the project with me, I will fix your issue.
>> 
>> Regards
>> JB
>> 
>> On 13/05/2018 21:00, Erwin Hogeweg wrote:
>>> Hi JB,
>>> 
>>> Thanks for your reply
>>> 
 eclipselink should be not a startup feature: startup feature is not
 actually a feature, the bundles contained in the feature are added
 in etc/startup.properties.
 
 So eclipselink should be a boot feature.
 
 Same for jndi.
>>> Thanks, I fixed that.
>>> 
 The scope runtime on deps means that they will be added in the Karaf
 repo. I don't see the standard repo in your pom.
>>> I had the enterprise in there. It was my understanding that is a
>>> superset of standard.
>>> 
 I advise to fix that first.
>>> Added standard repo but no difference.
>>> 
>>> karaf@root()> feature:repo-list
>>> Repository│ URL
>>> ──┼─
>>> 
>>> enterprise-4.2.0  │
>>> mvn:org.apache.karaf.features/enterprise/4.2.0/xml/features
>>> pax-transx-0.2.0  │
>>> mvn:org.ops4j.pax.transx/pax-transx-features/0.2.0/xml/features
>>> framework-4.2.0   │
>>> mvn:org.apache.karaf.features/framework/4.2.0/xml/features
>>> org.ops4j.pax.web-7.0.0   │
>>> mvn:org.ops4j.pax.web/pax-web-features/7.0.0/xml/features
>>> hibernate-validator-osgi-features │
>>> mvn:org.hibernate.validator/hibernate-validator-osgi-karaf-features/6.0.9.Final/xml/features
>>> hibernate-osgi│
>>> mvn:org.hibernate/hibernate-osgi/5.2.9.Final/xml/karaf
>>> rome-features │
>>> mvn:com.seecago.rome.server/rome-features/1.0.0-SNAPSHOT/xml/features
>>> pax-jms-0.3.0 │
>>> mvn:org.ops4j.pax.jms/pax-jms-features/0.3.0/xml/features
>>> org.ops4j.pax.cdi-1.0.0   │
>>> mvn:org.ops4j.pax.cdi/pax-cdi-features/1.0.0/xml/features
>>> cxf-3.1.1 │
>>> mvn:org.apache.cxf.karaf/apache-cxf/3.1.1/xml/features
>>> standard-4.2.0│
>>> mvn:org.apache.karaf.features/standard/4.2.0/xml/features
>>> org.ops4j.pax.jdbc-1.2.0  │
>>> mvn:org.ops4j.pax.jdbc/pax-jdbc-features/1.2.0/xml/features
>>> aries-jpa-2.6.1   │
>>> mvn:org.apache.aries.jpa/jpa-features/2.6.1/xml/features
>>> cxf-dosgi-1.7.0   │
>>> mvn:org.apache.cxf.dosgi/cxf-dosgi/1.7.0/xml/features
>>> karaf@root()> feature:list | grep -i rome
>>> karaf@root()>
>>> 
>>> Note: To be able to install my feature I have to rebuild w/o adding
>>> the feature-repo and then manually add the repo and the feature. This
>>> works w/o making any other changes which seems to suggest that the
>>> feature itself is correct.
>>> 
>>> 
>>> Regards,
>>> 
>>> Erwin
>>> 
 
 Regards
 JB
 
 On 13/05/2018 17:12, Erwin Hogeweg wrote:
> François,
>> 
>> Can you share your pom.xml from the assembly module ?
>> 
> Attached.
> Erwin
>> Le 13/05/2018 à 18:11, Erwin Hogeweg a écrit :
>>> Hi François,
>>> 
>>> Thanks for your reply.
 
 Did the feature:list show your feature un your custom
 distribution ?
 
>>> Nope.
 
 You also set log to debug and see if there is something wrong.
 
>>> Hmmm…
>>> 2018-05-13T15:48:05,948 | DEBUG | activator-1-thread-1 |
>>> AetherBasedResolver  | 2 - org.ops4j.pax.url.mvn - 2.5.4
>>> | Resolved
>>> (com.seecago.rome.server:rome-features:xml:features:1.0.0-SNAPSHOT)
>>> as
>>> <…>/Users/erwin/work/Rome/trunk/src/server/karaf.distro/target/assembly/system/com/seecago/rome/server/rome-features/1.0.0-SNAPSHOT/rome-features-1.0.0-SNAPSHOT-features.xml
>>> 
>>> … I think I see what the issue is… the referenced feature is
>>> empty, or pretty much empty.
>>> 
>>> 
>>> http://karaf.apache.org/xmlns/features/v1.5.0;
>>> name="rome-features"/>
>>> 
>>> That is not the feature.xml I had in mind. The one from .m2 looks
>>> much different. Wasn’t there a Jira issue raised a couple of
>>> weeks ago about feature.xml not being generated completely? Or
>>> was that a config file? I can’t find it anymore.
>>> 
>>> 
>>> 
>>> Thanks,
>>> 
>>> Erwin
 
 François
 
 Le 13 mai 2018 00:43, Erwin Hogeweg  > a
 écrit :
 
Hi -
 
I ran into an issue with a custom distro.
 
Installing a local feature from the console works just fine, but
when I include 

Re: Odd feature repo behavior in 4.2.0 custom distro

2018-05-14 Thread Francois Papon
Hi Erwin,

I'm agree, it will be better that you share your project with JB ;)

François


Le 13/05/2018 à 23:08, Jean-Baptiste Onofré a écrit :
> Hi Erwin,
>
> could you please share the project with me, I will fix your issue.
>
> Regards
> JB
>
> On 13/05/2018 21:00, Erwin Hogeweg wrote:
>> Hi JB,
>>
>> Thanks for your reply
>>
>>> eclipselink should be not a startup feature: startup feature is not
>>> actually a feature, the bundles contained in the feature are added
>>> in etc/startup.properties.
>>>
>>> So eclipselink should be a boot feature.
>>>
>>> Same for jndi.
>> Thanks, I fixed that.
>>
>>> The scope runtime on deps means that they will be added in the Karaf
>>> repo. I don't see the standard repo in your pom.
>> I had the enterprise in there. It was my understanding that is a
>> superset of standard.
>>
>>> I advise to fix that first.
>> Added standard repo but no difference.
>>
>> karaf@root()> feature:repo-list
>> Repository                        │ URL
>> ──┼─
>>
>> enterprise-4.2.0                  │
>> mvn:org.apache.karaf.features/enterprise/4.2.0/xml/features
>> pax-transx-0.2.0                  │
>> mvn:org.ops4j.pax.transx/pax-transx-features/0.2.0/xml/features
>> framework-4.2.0                   │
>> mvn:org.apache.karaf.features/framework/4.2.0/xml/features
>> org.ops4j.pax.web-7.0.0           │
>> mvn:org.ops4j.pax.web/pax-web-features/7.0.0/xml/features
>> hibernate-validator-osgi-features │
>> mvn:org.hibernate.validator/hibernate-validator-osgi-karaf-features/6.0.9.Final/xml/features
>> hibernate-osgi                    │
>> mvn:org.hibernate/hibernate-osgi/5.2.9.Final/xml/karaf
>> rome-features                     │
>> mvn:com.seecago.rome.server/rome-features/1.0.0-SNAPSHOT/xml/features
>> pax-jms-0.3.0                     │
>> mvn:org.ops4j.pax.jms/pax-jms-features/0.3.0/xml/features
>> org.ops4j.pax.cdi-1.0.0           │
>> mvn:org.ops4j.pax.cdi/pax-cdi-features/1.0.0/xml/features
>> cxf-3.1.1                         │
>> mvn:org.apache.cxf.karaf/apache-cxf/3.1.1/xml/features
>> standard-4.2.0                    │
>> mvn:org.apache.karaf.features/standard/4.2.0/xml/features
>> org.ops4j.pax.jdbc-1.2.0          │
>> mvn:org.ops4j.pax.jdbc/pax-jdbc-features/1.2.0/xml/features
>> aries-jpa-2.6.1                   │
>> mvn:org.apache.aries.jpa/jpa-features/2.6.1/xml/features
>> cxf-dosgi-1.7.0                   │
>> mvn:org.apache.cxf.dosgi/cxf-dosgi/1.7.0/xml/features
>> karaf@root()> feature:list | grep -i rome
>> karaf@root()>
>>
>> Note: To be able to install my feature I have to rebuild w/o adding
>> the feature-repo and then manually add the repo and the feature. This
>> works w/o making any other changes which seems to suggest that the
>> feature itself is correct.
>>
>>
>> Regards,
>>
>> Erwin
>>
>>>
>>> Regards
>>> JB
>>>
>>> On 13/05/2018 17:12, Erwin Hogeweg wrote:
 François,
>
> Can you share your pom.xml from the assembly module ?
>
 Attached.
 Erwin
> Le 13/05/2018 à 18:11, Erwin Hogeweg a écrit :
>> Hi François,
>>
>> Thanks for your reply.
>>>
>>> Did the feature:list show your feature un your custom
>>> distribution ?
>>>
>> Nope.
>>>
>>> You also set log to debug and see if there is something wrong.
>>>
>> Hmmm…
>> 2018-05-13T15:48:05,948 | DEBUG | activator-1-thread-1 |
>> AetherBasedResolver          | 2 - org.ops4j.pax.url.mvn - 2.5.4
>> | Resolved
>> (com.seecago.rome.server:rome-features:xml:features:1.0.0-SNAPSHOT)
>> as
>> <…>/Users/erwin/work/Rome/trunk/src/server/karaf.distro/target/assembly/system/com/seecago/rome/server/rome-features/1.0.0-SNAPSHOT/rome-features-1.0.0-SNAPSHOT-features.xml
>>
>> … I think I see what the issue is… the referenced feature is
>> empty, or pretty much empty.
>>
>> 
>> http://karaf.apache.org/xmlns/features/v1.5.0;
>> name="rome-features"/>
>>
>> That is not the feature.xml I had in mind. The one from .m2 looks
>> much different. Wasn’t there a Jira issue raised a couple of
>> weeks ago about feature.xml not being generated completely? Or
>> was that a config file? I can’t find it anymore.
>>
>>
>>
>> Thanks,
>>
>> Erwin
>>>
>>> François
>>>
>>> Le 13 mai 2018 00:43, Erwin Hogeweg >>  > a
>>> écrit :
>>>
>>>    Hi -
>>>
>>>    I ran into an issue with a custom distro.
>>>
>>>    Installing a local feature from the console works just fine, but
>>>    when I include the feature repo in the
>>>    org.apache.karaf.features.cfg file the feature won’t load
>>>    because karaf thinks it doesn’t exist.
>>>
>>>    This is what I get when I install from the console while the :
>>>
>>> 

Re: Blueprint/JPA : Need active coordination error

2018-05-14 Thread Jean-Baptiste Onofré
Ooops, I forgot this one :/

Sorry about that. I'm adding to my daily TODO.

Regards
JB

On 05/14/2018 11:02 AM, DUTERTRY Nicolas wrote:
> Hi JB,
> 
>  
> 
> Do you have any update on that issue ?
> 
>  
> 
> Regards,
> 
> --
> 
> Nicolas Dutertry
> 
>  
> 
> *De :*Jean-Baptiste Onofré [mailto:j...@nanthrax.net]
> *Envoyé :* lundi 23 avril 2018 13:29
> *À :* user@karaf.apache.org
> *Cc :* user@karaf.apache.org
> *Objet :* RE: Blueprint/JPA : Need active coordination error
> 
>  
> 
> Thanks.
> 
> I'm still in vacation for a couple of days. I will take a look end of this 
> week
> when back.
> 
> Regards
> 
> JB
> 
> Le 23 avr. 2018, à 15:16, DUTERTRY Nicolas  > a écrit:
> 
> Hi,
> 
> I have opened an issue in aries jira : 
> https://issues.apache.org/jira/browse/ARIES-1793
> 
> Regards,
> --
> Nicolas Dutertry
> 
> -Message d'origine-
> De : Jean-Baptiste Onofré [mailto:j...@nanthrax.net] 
> Envoyé : jeudi 12 avril 2018 14:38
> À : user@karaf.apache.org
> Objet : Re: Blueprint/JPA : Need active coordination error
> 
> Thanks I will take a look asap (I'm in vacation now ;)).
> 
> Regards
> JB
> 
> On 04/12/2018 02:03 PM, DUTERTRY Nicolas wrote:
> 
>  Here is full stack trace :
>  
>  java.lang.IllegalStateException: Need active coordination
>   at org.apache.aries.jpa.support 
> .impl.EMSupplierImpl.get(EMSupplierImpl.java:81)
>  ~[?:?]
>   at org.apache.aries.jpa.support 
> .osgi.impl.EmProxy.invoke(EmProxy.java:38)
>  ~[?:?]
>   at com.sun.proxy.$Proxy77.createQuery(Unknown Source) ~[?:?]
>   at Proxy4c2993b8_dc6f_46b4_8e62_524dc0ad05f5.createQuery(Unknown Source) 
> ~[?:?]
>   at 
> com.dutertry.test.karaf.jpa.service.impl.TestRepository.list(TestRepository.java:26)
>  ~[?:?]
>   at 
> com.dutertry.test.karaf.jpa.service.impl.TestServiceImpl.list(TestServiceImpl.java:25)
>  ~[?:?]
>   at 
> com.dutertry.test.karaf.jpa.cmd.ListPersonCommand.execute(ListPersonCommand.java:24)
>  ~[?:?]
>   at 
> org.apache.karaf.shell.impl.action.command.ActionCommand.execute(ActionCommand.java:84)
>  ~[?:?]
>   at 
> org.apache.karaf.shell.impl.console.osgi.secured.SecuredCommand.execute(SecuredCommand.java:68)
>  ~[?:?]
>   at 
> org.apache.karaf.shell.impl.console.osgi.secured.SecuredCommand.execute(SecuredCommand.java:86)
>  ~[?:?]
>   at org.apache.felix.gogo.runtime.Closure.executeCmd(Closure.java:571) ~[?:?]
>   at org.apache.felix.gogo.runtime.Closure.executeStatement(Closure.java:497) 
> ~[?:?]
>   at org.apache.felix.gogo.runtime.Closure.execute(Closure.java:386) ~[?:?]
>   at org.apache.felix.gogo.runtime.Pipe.doCall(Pipe.java:417) ~[?:?]
>   at org.apache.felix.gogo.runtime.Pipe.call(Pipe.java:229) ~[?:?]
>   at org.apache.felix.gogo.runtime.Pipe.call(Pipe.java:59) ~[?:?]
>   at java.util.concurrent.FutureTask.run(FutureTask.java:266) ~[?:?]
>   at 
> java.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1149)
>  ~[?:?]
>   at 
> java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:624)
>  ~[?:?]
>   at java.lang.Thread.run(Thread.java:748) [?:?]
>  
>  --
>  Nicolas Dutertry
>  
>  
>  -Message d'origine-
>  De : Jean-Baptiste Onofré [mailto:j...@nanthrax.net] 
>  Envoyé : jeudi 12 avril 2018 13:51
>  À : user@karaf.apache.org
>  Objet : Re: Blueprint/JPA : Need active coordination error
>  
>  Hi Nicolas,
>  
>  I'm surprised it's not a proxy: it should be a Aries Proxy.
>  
>  Where the ISE is coming from ?
>  
>  Regards
>  JB
>  
>  On 04/12/2018 01:47 PM, DUTERTRY Nicolas wrote:
> 
>  Hi,
> 
>   
> 
>  Yesterday I ran into an error with the new Karaf 4.2.0. This error 
>  seems to be related to blueprint 1.9.0 (the error does not occur in Karaf 
> 4.1.5).
> 
>   
> 
>  I have committed a project on Github to illustrate the issue :
>  https://github.com/nicolas-dutertry/test-jpa
> 
>   
> 
>  This project contains a blueprint bundle with a bean TestRepository 
>  annotated with @PersistenceContext. This bean is then injected into 
>  another bean TestServiceImpl which is then published as an osgi service :
> 
>     
> 
>  
> 
>      
> 
>     
> 
>  
> 
>        class="com.dutertry.test.karaf.jpa.service.impl.TestRepository"/>
> 
>     
> 
>    class="com.dutertry.test.karaf.jpa.service.impl.TestServiceImpl">
> 
>      
> 
>      
> 
>     
> 
>    ref="testService"/>
> 
>   
> 
>  With Karaf 4.1.5 the instance of TestRepository injected in 
>  testService is a proxy managing JPA stuff, but with Karaf 4.2.0 the 
>  injected instance is not a proxy. Thus when using testService, the following 
> error occurs :
> 
>  java.lang.IllegalStateException: Need active coordination
> 
>   
> 
>  Do you think it is a blueprint bug or is it forbidden to inject a jpa 
>  bean into another bean in the same blueprint context ?
> 
>   
> 
>  Regards,
> 
>  --
> 
>  Nicolas Dutertry
> 
>  Sopra HR Software 

RE: Blueprint/JPA : Need active coordination error

2018-05-14 Thread DUTERTRY Nicolas
Hi JB,

Do you have any update on that issue ?

Regards,
--
Nicolas Dutertry

De : Jean-Baptiste Onofré [mailto:j...@nanthrax.net]
Envoyé : lundi 23 avril 2018 13:29
À : user@karaf.apache.org
Cc : user@karaf.apache.org
Objet : RE: Blueprint/JPA : Need active coordination error

Thanks.
I'm still in vacation for a couple of days. I will take a look end of this week 
when back.
Regards
JB
Le 23 avr. 2018, à 15:16, DUTERTRY Nicolas 
> a écrit:

Hi,

I have opened an issue in aries jira : 
https://issues.apache.org/jira/browse/ARIES-1793

Regards,
--
Nicolas Dutertry

-Message d'origine-
De : Jean-Baptiste Onofré [mailto:j...@nanthrax.net]
Envoyé : jeudi 12 avril 2018 14:38
À : user@karaf.apache.org
Objet : Re: Blueprint/JPA : Need active coordination error

Thanks I will take a look asap (I'm in vacation now ;)).

Regards
JB

On 04/12/2018 02:03 PM, DUTERTRY Nicolas wrote:

 Here is full stack trace :

 java.lang.IllegalStateException: Need active coordination
  at 
org.apache.aries.jpa.support.impl.EMSupplierImpl.get(EMSupplierImpl.java:81)
 ~[?:?]
  at 
org.apache.aries.jpa.support.osgi.impl.EmProxy.invoke(EmProxy.java:38)
 ~[?:?]
  at com.sun.proxy.$Proxy77.createQuery(Unknown Source) ~[?:?]
  at Proxy4c2993b8_dc6f_46b4_8e62_524dc0ad05f5.createQuery(Unknown Source) 
~[?:?]
  at 
com.dutertry.test.karaf.jpa.service.impl.TestRepository.list(TestRepository.java:26)
 ~[?:?]
  at 
com.dutertry.test.karaf.jpa.service.impl.TestServiceImpl.list(TestServiceImpl.java:25)
 ~[?:?]
  at 
com.dutertry.test.karaf.jpa.cmd.ListPersonCommand.execute(ListPersonCommand.java:24)
 ~[?:?]
  at 
org.apache.karaf.shell.impl.action.command.ActionCommand.execute(ActionCommand.java:84)
 ~[?:?]
  at 
org.apache.karaf.shell.impl.console.osgi.secured.SecuredCommand.execute(SecuredCommand.java:68)
 ~[?:?]
  at 
org.apache.karaf.shell.impl.console.osgi.secured.SecuredCommand.execute(SecuredCommand.java:86)
 ~[?:?]
  at org.apache.felix.gogo.runtime.Closure.executeCmd(Closure.java:571) ~[?:?]
  at org.apache.felix.gogo.runtime.Closure.executeStatement(Closure.java:497) 
~[?:?]
  at org.apache.felix.gogo.runtime.Closure.execute(Closure.java:386) ~[?:?]
  at org.apache.felix.gogo.runtime.Pipe.doCall(Pipe.java:417) ~[?:?]
  at org.apache.felix.gogo.runtime.Pipe.call(Pipe.java:229) ~[?:?]
  at org.apache.felix.gogo.runtime.Pipe.call(Pipe.java:59) ~[?:?]
  at java.util.concurrent.FutureTask.run(FutureTask.java:266) ~[?:?]
  at 
java.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1149) 
~[?:?]
  at 
java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:624) 
~[?:?]
  at java.lang.Thread.run(Thread.java:748) [?:?]

 --
 Nicolas Dutertry


 -Message d'origine-
 De : Jean-Baptiste Onofré [mailto:j...@nanthrax.net]
 Envoyé : jeudi 12 avril 2018 13:51
 À : user@karaf.apache.org
 Objet : Re: Blueprint/JPA : Need active coordination error

 Hi Nicolas,

 I'm surprised it's not a proxy: it should be a Aries Proxy.

 Where the ISE is coming from ?

 Regards
 JB

 On 04/12/2018 01:47 PM, DUTERTRY Nicolas wrote:

 Hi,



 Yesterday I ran into an error with the new Karaf 4.2.0. This error
 seems to be related to blueprint 1.9.0 (the error does not occur in Karaf 
4.1.5).



 I have committed a project on Github to illustrate the issue :
 https://github.com/nicolas-dutertry/test-jpa



 This project contains a blueprint bundle with a bean TestRepository
 annotated with @PersistenceContext. This bean is then injected into
 another bean TestServiceImpl which is then published as an osgi service :



 

 



 

 



 

 

 



 



 With Karaf 4.1.5 the instance of TestRepository injected in
 testService is a proxy managing JPA stuff, but with Karaf 4.2.0 the
 injected instance is not a proxy. Thus when using testService, the following 
error occurs :

 java.lang.IllegalStateException: Need active coordination



 Do you think it is a blueprint bug or is it forbidden to inject a jpa
 bean into another bean in the same blueprint context ?



 Regards,

 --

 Nicolas Dutertry

 Sopra HR Software - http://www.soprahr.com/




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