Any plans for Java 17?
lonesloane opened this issue · 5 comments
We have a strong policy in our company to stay up to date with the latest releases of Java, i.e. the new LTS Java 17.
While preparing the upgrade, I ran into an issue related to the move from javax.* namespace to jakarta.* namespace
Do you know if it is actually possible to use the java-client-api with a Java 17 JDK ? And if not, are there plans to upgrade the api ?
Many thanks for highlighting this backward incompatibility in Java 17.
As a short-term fix, it might be possible to solve the problem by compiling the MarkLogic Java API sources in one of the following approaches:
- to an uber jar that bundles the old version of the renamed dependencies
- to a shadow jar that aliases the old dependencies to the new names (if the renamed packages have no other backward incompatibilities)
Here's more background about shadow jars:
https://imperceptiblethoughts.com/shadow/introduction/#benefits-of-shadow
Supporting MarkLogic clients on current LTS releases of Java is obviously beneficial, so Java 17 is a good candidate for the next release cycle of the MarkLogic Java API. (The current release cycle is on the cusp of completing.)
We do not have this in the roadmap for now.
Just a note, the 6.0.0 release is upcoming and we are actively working on Java 17 support, though it currently will likely be in a 6.x release. Fortunately, it seems to largely be a matter of adopting usage of jakarta.xml.bind instead of javax.xml.bind.
@lonesloane As noted in #1469, we believe this is addressed by resolving a gap in our docs that didn't explain the need to explicitly declare the JAXB dependency when using Java 11 or higher. If you're able to, please try out the approach noted at the bottom of #1469 and reply back on that ticket if it works for you.
@rjrudin I'll give it a try asap...can't promise it will be done quickly though ;-)