You are viewing a plain text version of this content. The canonical link for it is here.
Posted to user@karaf.apache.org by Christian Lutz <Ch...@kreeloo.de> on 2019/05/16 19:38:56 UTC

Enforce specific bundle?!

Hello,

I am using karat 4.1.7 (jdk8) on Windows 10 and I got in the situation where the bundle start fails because java.xml.bind can be found via two different paths.
The first path is from my own deployed kar file. The other one is provided by the karat itself.

The reason why I have added jaxb-api is one of my required bundles requires jaxb-api in version >=2.3.0 so I added this bundle to the kar file.
If I execute bundle:refresh manually after the karat has been started on jaxb-api 2.3.1 bundle. I am able to start my own bundle.

So my question is how can I enforce that the jaxb-api 2.3.1 bundle will be used and no manual bundle:refresh is necessary anymore.

What I tried so far:
- Removing javax.xml.bind from jre.properties and config.properties -> karat doesn’t even start anymore
- set dependency=„true“ for jab-api within feature.xml (kar source) -> same problem
- change start-level within feature.xml for jaxb-api within feature.xml -> same problem

kind regards 
christian




Re: Enforce specific bundle?!

Posted by Christian Lutz <Ch...@kreeloo.de>.
Good morning JB,

I updated my own distribution. 
I added the new jaxb-api as dependency and changed the jre.properties. 

Thank you for helping. 

kind regards
christian

> Am 17.05.2019 um 07:31 schrieb Jean-Baptiste Onofré <jb...@nanthrax.net>:
> 
> Good morning Christian,
> 
> Yes, updating the Karaf vanilla distro (overriding system folder with
> JAXB 2.3.1 and updating etc/jre.properties), or building your own custom
> one.
> 
> Regards
> JB
> 
>> On 17/05/2019 06:26, Christian Lutz wrote:
>> Good morning JB,
>> 
>> with the karaf-maven-plugin? If so is it enough to add jaxb-api as dependency?
>> 
>> kind regards
>> christian
>> 
>>> Am 17.05.2019 um 05:54 schrieb Jean-Baptiste Onofré <jb...@nanthrax.net>:
>>> 
>>> Hi Christian,
>>> 
>>> Maybe you can upgrade jaxb directly provided by Karaf ?
>>> 
>>> Regards
>>> JB
>>> 
>>>> On 16/05/2019 21:38, Christian Lutz wrote:
>>>> Hello,
>>>> 
>>>> I am using karat 4.1.7 (jdk8) on Windows 10 and I got in the situation where the bundle start fails because java.xml.bind can be found via two different paths.
>>>> The first path is from my own deployed kar file. The other one is provided by the karat itself.
>>>> 
>>>> The reason why I have added jaxb-api is one of my required bundles requires jaxb-api in version >=2.3.0 so I added this bundle to the kar file.
>>>> If I execute bundle:refresh manually after the karat has been started on jaxb-api 2.3.1 bundle. I am able to start my own bundle.
>>>> 
>>>> So my question is how can I enforce that the jaxb-api 2.3.1 bundle will be used and no manual bundle:refresh is necessary anymore.
>>>> 
>>>> What I tried so far:
>>>> - Removing javax.xml.bind from jre.properties and config.properties -> karat doesn’t even start anymore
>>>> - set dependency=„true“ for jab-api within feature.xml (kar source) -> same problem
>>>> - change start-level within feature.xml for jaxb-api within feature.xml -> same problem
>>>> 
>>>> kind regards 
>>>> christian
>>>> 
>>>> 
>>>> 
>>> 
>>> -- 
>>> Jean-Baptiste Onofré
>>> jbonofre@apache.org
>>> http://blog.nanthrax.net
>>> Talend - http://www.talend.com
>> 
> 
> -- 
> Jean-Baptiste Onofré
> jbonofre@apache.org
> http://blog.nanthrax.net
> Talend - http://www.talend.com


Re: Enforce specific bundle?!

Posted by Jean-Baptiste Onofré <jb...@nanthrax.net>.
Good morning Christian,

Yes, updating the Karaf vanilla distro (overriding system folder with
JAXB 2.3.1 and updating etc/jre.properties), or building your own custom
one.

Regards
JB

On 17/05/2019 06:26, Christian Lutz wrote:
> Good morning JB,
> 
> with the karaf-maven-plugin? If so is it enough to add jaxb-api as dependency?
> 
> kind regards
> christian
> 
>> Am 17.05.2019 um 05:54 schrieb Jean-Baptiste Onofré <jb...@nanthrax.net>:
>>
>> Hi Christian,
>>
>> Maybe you can upgrade jaxb directly provided by Karaf ?
>>
>> Regards
>> JB
>>
>> On 16/05/2019 21:38, Christian Lutz wrote:
>>> Hello,
>>>
>>> I am using karat 4.1.7 (jdk8) on Windows 10 and I got in the situation where the bundle start fails because java.xml.bind can be found via two different paths.
>>> The first path is from my own deployed kar file. The other one is provided by the karat itself.
>>>
>>> The reason why I have added jaxb-api is one of my required bundles requires jaxb-api in version >=2.3.0 so I added this bundle to the kar file.
>>> If I execute bundle:refresh manually after the karat has been started on jaxb-api 2.3.1 bundle. I am able to start my own bundle.
>>>
>>> So my question is how can I enforce that the jaxb-api 2.3.1 bundle will be used and no manual bundle:refresh is necessary anymore.
>>>
>>> What I tried so far:
>>> - Removing javax.xml.bind from jre.properties and config.properties -> karat doesn’t even start anymore
>>> - set dependency=„true“ for jab-api within feature.xml (kar source) -> same problem
>>> - change start-level within feature.xml for jaxb-api within feature.xml -> same problem
>>>
>>> kind regards 
>>> christian
>>>
>>>
>>>
>>
>> -- 
>> Jean-Baptiste Onofré
>> jbonofre@apache.org
>> http://blog.nanthrax.net
>> Talend - http://www.talend.com
> 

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

Re: Enforce specific bundle?!

Posted by Christian Lutz <Ch...@kreeloo.de>.
Good morning JB,

with the karaf-maven-plugin? If so is it enough to add jaxb-api as dependency?

kind regards
christian

> Am 17.05.2019 um 05:54 schrieb Jean-Baptiste Onofré <jb...@nanthrax.net>:
> 
> Hi Christian,
> 
> Maybe you can upgrade jaxb directly provided by Karaf ?
> 
> Regards
> JB
> 
> On 16/05/2019 21:38, Christian Lutz wrote:
>> Hello,
>> 
>> I am using karat 4.1.7 (jdk8) on Windows 10 and I got in the situation where the bundle start fails because java.xml.bind can be found via two different paths.
>> The first path is from my own deployed kar file. The other one is provided by the karat itself.
>> 
>> The reason why I have added jaxb-api is one of my required bundles requires jaxb-api in version >=2.3.0 so I added this bundle to the kar file.
>> If I execute bundle:refresh manually after the karat has been started on jaxb-api 2.3.1 bundle. I am able to start my own bundle.
>> 
>> So my question is how can I enforce that the jaxb-api 2.3.1 bundle will be used and no manual bundle:refresh is necessary anymore.
>> 
>> What I tried so far:
>> - Removing javax.xml.bind from jre.properties and config.properties -> karat doesn’t even start anymore
>> - set dependency=„true“ for jab-api within feature.xml (kar source) -> same problem
>> - change start-level within feature.xml for jaxb-api within feature.xml -> same problem
>> 
>> kind regards 
>> christian
>> 
>> 
>> 
> 
> -- 
> Jean-Baptiste Onofré
> jbonofre@apache.org
> http://blog.nanthrax.net
> Talend - http://www.talend.com


Re: Enforce specific bundle?!

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

Maybe you can upgrade jaxb directly provided by Karaf ?

Regards
JB

On 16/05/2019 21:38, Christian Lutz wrote:
> Hello,
> 
> I am using karat 4.1.7 (jdk8) on Windows 10 and I got in the situation where the bundle start fails because java.xml.bind can be found via two different paths.
> The first path is from my own deployed kar file. The other one is provided by the karat itself.
> 
> The reason why I have added jaxb-api is one of my required bundles requires jaxb-api in version >=2.3.0 so I added this bundle to the kar file.
> If I execute bundle:refresh manually after the karat has been started on jaxb-api 2.3.1 bundle. I am able to start my own bundle.
> 
> So my question is how can I enforce that the jaxb-api 2.3.1 bundle will be used and no manual bundle:refresh is necessary anymore.
> 
> What I tried so far:
> - Removing javax.xml.bind from jre.properties and config.properties -> karat doesn’t even start anymore
> - set dependency=„true“ for jab-api within feature.xml (kar source) -> same problem
> - change start-level within feature.xml for jaxb-api within feature.xml -> same problem
> 
> kind regards 
> christian
> 
> 
> 

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