You are viewing a plain text version of this content. The canonical link for it is here.
Posted to user@karaf.apache.org by stefang <st...@me.com> on 2020/01/12 18:07:10 UTC

Re: Any chance to get feature jdbc in a static distribution based on 4.2.6 ?

Hi JB,

is this issue fixed in 4.2.8 via KARAF-6498 ?

Regards

Stefan




jbonofre wrote
> Hi,
> 
> We changed staticcm recently, so that's why I would like to test on
> 4.2.8-SNAPSHOT. Especially, we did a fix for listener/SCR in staticcm.
> 
> Regards
> JB
> 
> On 30/12/2019 21:09, stefang wrote:
>> Hi,
>> 
>> perhaps this helps to find the root cause of the issue.
>> 
>> Must be something todo with:
>> 
>> org.apache.karaf.services.staticcm 
>> 
>> in Version 4.2.8-SNAPSHOT
>> 
>> We think the new pax jdbc version is not the problem.
>> 
>> If we activate the "old" staticcm bundle from 4.2.6 in Version
>> 4.2.8-SNAPSHOT then the Datasource from config comes up without problems. 
>> But this is a extrem dirty hack ....
>> 
>> Regards 
>> 
>> Stefan 
>> 
>> 
>> 
>> 
>> jbonofre wrote
>>> Hi,
>>>
>>> I will try with 4.2.8-SNAPSHOT as it upgraded to a new pax jdbc version
>>> including fixes.
>>>
>>> About the example, actually, I created a Jira to add both static and
>>> dynamic packages (and Dockerfile generationà in any example.
>>> Not sure I will have time to do that for 4.2.8, but I will try.
>>>
>>> Regards
>>> JB
>>>
>>> On 29/12/2019 15:44, stefang wrote:
>>>> Hi JB,
>>>>
>>>> as a hint:
>>>>
>>>> We found a way to get it working on Karaf 4.2.6 
>>>>
>>>> The trick is to 
>>>>
>>>>
>>> 
> <blacklistedFeatures>
>>>>
>>>>                       
>>> 
> <blacklistFeature>
>>> jdbc
>>> 
> </blacklistFeature>
>>>>
>>>>
>>> 
> </blacklistedFeatures>
>>>>
>>>> in the configuration and put these two bundles in startupBundles
>>>> Section
>>>>
>>>>
>>>>
>>> 
> <startupBundle>
>>> mvn:org.apache.karaf.jdbc/org.apache.karaf.jdbc.core/${karaf.version}
>>> 
> </startupBundle>
>>>>  
>>> 
> <startupBundle>
>>> mvn:org.osgi/org.osgi.service.jdbc/1.0.0
>>> 
> </startupBundle>
>>>>
>>>> Build runs without Errors, Distribution goes to target and the
>>>> Datasource
>>>> (Derby) comes up. Example is usable.
>>>>
>>>> So we tried this on 4.2.8-SNAPSHOT but without any luck.
>>>>
>>>> There the datasourceFactory comes up but the Datasource from Config not
>>>> and
>>>> we have no idea what's going on with this. 
>>>>
>>>>
>>>> Regards
>>>>
>>>> Stefan
>>>>
>>>>
>>>>
>>>> stefang wrote
>>>>> Hi,
>>>>>
>>>>> it would be great if we can run this reference-example under static
>>>>> distribution build ... 
>>>>>
>>>>> https://github.com/apache/karaf/tree/karaf-4.2.x/examples/karaf-jdbc-example
>>>>>
>>>>> Regards
>>>>>
>>>>> Stefan
>>>>>
>>>>>
>>>>>
>>>>>
>>>>> stefang wrote
>>>>>> Hi JB,
>>>>>>
>>>>>> thanks a lot.
>>>>>>
>>>>>> Regards
>>>>>>
>>>>>> Stefan
>>>>>>
>>>>>>
>>>>>>
>>>>>> jbonofre wrote
>>>>>>> By the way, I created
>>>>>>> https://issues.apache.org/jira/browse/KARAF-6573
>>>>>>> for the tracking.
>>>>>>>
>>>>>>> Regards
>>>>>>> JB
>>>>>>>
>>>>>>> On 29/12/2019 07:23, Jean-Baptiste Onofré wrote:
>>>>>>>> Hi,
>>>>>>>>
>>>>>>>> I'm adding this test + eventual fix for 4.2.8.
>>>>>>>>
>>>>>>>> Regards
>>>>>>>> JB
>>>>>>>>
>>>>>>>> On 28/12/2019 17:13, stefang wrote:
>>>>>>>>> Hi,
>>>>>>>>>
>>>>>>>>> still failed with static distribution and feature jdbc.
>>>>>>>>> Any workaround? 
>>>>>>>>> This showstopped us to go further on with static-distribution and
>>>>>>>>> docker
>>>>>>>>> integration.
>>>>>>>>>
>>>>>>>>> Stefan 
>>>>>>>>>
>>>>>>>>>
>>>>>>>>>
>>>>>>>>>
>>>>>>>>>
>>>>>>>>> --
>>>>>>>>> Sent from:
>>>>>>>>> http://karaf.922171.n3.nabble.com/Karaf-User-f930749.html
>>>>>>>>>
>>>>>>>>
>>>>>>>
>>>>>>> -- 
>>>>>>> Jean-Baptiste Onofré
>>>>>>
>>>>>>> jbonofre@
>>>>>>
>>>>>>> http://blog.nanthrax.net
>>>>>>> Talend - http://www.talend.com
>>>>>>
>>>>>>
>>>>>>
>>>>>>
>>>>>>
>>>>>> --
>>>>>> Sent from: http://karaf.922171.n3.nabble.com/Karaf-User-f930749.html
>>>>>
>>>>>
>>>>>
>>>>>
>>>>>
>>>>> --
>>>>> Sent from: http://karaf.922171.n3.nabble.com/Karaf-User-f930749.html
>>>>
>>>>
>>>>
>>>>
>>>>
>>>> --
>>>> Sent from: http://karaf.922171.n3.nabble.com/Karaf-User-f930749.html
>>>>
>>>
>>> -- 
>>> Jean-Baptiste Onofré
>> 
>>> jbonofre@
>> 
>>> http://blog.nanthrax.net
>>> Talend - http://www.talend.com
>> 
>> 
>> 
>> 
>> 
>> --
>> Sent from: http://karaf.922171.n3.nabble.com/Karaf-User-f930749.html
>> 
> 
> -- 
> Jean-Baptiste Onofré

> jbonofre@

> http://blog.nanthrax.net
> Talend - http://www.talend.com





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

Re: Any chance to get feature jdbc in a static distribution based on 4.2.6 ?

Posted by Jean-Baptiste Onofré <jb...@nanthrax.net>.
Hi Stefan,

can you elaborate a bit ?

What do you mean "base" problem and what's the workaround ? Removing the
prerequisite flag ?

About staticcm, we did a fix to work with SCR. It's maybe related. How
do you provision org.ops4j.datasource-xxx config ?

If you can provide some details to me, it would help me to understand
your issue.

Thanks
Regards
JB

On 13/01/2020 10:15, stefang wrote:
> Hi JB,
> 
> that's the "base" Problem and we found a workaround for that but i think
> staticcm (in actual implementation) has a problem to initialize the
> datasource. So it could be that the JDBC reference example didn't work on
> 4.2.8 without going back to staticcm 4.2.6 in static distribution.
> 
> Regards 
> Stefan
> 
> 
> 
> jbonofre wrote
>> Hi Stefan,
>>
>> No, it will be fixed in 4.2.9/4.3.0.
>>
>> The problem is in the resolver: as jdbc feature has prerequisite flag on
>> pax-jdbc, the Builder resolves as "earlier" prerequisite, so even before
>> the framework/static-framework feature.
>> When you use jdbc as boot feature in dynamic distribution, it works
>> because the resolution is made after the startup features.
>> In the case of static distribution, as you put all in startup feature,
>> the resolution is global to the stage.
>>
>> The fix is to define framework/static-framework before any other
>> features, as the first stage of startupFeature.
>> See https://issues.apache.org/jira/browse/KARAF-6577.
>>
>> So, I'm working on a fix, we will be able to use karaf-maven-plugin
>> 4.2.9-SNAPSHOT even if your dependencies are from 4.2.8.
>>
>> A possible workaround is just to remove the prerequisite flag (but as
>> it's in Karaf, it means you have to hack the features XML directly which
>> is not good).
>>
>> I should have a fix for middle of next week. I didn't want to hold 4.2.8
>> longer, I can cut a 4.2.9 quickly with the fix.
>>
>> Regards
>> JB
>>
>> On 12/01/2020 19:07, stefang wrote:
>>> Hi JB,
>>>
>>> is this issue fixed in 4.2.8 via KARAF-6498 ?
>>>
>>> Regards
>>>
>>> Stefan
>>>
>>>
>>>
>>>
>>> jbonofre wrote
>>>> Hi,
>>>>
>>>> We changed staticcm recently, so that's why I would like to test on
>>>> 4.2.8-SNAPSHOT. Especially, we did a fix for listener/SCR in staticcm.
>>>>
>>>> Regards
>>>> JB
>>>>
>>>> On 30/12/2019 21:09, stefang wrote:
>>>>> Hi,
>>>>>
>>>>> perhaps this helps to find the root cause of the issue.
>>>>>
>>>>> Must be something todo with:
>>>>>
>>>>> org.apache.karaf.services.staticcm 
>>>>>
>>>>> in Version 4.2.8-SNAPSHOT
>>>>>
>>>>> We think the new pax jdbc version is not the problem.
>>>>>
>>>>> If we activate the "old" staticcm bundle from 4.2.6 in Version
>>>>> 4.2.8-SNAPSHOT then the Datasource from config comes up without
>>>>> problems. 
>>>>> But this is a extrem dirty hack ....
>>>>>
>>>>> Regards 
>>>>>
>>>>> Stefan 
>>>>>
>>>>>
>>>>>
>>>>>
>>>>> jbonofre wrote
>>>>>> Hi,
>>>>>>
>>>>>> I will try with 4.2.8-SNAPSHOT as it upgraded to a new pax jdbc
>>>>>> version
>>>>>> including fixes.
>>>>>>
>>>>>> About the example, actually, I created a Jira to add both static and
>>>>>> dynamic packages (and Dockerfile generationà in any example.
>>>>>> Not sure I will have time to do that for 4.2.8, but I will try.
>>>>>>
>>>>>> Regards
>>>>>> JB
>>>>>>
>>>>>> On 29/12/2019 15:44, stefang wrote:
>>>>>>> Hi JB,
>>>>>>>
>>>>>>> as a hint:
>>>>>>>
>>>>>>> We found a way to get it working on Karaf 4.2.6 
>>>>>>>
>>>>>>> The trick is to 
>>>>>>>
>>>>>>>
>>>>>>
>>>>
>> <blacklistedFeatures>
>>>>>>>
>>>>>>>                       
>>>>>>
>>>>
>> <blacklistFeature>
>>>>>> jdbc
>>>>>>
>>>>
>> </blacklistFeature>
>>>>>>>
>>>>>>>
>>>>>>
>>>>
>> </blacklistedFeatures>
>>>>>>>
>>>>>>> in the configuration and put these two bundles in startupBundles
>>>>>>> Section
>>>>>>>
>>>>>>>
>>>>>>>
>>>>>>
>>>>
>> <startupBundle>
>>>>>> mvn:org.apache.karaf.jdbc/org.apache.karaf.jdbc.core/${karaf.version}
>>>>>>
>>>>
>> </startupBundle>
>>>>>>>  
>>>>>>
>>>>
>> <startupBundle>
>>>>>> mvn:org.osgi/org.osgi.service.jdbc/1.0.0
>>>>>>
>>>>
>> </startupBundle>
>>>>>>>
>>>>>>> Build runs without Errors, Distribution goes to target and the
>>>>>>> Datasource
>>>>>>> (Derby) comes up. Example is usable.
>>>>>>>
>>>>>>> So we tried this on 4.2.8-SNAPSHOT but without any luck.
>>>>>>>
>>>>>>> There the datasourceFactory comes up but the Datasource from Config
>>>>>>> not
>>>>>>> and
>>>>>>> we have no idea what's going on with this. 
>>>>>>>
>>>>>>>
>>>>>>> Regards
>>>>>>>
>>>>>>> Stefan
>>>>>>>
>>>>>>>
>>>>>>>
>>>>>>> stefang wrote
>>>>>>>> Hi,
>>>>>>>>
>>>>>>>> it would be great if we can run this reference-example under static
>>>>>>>> distribution build ... 
>>>>>>>>
>>>>>>>> https://github.com/apache/karaf/tree/karaf-4.2.x/examples/karaf-jdbc-example
>>>>>>>>
>>>>>>>> Regards
>>>>>>>>
>>>>>>>> Stefan
>>>>>>>>
>>>>>>>>
>>>>>>>>
>>>>>>>>
>>>>>>>> stefang wrote
>>>>>>>>> Hi JB,
>>>>>>>>>
>>>>>>>>> thanks a lot.
>>>>>>>>>
>>>>>>>>> Regards
>>>>>>>>>
>>>>>>>>> Stefan
>>>>>>>>>
>>>>>>>>>
>>>>>>>>>
>>>>>>>>> jbonofre wrote
>>>>>>>>>> By the way, I created
>>>>>>>>>> https://issues.apache.org/jira/browse/KARAF-6573
>>>>>>>>>> for the tracking.
>>>>>>>>>>
>>>>>>>>>> Regards
>>>>>>>>>> JB
>>>>>>>>>>
>>>>>>>>>> On 29/12/2019 07:23, Jean-Baptiste Onofré wrote:
>>>>>>>>>>> Hi,
>>>>>>>>>>>
>>>>>>>>>>> I'm adding this test + eventual fix for 4.2.8.
>>>>>>>>>>>
>>>>>>>>>>> Regards
>>>>>>>>>>> JB
>>>>>>>>>>>
>>>>>>>>>>> On 28/12/2019 17:13, stefang wrote:
>>>>>>>>>>>> Hi,
>>>>>>>>>>>>
>>>>>>>>>>>> still failed with static distribution and feature jdbc.
>>>>>>>>>>>> Any workaround? 
>>>>>>>>>>>> This showstopped us to go further on with static-distribution
>>>>>>>>>>>> and
>>>>>>>>>>>> docker
>>>>>>>>>>>> integration.
>>>>>>>>>>>>
>>>>>>>>>>>> Stefan 
>>>>>>>>>>>>
>>>>>>>>>>>>
>>>>>>>>>>>>
>>>>>>>>>>>>
>>>>>>>>>>>>
>>>>>>>>>>>> --
>>>>>>>>>>>> Sent from:
>>>>>>>>>>>> http://karaf.922171.n3.nabble.com/Karaf-User-f930749.html
>>>>>>>>>>>>
>>>>>>>>>>>
>>>>>>>>>>
>>>>>>>>>> -- 
>>>>>>>>>> Jean-Baptiste Onofré
>>>>>>>>>
>>>>>>>>>> jbonofre@
>>>>>>>>>
>>>>>>>>>> http://blog.nanthrax.net
>>>>>>>>>> Talend - http://www.talend.com
>>>>>>>>>
>>>>>>>>>
>>>>>>>>>
>>>>>>>>>
>>>>>>>>>
>>>>>>>>> --
>>>>>>>>> Sent from:
>>>>>>>>> http://karaf.922171.n3.nabble.com/Karaf-User-f930749.html
>>>>>>>>
>>>>>>>>
>>>>>>>>
>>>>>>>>
>>>>>>>>
>>>>>>>> --
>>>>>>>> Sent from: http://karaf.922171.n3.nabble.com/Karaf-User-f930749.html
>>>>>>>
>>>>>>>
>>>>>>>
>>>>>>>
>>>>>>>
>>>>>>> --
>>>>>>> Sent from: http://karaf.922171.n3.nabble.com/Karaf-User-f930749.html
>>>>>>>
>>>>>>
>>>>>> -- 
>>>>>> Jean-Baptiste Onofré
>>>>>
>>>>>> jbonofre@
>>>>>
>>>>>> http://blog.nanthrax.net
>>>>>> Talend - http://www.talend.com
>>>>>
>>>>>
>>>>>
>>>>>
>>>>>
>>>>> --
>>>>> Sent from: http://karaf.922171.n3.nabble.com/Karaf-User-f930749.html
>>>>>
>>>>
>>>> -- 
>>>> Jean-Baptiste Onofré
>>>
>>>> jbonofre@
>>>
>>>> http://blog.nanthrax.net
>>>> Talend - http://www.talend.com
>>>
>>>
>>>
>>>
>>>
>>> --
>>> Sent from: http://karaf.922171.n3.nabble.com/Karaf-User-f930749.html
>>>
>>
>> -- 
>> Jean-Baptiste Onofré
> 
>> jbonofre@
> 
>> http://blog.nanthrax.net
>> Talend - http://www.talend.com
> 
> 
> 
> 
> 
> --
> Sent from: http://karaf.922171.n3.nabble.com/Karaf-User-f930749.html
> 

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

Re: Any chance to get feature jdbc in a static distribution based on 4.2.6 ?

Posted by stefang <st...@me.com>.
Hi JB,

that's the "base" Problem and we found a workaround for that but i think
staticcm (in actual implementation) has a problem to initialize the
datasource. So it could be that the JDBC reference example didn't work on
4.2.8 without going back to staticcm 4.2.6 in static distribution.

Regards 
Stefan



jbonofre wrote
> Hi Stefan,
> 
> No, it will be fixed in 4.2.9/4.3.0.
> 
> The problem is in the resolver: as jdbc feature has prerequisite flag on
> pax-jdbc, the Builder resolves as "earlier" prerequisite, so even before
> the framework/static-framework feature.
> When you use jdbc as boot feature in dynamic distribution, it works
> because the resolution is made after the startup features.
> In the case of static distribution, as you put all in startup feature,
> the resolution is global to the stage.
> 
> The fix is to define framework/static-framework before any other
> features, as the first stage of startupFeature.
> See https://issues.apache.org/jira/browse/KARAF-6577.
> 
> So, I'm working on a fix, we will be able to use karaf-maven-plugin
> 4.2.9-SNAPSHOT even if your dependencies are from 4.2.8.
> 
> A possible workaround is just to remove the prerequisite flag (but as
> it's in Karaf, it means you have to hack the features XML directly which
> is not good).
> 
> I should have a fix for middle of next week. I didn't want to hold 4.2.8
> longer, I can cut a 4.2.9 quickly with the fix.
> 
> Regards
> JB
> 
> On 12/01/2020 19:07, stefang wrote:
>> Hi JB,
>> 
>> is this issue fixed in 4.2.8 via KARAF-6498 ?
>> 
>> Regards
>> 
>> Stefan
>> 
>> 
>> 
>> 
>> jbonofre wrote
>>> Hi,
>>>
>>> We changed staticcm recently, so that's why I would like to test on
>>> 4.2.8-SNAPSHOT. Especially, we did a fix for listener/SCR in staticcm.
>>>
>>> Regards
>>> JB
>>>
>>> On 30/12/2019 21:09, stefang wrote:
>>>> Hi,
>>>>
>>>> perhaps this helps to find the root cause of the issue.
>>>>
>>>> Must be something todo with:
>>>>
>>>> org.apache.karaf.services.staticcm 
>>>>
>>>> in Version 4.2.8-SNAPSHOT
>>>>
>>>> We think the new pax jdbc version is not the problem.
>>>>
>>>> If we activate the "old" staticcm bundle from 4.2.6 in Version
>>>> 4.2.8-SNAPSHOT then the Datasource from config comes up without
>>>> problems. 
>>>> But this is a extrem dirty hack ....
>>>>
>>>> Regards 
>>>>
>>>> Stefan 
>>>>
>>>>
>>>>
>>>>
>>>> jbonofre wrote
>>>>> Hi,
>>>>>
>>>>> I will try with 4.2.8-SNAPSHOT as it upgraded to a new pax jdbc
>>>>> version
>>>>> including fixes.
>>>>>
>>>>> About the example, actually, I created a Jira to add both static and
>>>>> dynamic packages (and Dockerfile generationà in any example.
>>>>> Not sure I will have time to do that for 4.2.8, but I will try.
>>>>>
>>>>> Regards
>>>>> JB
>>>>>
>>>>> On 29/12/2019 15:44, stefang wrote:
>>>>>> Hi JB,
>>>>>>
>>>>>> as a hint:
>>>>>>
>>>>>> We found a way to get it working on Karaf 4.2.6 
>>>>>>
>>>>>> The trick is to 
>>>>>>
>>>>>>
>>>>>
>>> 
> <blacklistedFeatures>
>>>>>>
>>>>>>                       
>>>>>
>>> 
> <blacklistFeature>
>>>>> jdbc
>>>>>
>>> 
> </blacklistFeature>
>>>>>>
>>>>>>
>>>>>
>>> 
> </blacklistedFeatures>
>>>>>>
>>>>>> in the configuration and put these two bundles in startupBundles
>>>>>> Section
>>>>>>
>>>>>>
>>>>>>
>>>>>
>>> 
> <startupBundle>
>>>>> mvn:org.apache.karaf.jdbc/org.apache.karaf.jdbc.core/${karaf.version}
>>>>>
>>> 
> </startupBundle>
>>>>>>  
>>>>>
>>> 
> <startupBundle>
>>>>> mvn:org.osgi/org.osgi.service.jdbc/1.0.0
>>>>>
>>> 
> </startupBundle>
>>>>>>
>>>>>> Build runs without Errors, Distribution goes to target and the
>>>>>> Datasource
>>>>>> (Derby) comes up. Example is usable.
>>>>>>
>>>>>> So we tried this on 4.2.8-SNAPSHOT but without any luck.
>>>>>>
>>>>>> There the datasourceFactory comes up but the Datasource from Config
>>>>>> not
>>>>>> and
>>>>>> we have no idea what's going on with this. 
>>>>>>
>>>>>>
>>>>>> Regards
>>>>>>
>>>>>> Stefan
>>>>>>
>>>>>>
>>>>>>
>>>>>> stefang wrote
>>>>>>> Hi,
>>>>>>>
>>>>>>> it would be great if we can run this reference-example under static
>>>>>>> distribution build ... 
>>>>>>>
>>>>>>> https://github.com/apache/karaf/tree/karaf-4.2.x/examples/karaf-jdbc-example
>>>>>>>
>>>>>>> Regards
>>>>>>>
>>>>>>> Stefan
>>>>>>>
>>>>>>>
>>>>>>>
>>>>>>>
>>>>>>> stefang wrote
>>>>>>>> Hi JB,
>>>>>>>>
>>>>>>>> thanks a lot.
>>>>>>>>
>>>>>>>> Regards
>>>>>>>>
>>>>>>>> Stefan
>>>>>>>>
>>>>>>>>
>>>>>>>>
>>>>>>>> jbonofre wrote
>>>>>>>>> By the way, I created
>>>>>>>>> https://issues.apache.org/jira/browse/KARAF-6573
>>>>>>>>> for the tracking.
>>>>>>>>>
>>>>>>>>> Regards
>>>>>>>>> JB
>>>>>>>>>
>>>>>>>>> On 29/12/2019 07:23, Jean-Baptiste Onofré wrote:
>>>>>>>>>> Hi,
>>>>>>>>>>
>>>>>>>>>> I'm adding this test + eventual fix for 4.2.8.
>>>>>>>>>>
>>>>>>>>>> Regards
>>>>>>>>>> JB
>>>>>>>>>>
>>>>>>>>>> On 28/12/2019 17:13, stefang wrote:
>>>>>>>>>>> Hi,
>>>>>>>>>>>
>>>>>>>>>>> still failed with static distribution and feature jdbc.
>>>>>>>>>>> Any workaround? 
>>>>>>>>>>> This showstopped us to go further on with static-distribution
>>>>>>>>>>> and
>>>>>>>>>>> docker
>>>>>>>>>>> integration.
>>>>>>>>>>>
>>>>>>>>>>> Stefan 
>>>>>>>>>>>
>>>>>>>>>>>
>>>>>>>>>>>
>>>>>>>>>>>
>>>>>>>>>>>
>>>>>>>>>>> --
>>>>>>>>>>> Sent from:
>>>>>>>>>>> http://karaf.922171.n3.nabble.com/Karaf-User-f930749.html
>>>>>>>>>>>
>>>>>>>>>>
>>>>>>>>>
>>>>>>>>> -- 
>>>>>>>>> Jean-Baptiste Onofré
>>>>>>>>
>>>>>>>>> jbonofre@
>>>>>>>>
>>>>>>>>> http://blog.nanthrax.net
>>>>>>>>> Talend - http://www.talend.com
>>>>>>>>
>>>>>>>>
>>>>>>>>
>>>>>>>>
>>>>>>>>
>>>>>>>> --
>>>>>>>> Sent from:
>>>>>>>> http://karaf.922171.n3.nabble.com/Karaf-User-f930749.html
>>>>>>>
>>>>>>>
>>>>>>>
>>>>>>>
>>>>>>>
>>>>>>> --
>>>>>>> Sent from: http://karaf.922171.n3.nabble.com/Karaf-User-f930749.html
>>>>>>
>>>>>>
>>>>>>
>>>>>>
>>>>>>
>>>>>> --
>>>>>> Sent from: http://karaf.922171.n3.nabble.com/Karaf-User-f930749.html
>>>>>>
>>>>>
>>>>> -- 
>>>>> Jean-Baptiste Onofré
>>>>
>>>>> jbonofre@
>>>>
>>>>> http://blog.nanthrax.net
>>>>> Talend - http://www.talend.com
>>>>
>>>>
>>>>
>>>>
>>>>
>>>> --
>>>> Sent from: http://karaf.922171.n3.nabble.com/Karaf-User-f930749.html
>>>>
>>>
>>> -- 
>>> Jean-Baptiste Onofré
>> 
>>> jbonofre@
>> 
>>> http://blog.nanthrax.net
>>> Talend - http://www.talend.com
>> 
>> 
>> 
>> 
>> 
>> --
>> Sent from: http://karaf.922171.n3.nabble.com/Karaf-User-f930749.html
>> 
> 
> -- 
> Jean-Baptiste Onofré

> jbonofre@

> http://blog.nanthrax.net
> Talend - http://www.talend.com





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

Re: Any chance to get feature jdbc in a static distribution based on 4.2.6 ?

Posted by Jean-Baptiste Onofré <jb...@nanthrax.net>.
Hi Stefan,

No, it will be fixed in 4.2.9/4.3.0.

The problem is in the resolver: as jdbc feature has prerequisite flag on
pax-jdbc, the Builder resolves as "earlier" prerequisite, so even before
the framework/static-framework feature.
When you use jdbc as boot feature in dynamic distribution, it works
because the resolution is made after the startup features.
In the case of static distribution, as you put all in startup feature,
the resolution is global to the stage.

The fix is to define framework/static-framework before any other
features, as the first stage of startupFeature.
See https://issues.apache.org/jira/browse/KARAF-6577.

So, I'm working on a fix, we will be able to use karaf-maven-plugin
4.2.9-SNAPSHOT even if your dependencies are from 4.2.8.

A possible workaround is just to remove the prerequisite flag (but as
it's in Karaf, it means you have to hack the features XML directly which
is not good).

I should have a fix for middle of next week. I didn't want to hold 4.2.8
longer, I can cut a 4.2.9 quickly with the fix.

Regards
JB

On 12/01/2020 19:07, stefang wrote:
> Hi JB,
> 
> is this issue fixed in 4.2.8 via KARAF-6498 ?
> 
> Regards
> 
> Stefan
> 
> 
> 
> 
> jbonofre wrote
>> Hi,
>>
>> We changed staticcm recently, so that's why I would like to test on
>> 4.2.8-SNAPSHOT. Especially, we did a fix for listener/SCR in staticcm.
>>
>> Regards
>> JB
>>
>> On 30/12/2019 21:09, stefang wrote:
>>> Hi,
>>>
>>> perhaps this helps to find the root cause of the issue.
>>>
>>> Must be something todo with:
>>>
>>> org.apache.karaf.services.staticcm 
>>>
>>> in Version 4.2.8-SNAPSHOT
>>>
>>> We think the new pax jdbc version is not the problem.
>>>
>>> If we activate the "old" staticcm bundle from 4.2.6 in Version
>>> 4.2.8-SNAPSHOT then the Datasource from config comes up without problems. 
>>> But this is a extrem dirty hack ....
>>>
>>> Regards 
>>>
>>> Stefan 
>>>
>>>
>>>
>>>
>>> jbonofre wrote
>>>> Hi,
>>>>
>>>> I will try with 4.2.8-SNAPSHOT as it upgraded to a new pax jdbc version
>>>> including fixes.
>>>>
>>>> About the example, actually, I created a Jira to add both static and
>>>> dynamic packages (and Dockerfile generationà in any example.
>>>> Not sure I will have time to do that for 4.2.8, but I will try.
>>>>
>>>> Regards
>>>> JB
>>>>
>>>> On 29/12/2019 15:44, stefang wrote:
>>>>> Hi JB,
>>>>>
>>>>> as a hint:
>>>>>
>>>>> We found a way to get it working on Karaf 4.2.6 
>>>>>
>>>>> The trick is to 
>>>>>
>>>>>
>>>>
>> <blacklistedFeatures>
>>>>>
>>>>>                       
>>>>
>> <blacklistFeature>
>>>> jdbc
>>>>
>> </blacklistFeature>
>>>>>
>>>>>
>>>>
>> </blacklistedFeatures>
>>>>>
>>>>> in the configuration and put these two bundles in startupBundles
>>>>> Section
>>>>>
>>>>>
>>>>>
>>>>
>> <startupBundle>
>>>> mvn:org.apache.karaf.jdbc/org.apache.karaf.jdbc.core/${karaf.version}
>>>>
>> </startupBundle>
>>>>>  
>>>>
>> <startupBundle>
>>>> mvn:org.osgi/org.osgi.service.jdbc/1.0.0
>>>>
>> </startupBundle>
>>>>>
>>>>> Build runs without Errors, Distribution goes to target and the
>>>>> Datasource
>>>>> (Derby) comes up. Example is usable.
>>>>>
>>>>> So we tried this on 4.2.8-SNAPSHOT but without any luck.
>>>>>
>>>>> There the datasourceFactory comes up but the Datasource from Config not
>>>>> and
>>>>> we have no idea what's going on with this. 
>>>>>
>>>>>
>>>>> Regards
>>>>>
>>>>> Stefan
>>>>>
>>>>>
>>>>>
>>>>> stefang wrote
>>>>>> Hi,
>>>>>>
>>>>>> it would be great if we can run this reference-example under static
>>>>>> distribution build ... 
>>>>>>
>>>>>> https://github.com/apache/karaf/tree/karaf-4.2.x/examples/karaf-jdbc-example
>>>>>>
>>>>>> Regards
>>>>>>
>>>>>> Stefan
>>>>>>
>>>>>>
>>>>>>
>>>>>>
>>>>>> stefang wrote
>>>>>>> Hi JB,
>>>>>>>
>>>>>>> thanks a lot.
>>>>>>>
>>>>>>> Regards
>>>>>>>
>>>>>>> Stefan
>>>>>>>
>>>>>>>
>>>>>>>
>>>>>>> jbonofre wrote
>>>>>>>> By the way, I created
>>>>>>>> https://issues.apache.org/jira/browse/KARAF-6573
>>>>>>>> for the tracking.
>>>>>>>>
>>>>>>>> Regards
>>>>>>>> JB
>>>>>>>>
>>>>>>>> On 29/12/2019 07:23, Jean-Baptiste Onofré wrote:
>>>>>>>>> Hi,
>>>>>>>>>
>>>>>>>>> I'm adding this test + eventual fix for 4.2.8.
>>>>>>>>>
>>>>>>>>> Regards
>>>>>>>>> JB
>>>>>>>>>
>>>>>>>>> On 28/12/2019 17:13, stefang wrote:
>>>>>>>>>> Hi,
>>>>>>>>>>
>>>>>>>>>> still failed with static distribution and feature jdbc.
>>>>>>>>>> Any workaround? 
>>>>>>>>>> This showstopped us to go further on with static-distribution and
>>>>>>>>>> docker
>>>>>>>>>> integration.
>>>>>>>>>>
>>>>>>>>>> Stefan 
>>>>>>>>>>
>>>>>>>>>>
>>>>>>>>>>
>>>>>>>>>>
>>>>>>>>>>
>>>>>>>>>> --
>>>>>>>>>> Sent from:
>>>>>>>>>> http://karaf.922171.n3.nabble.com/Karaf-User-f930749.html
>>>>>>>>>>
>>>>>>>>>
>>>>>>>>
>>>>>>>> -- 
>>>>>>>> Jean-Baptiste Onofré
>>>>>>>
>>>>>>>> jbonofre@
>>>>>>>
>>>>>>>> http://blog.nanthrax.net
>>>>>>>> Talend - http://www.talend.com
>>>>>>>
>>>>>>>
>>>>>>>
>>>>>>>
>>>>>>>
>>>>>>> --
>>>>>>> Sent from: http://karaf.922171.n3.nabble.com/Karaf-User-f930749.html
>>>>>>
>>>>>>
>>>>>>
>>>>>>
>>>>>>
>>>>>> --
>>>>>> Sent from: http://karaf.922171.n3.nabble.com/Karaf-User-f930749.html
>>>>>
>>>>>
>>>>>
>>>>>
>>>>>
>>>>> --
>>>>> Sent from: http://karaf.922171.n3.nabble.com/Karaf-User-f930749.html
>>>>>
>>>>
>>>> -- 
>>>> Jean-Baptiste Onofré
>>>
>>>> jbonofre@
>>>
>>>> http://blog.nanthrax.net
>>>> Talend - http://www.talend.com
>>>
>>>
>>>
>>>
>>>
>>> --
>>> Sent from: http://karaf.922171.n3.nabble.com/Karaf-User-f930749.html
>>>
>>
>> -- 
>> Jean-Baptiste Onofré
> 
>> jbonofre@
> 
>> http://blog.nanthrax.net
>> Talend - http://www.talend.com
> 
> 
> 
> 
> 
> --
> Sent from: http://karaf.922171.n3.nabble.com/Karaf-User-f930749.html
> 

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