ds-create -dt ConnectionPoolDataSource not working?

2017-07-12 Thread JonFields
Hi, I am trying to upgrade to Karaf 4.1.1 which bundles pax-jdbc 1.0.1, from
Karaf 4.0.4 and pax-jdbc 0.9.0. I understand that the way that connection
pooled and XA data sources work in pax-jdbc 1 is changed...

In the past, after 

feature:install jdbc transaction pax-jdbc pax-jdbc-config pax-jdbc-spec
pax-jdbc-pool-dbcp2 pax-jdbc-h2

I was able to use ds-create to create a pooled data source:

 ds-create -dn H2-pool -dbName myDataBase -url jdbc:h2:/path/to/db
myDataSource

With Karaf 4.1.1 and pax-jdbc 1.0.1, I try the following, but no data source
is created and there are no errors in the log:

ds-create -dn H2 -dt  ConnectionPoolDataSource -dbName myDataBase -url
jdbc:h2:/path/to/db myDataSource

If I omit the -dt  ConnectionPoolDataSource option, the ds-create command
works (but it is not a pooled data source).

If I follow the instructions  here
 
, and create a .cfg file with pool=dbcp2 , it works.

So perhaps the ds-create -dt option and/or pax jdbc 1.0.1 aren't working? Or
am I missing something?







--
View this message in context: 
http://karaf.922171.n3.nabble.com/ds-create-dt-ConnectionPoolDataSource-not-working-tp4050998.html
Sent from the Karaf - User mailing list archive at Nabble.com.


karaf-maven-plugin feature verify and missing capabilities

2017-07-12 Thread matteor
In my project I have to maintain a bunch of capabilities elements within my
custom features like this 



in order to get my features resolve (I'm using the karaf-maven-plugin with
the verify goal). If I do not specify these capabilities elements I get
missing requirement errors such as



This is quite annoying since I must remember to modify the feature files
each time I add a new component.

I stumbled upon this issue: https://issues.apache.org/jira/browse/KARAF-3520
and it seems discussing the very same issue I'm having with feature
resolution. Unfortunately I cannot understand how to set the
ignoreServiceReqs property for the verify goal of the karaf-maven-plugin.

I'm using Karaf 4.1.1 and http://karaf.apache.org/xmlns/features/v1.4.0
feature namespace.

Could you help me on this?



--
View this message in context: 
http://karaf.922171.n3.nabble.com/karaf-maven-plugin-feature-verify-and-missing-capabilities-tp4050997.html
Sent from the Karaf - User mailing list archive at Nabble.com.


Re: Features with conditional requirements

2017-07-12 Thread jeremie.bre...@gmail.com
Thanks to your help, I could reproduce my issue : the bundles in my 
 had missing requirements. In this case, the conditional is not 
installed, without errors.

Fixing the missing imports have resolved my issue.

On 2017-07-12 15:20 (+0200), Guillaume Nodet  wrote: 
> The best way is to produce a unit test with a minimal set of features /
> bundles.
> You can see such a test here:
> 
> https://github.com/apache/karaf/blob/master/features/core/src/test/java/org/apache/karaf/features/internal/region/SubsystemTest.java#L191-L210
> with the data:
> 
> https://github.com/apache/karaf/tree/master/features/core/src/test/resources/org/apache/karaf/features/internal/region/data5
> 
> 
> 
> 
> 2017-07-12 14:47 GMT+02:00 jeremie.bre...@gmail.com <
> jeremie.bre...@gmail.com>:
> 
> > Hello,
> >
> > I am playing with conditionals features, but I am not able to do what I
> > want.
> >
> > I have theses features (with Karaf 4.1.1 ):
> >
> > 
> >   
> > req:component.service.faultmanagement
> > mvn:MyUIBundle
> >   
> > 
> >
> > 
> >   ...
> >   
> > component.service.faultmanagement
> >   
> > 
> >
> > When I install "ui" and "faultmanagement", I am expecting "MyUIBundle" to
> > be installed. However, this is not the case.
> >
> > What I am doing wrong ? The resolver code is a bit complicated, how can I
> > debug the behavior of such features ?
> >
> > Regards,
> > Jérémie
> >
> >
> 
> 
> -- 
> 
> Guillaume Nodet
> 


Re: Features with conditional requirements

2017-07-12 Thread Guillaume Nodet
The best way is to produce a unit test with a minimal set of features /
bundles.
You can see such a test here:

https://github.com/apache/karaf/blob/master/features/core/src/test/java/org/apache/karaf/features/internal/region/SubsystemTest.java#L191-L210
with the data:

https://github.com/apache/karaf/tree/master/features/core/src/test/resources/org/apache/karaf/features/internal/region/data5




2017-07-12 14:47 GMT+02:00 jeremie.bre...@gmail.com <
jeremie.bre...@gmail.com>:

> Hello,
>
> I am playing with conditionals features, but I am not able to do what I
> want.
>
> I have theses features (with Karaf 4.1.1 ):
>
> 
>   
> req:component.service.faultmanagement
> mvn:MyUIBundle
>   
> 
>
> 
>   ...
>   
> component.service.faultmanagement
>   
> 
>
> When I install "ui" and "faultmanagement", I am expecting "MyUIBundle" to
> be installed. However, this is not the case.
>
> What I am doing wrong ? The resolver code is a bit complicated, how can I
> debug the behavior of such features ?
>
> Regards,
> Jérémie
>
>


-- 

Guillaume Nodet


Features with conditional requirements

2017-07-12 Thread jeremie.bre...@gmail.com
Hello,

I am playing with conditionals features, but I am not able to do what I want.

I have theses features (with Karaf 4.1.1 ):


  
req:component.service.faultmanagement
mvn:MyUIBundle
  



  ...
  
component.service.faultmanagement
  


When I install "ui" and "faultmanagement", I am expecting "MyUIBundle" to be 
installed. However, this is not the case.

What I am doing wrong ? The resolver code is a bit complicated, how can I debug 
the behavior of such features ?

Regards,
Jérémie