On 29 Nov 2023, at 07:18, Thomas Hoffmann (Speed4Trade GmbH) 
<thomas.hoffm...@speed4trade.com.INVALID> wrote:

>> I’m in dependency hell - java8 to java17, JAXB as used by Jersey2 broke. No
>> idea why, but an internal Oracle implementation is hardcoded somewhere.
>> 
>> java.lang.ClassNotFoundException: oracle.xml.jaxp.JXSAXParserFactory
> 
> I think you got trapped in the javax-jakarta hell after upgrading.
> As a general recommendation, you should upgrade all libraries in your app.
> Mostly all new versions have switched to using Jakarta.

I have indeed.

I have learned that tomca9 (which I’m stuck on) requires jersey2 (fair enough), 
which in turn requires a lot of code in the javax namespace that is packaged in 
jars in the jakarta namespace.

> Do you use and build system like gradle or maven? 
> They should take care of the new dependencies. Otherwise you have to look it 
> up.
> 
> If some libraries don’t support Jakarta package yet, you have to add the 
> legacy jaxb libs:
> https://mvnrepository.com/artifact/com.sun.xml.bind/jaxb-impl

Maven is being used, but many of the dependencies are optional, and it is not 
clear which versions are required (the latest jakarta versions are too new). 
The advice that I was given was to use the exact same pinned versions of 
everything used by the particular jersey release:

https://github.com/eclipse-ee4j/jersey/blob/2.x/pom.xml#L2313

Regards,
Graham
—

Reply via email to