So, Java 11 SE removed the following packages:
java.xml.ws
java.xml.bind
java.activation
java.xml.ws.annotation
java.corba
java.transaction
java.se.ee
jdk.xml.ws
jdk.xml.bind
These are still part of Java EE 8, correct?
It's recommended that my project now add the following maven dependencies to fill the void (from How to resolve java.lang.NoClassDefFoundError: javax/xml/bind/JAXBException in Java 9):
<!-- API, java.xml.bind module -->
<dependency>
<groupId>jakarta.xml.bind</groupId>
<artifactId>jakarta.xml.bind-api</artifactId>
<version>2.3.2</version>
</dependency>
<!-- Runtime, com.sun.xml.bind module -->
<dependency>
<groupId>org.glassfish.jaxb</groupId>
<artifactId>jaxb-runtime</artifactId>
<version>2.3.2</version>
</dependency>
Though, Jakarta recommends (from: https://eclipse-ee4j.github.io/jaxb-ri/):
<dependency>
<groupId>jakarta.xml.bind</groupId>
<artifactId>jakarta.xml.bind-api</artifactId>
<version>2.3.3</version>
</dependency>
<dependency>
<groupId>com.sun.xml.bind</groupId>
<artifactId>jaxb-impl</artifactId>
<version>2.3.3</version>
<scope>runtime</scope>
</dependency>
Notice the different runtime, and scopes are not provided.
I guess my question is what does Payara provide, and what libraries should my application include from the above removed? I'm trying to get my project converted from Java 8 to 11, but the introduction of modules compounded with removed packages and new Jakarta versions is really piling on the changes I have to deal with.
Additional questions:
- Is there now drop-in replacement library for the ones removed?
- Do Jakarta's xml libraries require a rework on the application?
- How are the dependencies defined in module-info?
Thanks.
UPDATE 1:
Letting Netbeans generate the module-info.java
is just a mess:
module BaseLib {
requires com.google.gson;
requires org.apache.pdfbox;
requires org.apache.fontbox;
requires commons.logging;
requires com.google.common;
requires failureaccess;
requires listenablefuture;
requires jsr305;
requires org.checkerframework.checker.qual;
requires com.google.errorprone.annotations;
requires j2objc.annotations;
requires java.xml.bind;
requires jakarta.activation;
requires com.sun.xml.bind;
requires com.sun.xml.txw2;
requires com.sun.istack.runtime;
requires org.jvnet.staxex;
requires com.sun.xml.fastinfoset;
requires java.activation;
requires eclipselink;
requires java.persistence;
requires commonj.sdo;
requires java.validation;
requires java.json;
requires org.eclipse.yasson;
requires java.json.bind;
requires org.glassfish.java.json;
requires javaee.api;
requires javax.mail;
requires activation;
requires jersey.client;
requires javax.ws.rs.api;
requires jersey.common;
requires javax.annotation.api;
requires jersey.guava;
requires osgi.resource.locator;
requires hk2.api;
requires hk2.utils;
requires aopalliance.repackaged;
requires javax.inject;
requires hk2.locator;
requires javassist;
requires jersey.media.multipart;
requires mimepull;
exports com.mybase;
}
And of course the errors are too numerous. Here is a fraction, haha.
[ERROR] module org.jvnet.staxex reads package javax.activation from both jakarta.activation and java.activation
[ERROR] module org.jvnet.staxex reads package javax.validation from both java.validation and javaee.api
[ERROR] module org.jvnet.staxex reads package javax.validation.executable from both java.validation and javaee.api
[ERROR] module org.jvnet.staxex reads package javax.validation.bootstrap from both java.validation and javaee.api
[ERROR] module org.jvnet.staxex reads package javax.validation.constraints from both java.validation and javaee.api
[ERROR] module org.jvnet.staxex reads package javax.validation.spi from both java.validation and javaee.api
[ERROR] module org.jvnet.staxex reads package javax.validation.groups from both java.validation and javaee.api
[ERROR] module org.jvnet.staxex reads package javax.validation.constraintvalidation from both java.validation and javaee.api
[ERROR] module org.jvnet.staxex reads package javax.validation.valueextraction from both java.validation and javaee.api
[ERROR] module org.jvnet.staxex reads package javax.validation.metadata from both java.validation and javaee.api
[ERROR] module org.jvnet.staxex reads package javax.activation from both jakarta.activation and activation
[ERROR] module org.jvnet.staxex reads package javax.persistence from both javaee.api and java.persistence
[ERROR] module org.jvnet.staxex reads package javax.persistence.criteria from both javaee.api and java.persistence
[ERROR] module org.jvnet.staxex reads package javax.persistence.metamodel from both javaee.api and java.persistence
[ERROR] module org.jvnet.staxex reads package javax.persistence.spi from both javaee.api and java.persistence
[ERROR] module org.jvnet.staxex reads package javax.mail from both javaee.api and javax.mail
[ERROR] module org.jvnet.staxex reads package javax.mail.internet from both javaee.api and javax.mail
[ERROR] module org.jvnet.staxex reads package javax.mail.event from both javaee.api and javax.mail
[ERROR] module org.jvnet.staxex reads package javax.mail.util from both javaee.api and javax.mail
[ERROR] module org.jvnet.staxex reads package javax.mail.search from both javaee.api and javax.mail
[ERROR] module org.jvnet.staxex reads package javax.annotation from both javaee.api and javax.annotation.api
[ERROR] module org.jvnet.staxex reads package javax.annotation.sql from both javaee.api and javax.annotation.api
[ERROR] module org.jvnet.staxex reads package javax.annotation.security from both javaee.api and javax.annotation.api
[ERROR] module org.jvnet.staxex reads package javax.persistence.spi from both javaee.api and eclipselink
[ERROR] module org.jvnet.staxex reads package javax.persistence.metamodel from both javaee.api and eclipselink
[ERROR] module org.jvnet.staxex reads package javax.persistence.criteria from both javaee.api and eclipselink
[ERROR] module org.jvnet.staxex reads package javax.persistence from both javaee.api and eclipselink
[ERROR] module org.jvnet.staxex reads package commonj.sdo.impl from both eclipselink and commonj.sdo
[ERROR] module org.jvnet.staxex reads package javax.inject from both javaee.api and javax.inject
[ERROR] module org.jvnet.staxex reads package javax.annotation from both javaee.api and jsr305
[ERROR] module org.jvnet.staxex reads package javax.ws.rs.ext from both javaee.api and javax.ws.rs.api
[ERROR] module org.jvnet.staxex reads package javax.ws.rs.core from both javaee.api and javax.ws.rs.api
[ERROR] module org.jvnet.staxex reads package javax.ws.rs.container from both javaee.api and javax.ws.rs.api
[ERROR] module org.jvnet.staxex reads package javax.ws.rs.client from both javaee.api and javax.ws.rs.api
[ERROR] module org.jvnet.staxex reads package javax.ws.rs from both javaee.api and javax.ws.rs.api
[ERROR] module com.sun.istack.runtime reads package javax.validation from both java.validation and javaee.api
[ERROR] module com.sun.istack.runtime reads package javax.validation.executable from both java.validation and javaee.api
[ERROR] module com.sun.istack.runtime reads package javax.validation.bootstrap from both java.validation and javaee.api
[ERROR] module com.sun.istack.runtime reads package javax.validation.constraints from both java.validation and javaee.api
[ERROR] module com.sun.istack.runtime reads package javax.validation.spi from both java.validation and javaee.api
[ERROR] module com.sun.istack.runtime reads package javax.validation.groups from both java.validation and javaee.api
[ERROR] module com.sun.istack.runtime reads package javax.validation.constraintvalidation from both java.validation and javaee.api
[ERROR] module com.sun.istack.runtime reads package javax.validation.valueextraction from both java.validation and javaee.api
[ERROR] module com.sun.istack.runtime reads package javax.validation.metadata from both java.validation and javaee.api
[ERROR] module com.sun.istack.runtime reads package javax.activation from both java.activation and activation
[ERROR] module com.sun.istack.runtime reads package javax.persistence from both javaee.api and java.persistence
[ERROR] module com.sun.istack.runtime reads package javax.persistence.criteria from both javaee.api and java.persistence
[ERROR] module com.sun.istack.runtime reads package javax.persistence.metamodel from both javaee.api and java.persistence
[ERROR] module com.sun.istack.runtime reads package javax.persistence.spi from both javaee.api and java.persistence
[ERROR] module com.sun.istack.runtime reads package javax.mail from both javaee.api and javax.mail
[ERROR] module com.sun.istack.runtime reads package javax.mail.internet from both javaee.api and javax.mail
[ERROR] module com.sun.istack.runtime reads package javax.mail.event from both javaee.api and javax.mail
[ERROR] module com.sun.istack.runtime reads package javax.mail.util from both javaee.api and javax.mail
[ERROR] module com.sun.istack.runtime reads package javax.mail.search from both javaee.api and javax.mail
[ERROR] module com.sun.istack.runtime reads package javax.annotation from both javaee.api and javax.annotation.api
[ERROR] module com.sun.istack.runtime reads package javax.annotation.sql from both javaee.api and javax.annotation.api
[ERROR] module com.sun.istack.runtime reads package javax.annotation.security from both javaee.api and javax.annotation.api
[ERROR] module com.sun.istack.runtime reads package javax.persistence.spi from both javaee.api and eclipselink
[ERROR] module com.sun.istack.runtime reads package javax.persistence.metamodel from both javaee.api and eclipselink
[ERROR] module com.sun.istack.runtime reads package javax.persistence.criteria from both javaee.api and eclipselink
[ERROR] module com.sun.istack.runtime reads package javax.persistence from both javaee.api and eclipselink
[ERROR] module com.sun.istack.runtime reads package commonj.sdo.impl from both eclipselink and commonj.sdo
[ERROR] module com.sun.istack.runtime reads package javax.inject from both javaee.api and javax.inject
[ERROR] module com.sun.istack.runtime reads package javax.annotation from both javaee.api and jsr305
[ERROR] module com.sun.istack.runtime reads package javax.ws.rs.ext from both javaee.api and javax.ws.rs.api
[ERROR] module com.sun.istack.runtime reads package javax.ws.rs.core from both javaee.api and javax.ws.rs.api
[ERROR] module com.sun.istack.runtime reads package javax.ws.rs.container from both javaee.api and javax.ws.rs.api
[ERROR] module com.sun.istack.runtime reads package javax.ws.rs.client from both javaee.api and javax.ws.rs.api
[ERROR] module com.sun.istack.runtime reads package javax.ws.rs from both javaee.api and javax.ws.rs.api
[ERROR] module com.sun.xml.bind reads package javax.activation from both jakarta.activation and java.activation
[ERROR] module com.sun.xml.bind reads package javax.validation from both java.validation and javaee.api
[ERROR] module com.sun.xml.bind reads package javax.validation.executable from both java.validation and javaee.api
[ERROR] module com.sun.xml.bind reads package javax.validation.bootstrap from both java.validation and javaee.api
[ERROR] module com.sun.xml.bind reads package javax.validation.constraints from both java.validation and javaee.api
[ERROR] module com.sun.xml.bind reads package javax.validation.spi from both java.validation and javaee.api
[ERROR] module com.sun.xml.bind reads package javax.validation.groups from both java.validation and javaee.api
[ERROR] module com.sun.xml.bind reads package javax.validation.constraintvalidation from both java.validation and javaee.api
[ERROR] module com.sun.xml.bind reads package javax.validation.valueextraction from both java.validation and javaee.api
[ERROR] module com.sun.xml.bind reads package javax.validation.metadata from both java.validation and javaee.api
[ERROR] module com.sun.xml.bind reads package javax.activation from both jakarta.activation and activation
[ERROR] module com.sun.xml.bind reads package javax.persistence from both javaee.api and java.persistence
[ERROR] module com.sun.xml.bind reads package javax.persistence.criteria from both javaee.api and java.persistence
[ERROR] module com.sun.xml.bind reads package javax.persistence.metamodel from both javaee.api and java.persistence
[ERROR] module com.sun.xml.bind reads package javax.persistence.spi from both javaee.api and java.persistence
[ERROR] module com.sun.xml.bind reads package javax.mail from both javaee.api and javax.mail
[ERROR] module com.sun.xml.bind reads package javax.mail.internet from both javaee.api and javax.mail
[ERROR] module com.sun.xml.bind reads package javax.mail.event from both javaee.api and javax.mail
[ERROR] module com.sun.xml.bind reads package javax.mail.util from both javaee.api and javax.mail
[ERROR] module com.sun.xml.bind reads package javax.mail.search from both javaee.api and javax.mail
[ERROR] module com.sun.xml.bind reads package javax.annotation from both javaee.api and javax.annotation.api
[ERROR] module com.sun.xml.bind reads package javax.annotation.sql from both javaee.api and javax.annotation.api
[ERROR] module com.sun.xml.bind reads package javax.annotation.security from both javaee.api and javax.annotation.api
[ERROR] module com.sun.xml.bind reads package javax.persistence.spi from both javaee.api and eclipselink
[ERROR] module com.sun.xml.bind reads package javax.persistence.metamodel from both javaee.api and eclipselink
[ERROR] module com.sun.xml.bind reads package javax.persistence.criteria from both javaee.api and eclipselink
[ERROR] module com.sun.xml.bind reads package javax.persistence from both javaee.api and eclipselink
[ERROR] module com.sun.xml.bind reads package commonj.sdo.impl from both eclipselink and commonj.sdo
[ERROR] module com.sun.xml.bind reads package javax.inject from both javaee.api and javax.inject
[ERROR] module com.sun.xml.bind reads package javax.annotation from both javaee.api and jsr305
[ERROR] module com.sun.xml.bind reads package javax.ws.rs.ext from both javaee.api and javax.ws.rs.api