Yeah, your solution is fine and it’s a good idea (we basically did the same in 
Unomi). Kudo for sharing !

My point is that it needs change in the Karaf distribution configuration. So, 
the purpose is to have something easier for users, out of the box ;)

Thanks again for sharing,
Regards
JB

> Le 29 avr. 2020 à 08:26, Siano, Stephan <[email protected]> a écrit :
> 
> Hi Jean-Baptiste,
> 
> Yes, I did overlook that mail and I think that this is really good news. 
> 
> As this may require modifications in the interface if it uses a service 
> loader to find its implementation, I didn't want to propose that to the 
> mailing list. The way I proposed for Karaf 4.2.8 is an easy way to have the 
> same JAXB version with Java 11 and Java 8 (and it works the same in all 
> versions), but running these interface within the OSGi framework is of course 
> the much better way to do this.
> 
> Best regards
> Stephan
> 
> -----Original Message-----
> From: Jean-Baptiste Onofre <[email protected]> 
> Sent: Mittwoch, 29. April 2020 08:03
> To: [email protected]
> Subject: Re: Other version of javax.xml.bind when running with Java 8 and 11
> 
> Hi,
> 
> You maybe missed the message related to spec on the mailing list.
> 
> The proposal is:
> 1. Remove lib/jdk9plus folder
> 2. Remove reference to spec in etc/jre.properties
> 3. Provide specs feature
> 
> It will work with both JDK8 and 11 and "force" usage of specs bundle.
> 
> It’s actually a cleaner way to handle spec in Karaf.
> 
> I’m working on those features (as part of framework features repo). It will 
> be included in Karaf 4.3.0.RC2 and 4.2.9.
> 
> Regards
> JB
> 
>> Le 29 avr. 2020 à 07:45, Siano, Stephan <[email protected]> a écrit :
>> 
>> Hi,
>> 
>> till Java 8 JAXB was part of the JDK, the version included in JDK8 is 2.2.8. 
>> Starting with Java 9, JAXB was removed from the JRE and has to be added as a 
>> separate library (the version that comes with Karaf 4.2.8 is 2.3.2).
>> 
>> I am currently working on the same problem, because we are trying to run 
>> some Jackson-xml component which requires JAXB 2.3.0 or later. My tests are 
>> not entirely finished, but in theory (and my tests justify this so far) the 
>> following approach should work:
>> 
>> 1. copy the following files from lib/jdk9plus to lib/endorsed: 
>>   istack-commons-runtime-3.0.10.jar, 
>>   jakarta.xml.bind-api-2.3.2.jar, 
>>   jaxb-runtime-2.3.2.jar, 
>>  txw2-2.3.2.jar
>> 2. edit the file etc/jre.properties. There is a section starting with 
>> jre-1.8. In this section you have some exports for javax.xml.bind with 
>> version 2.2.8. Change that version to 2.3.0 (as in the jre-9 section)
>> 
>> The first step actually replaces the JAXB runtime in the JDK with the one 
>> from the external library with the JDK 8 endorsed mechanism. The second step 
>> changes the version of the exported JAXB packages to a newer version (which 
>> makes your first change known to the OSGi framework).
>> 
>> Best regards
>> Stephan
>> 
>> -----Original Message-----
>> From: Łukasz Dywicki <[email protected]> 
>> Sent: Dienstag, 28. April 2020 12:06
>> To: [email protected]; lechlukasz <[email protected]>
>> Subject: Re: Other version of javax.xml.bind when running with Java 8 and 11
>> 
>> Cześć Łukasz,
>> Technically speaking JAXB as a standard is moving its versions so
>> version shipped with Java 8 and Java 11 will be different. As far I
>> remember the overall plan for future releases is to remove JAXB from
>> official distribution and let programmers manage it as external dependency.
>> You can install RI within framework at the cost of additional megabyte
>> of your distribution.
>> 
>> Best regards,
>> Łukasz
>> --
>> Code-House
>> http://code-house.org
>> 
>> 
>> On 28.04.2020 09:50, lechlukasz wrote:
>>> Hello,
>>> 
>>> Is there a technical reason for org.apache.felix.framework providing other
>>> version of javax.xml.bind package when running with Java 8 (2.2.8) and Java
>>> 11 (2.3.0)?
>>> 
>>> Best regards,
>>> Lukasz Lech
>>> 
>>> 
>>> 
>>> 
>>> --
>>> Sent from: http://karaf.922171.n3.nabble.com/Karaf-User-f930749.html
>>> 
> 

Reply via email to