Coder Social home page Coder Social logo

Comments (8)

rjrudin avatar rjrudin commented on June 2, 2024 1

Our current plan is to address Java 17 in a 6.x release, once 6.0.0 is released along with MarkLogic 11. Depending on the issues / incompatibilities we run into, that 6.x release may happen fairly soon after 6.0.0 is released. We are also hoping that it's possible to continue supporting Java 8 and Java 11 at the same time, but we haven't done enough analysis and testing yet to know if that's feasible - we're presuming it will be heavily influenced by any issues with Java Client dependencies.

from java-client-api.

rjrudin avatar rjrudin commented on June 2, 2024

Also @ralfhergert - if this is in support of a particular customer (or customers), can you file a support ticket that identifies those customers? We have such a ticket open already, this would just be a private way to communicate who those customers are so that we know who's most interested in this.

from java-client-api.

ralfhergert avatar ralfhergert commented on June 2, 2024

@rjrudin Sure, I'll create a support ticket.

from java-client-api.

rjrudin avatar rjrudin commented on June 2, 2024

@ralfhergert After some testing and analysis, I believe this is largely a docs gap/bug for the Java Client - i.e. if you're on Java 11 or higher and you touch any part of the Java Client that depends on the "old" JAXB (the javax.xml.bind package), you need to include those dependencies yourself. They're included in Java 8, deprecated in 9 and 10, and removed in 11.

#1471 has an update to the README to make this clear. I've verified that when I run a test using e.g. JAXBHandle on Java 17, it fails with an expected class-not-found-error. And then when those old JAXB dependencies are included, the test runs fine.

Are you able to try out including those 3 dependencies in your project? Or, are you running into a different error?

We will still want to formally announce support for Java 17, but based on the above, all aspects of the Java Client appear to function correctly as long as the old JAXB dependencies are available on the classpath.

from java-client-api.

rjrudin avatar rjrudin commented on June 2, 2024

@ralfhergert You can find the instructions now in the README on our develop branch - https://github.com/marklogic/java-client-api/blob/develop/README.md#including-jaxb-support . If you're able to try this out, please let me know. The only reason I can't see this working is if a javax.xml.bind implementation of JAXB does not work on Java 17, but at least the glassfish implementation seems to perform just fine (all of the Java Client tests, which includes dozens of tests using JAXB, pass on Java 17 with the glassfish implementation).

from java-client-api.

ralfhergert avatar ralfhergert commented on June 2, 2024

@rjrudin In #1471 you may want to use jakarta.xml.bind:jakarta.xml.bind-api:2.3.3 instead of javax.xml.bind:jaxb-api:2.3.1 to be more future proof, since javax.xml.bind:jaxb-api is deprecated and no longer maintained (since 2018).

In fact JAXB has been moved into the Eclipse Jakarta project. Thus classes in the package javax.xml.bind (like javax.xml.bind.JAXBContext) have been moved into the package jakarta.xml.bind in 2020 (with release of JakartaEE9).
See: jakartaee/platform#133

from java-client-api.

rjrudin avatar rjrudin commented on June 2, 2024

Thanks @ralfhergert - yes, our plan is to upgrade the Java Client soon to depend on the jakarta library instead of the deprecated javax library (we've done a prototype of that and it appears to be a straightforward upgrade). Until then, our testing has shown that the javax library functions correctly on Java 17 and thus JAXB support within the Java Client functions correctly as well on Java 8, 11, and 17. FWIW, we tested it as well on an implementation of Java 19 and all tests passed there too. So that's good news in the short term, but yes - we'll be upgrading to jakarta soon, most likely in the early 6.x timeframe.

from java-client-api.

rjrudin avatar rjrudin commented on June 2, 2024

Going to close this ticket as the README now describes how to use the Java Client with JAXB on Java 17. Switching to JAXB 3 or 4 makes sense at some point in the future, but we'll track that separately.

from java-client-api.

Related Issues (20)

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.