Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Migrate the project to Jakarta JAXB 3+ #41

Closed
Spikhalskiy opened this issue Dec 4, 2024 · 1 comment
Closed

Migrate the project to Jakarta JAXB 3+ #41

Spikhalskiy opened this issue Dec 4, 2024 · 1 comment

Comments

@Spikhalskiy
Copy link

Spikhalskiy commented Dec 4, 2024

When attempting to use the project in an environment with new Jakarta JAXB 3+ the following exception is thrown:

Caused by: java.lang.NoClassDefFoundError: javax/xml/bind/JAXBContext
	at org.jpmml.model.JAXBUtil.getContext(JAXBUtil.java:106) ~[pmml-model-1.5.15.jar:?]
	at org.jpmml.model.JAXBUtil.createUnmarshaller(JAXBUtil.java:151) ~[pmml-model-1.5.15.jar:?]
	at org.jpmml.model.JAXBUtil.unmarshal(JAXBUtil.java:56) ~[pmml-model-1.5.15.jar:?]
	at org.jpmml.model.JAXBUtil.unmarshalPMML(JAXBUtil.java:44) ~[pmml-model-1.5.15.jar:?]
	at org.jpmml.model.PMMLUtil.unmarshal(PMMLUtil.java:68) ~[pmml-model-1.5.15.jar:?]

Would it be possible to switch the project from javax.* to jakarta.* or to create a parallel jakarta variant of the pmml-model module utilizing eclipse-transformer?

@Spikhalskiy Spikhalskiy changed the title Migrate the project to Jakarta JAXB Migrate the project to Jakarta JAXB 3+ Dec 4, 2024
@vruusmann
Copy link
Member

Would it be possible to switch the project from javax.* to jakarta.*

You are using JPMML-Model 1.5.X, which is "Java XML Bind" (aka javax.xml.bind)-based.

The upgrade to Jakarta XML Bind (aka jakarta.xml.bind) happened in late 2021, when JPMML-Model 1.6.0 was released.

Currently, the project is being migrated from Jakarta XML Bind 3 to 4 (needed for Java 8 to 11 upgrade). It will be the cornerstone of the upcoming JPMML-Model 1.7.X.

TLDR: Jakarta XML Bind 3 is in the 1.6.X branch, and Jakarta XML Bind 4 is in the master branch. Both work with Glassfish Metro and EclipseLink MOXy runtimes just fine. All releases are always in the Maven Central repository.

See also jpmml/jpmml-evaluator#246

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants