View Revisions: Issue #1159

Summary 0001159: Adapt to Java 11
Revision 2021-02-08 11:14 by rijkr
Description IST-1: Java 11 compiler reveals minor errors in junit tests of BigDecimal localize and parse methods.
SOLL-1: Do not anticipate on how Java applies currency symbol to BigDecimal values.

IST-2: Java 11 compiler shows error "package javax.xml.soap does not exist". This is because this package is deprecated since Java 9 and is removed in Java 11.
SOLL-2: Fix by adding Jakarta XML Web Services from Jakarta EE 8 as Maven dependency:
<dependency>
  <groupId>jakarta.xml.ws</groupId>
  <artifactId>jakarta.xml.ws-api</artifactId>
  <version>2.3.3</version>
</dependency>
<dependency>
  <groupId>com.sun.xml.ws</groupId>
  <artifactId>jaxws-rt</artifactId>
  <version>2.3.3</version>
  <scope>runtime</scope>
</dependency>
See https://stackoverflow.com/questions/54573998/java-11-package-javax-xml-soap-does-not-exist

As explained in Java 11 "java --help-extra" add "--illegal-access=debug" to VM args. This will write a stacktrace to stdout so "Illegal reflective access warnings" can be pinpointed.

IST-3: Illegal reflective access warnings (iText 5.5.13.1): WARNING: Illegal reflective access by com.itextpdf.text.io.ByteBufferRandomAccessSource.
SOLL-3: Use PdfReader(FileInputStream is) instead of PdfReader(String filename) to instantiate PdfReader. See https://stackoverflow.com/questions/53301158/itext-java-11-illegal-reflective-access-by-com-itextpdf-io-source-bytebufferran

IST-4: Illegal reflective access warnings (jasperreports 6.16.0). WARNING: Illegal reflective access by net.sf.jasperreports.engine.util.ClassUtils (file: ... jasperreports-6.16.0.jar) to constructor com.sun.org.apache.xerces.internal.util.XMLGrammarPoolImpl()
SOLL-4: Add "net.sf.jasperreports.compiler.xml.parser.cache.schemas=false" to jasperreports.properties. See https://github.com/TIBCOSoftware/jasperreports/issues/61
Revision 2021-02-08 11:13 by rijkr
Description IST-1: Java 11 compiler reveals minor errors in junit tests of BigDecimal localize and parse methods.
SOLL-1: Do not anticipate on how Java applies currency symbol to BigDecimal values.

IST-2: Java 11 compiler shows error "package javax.xml.soap does not exist". This is because this package is deprecated since Java 9 and is removed in Java 11.
SOLL-2: Fix by adding Jakarta XML Web Services from Jakarta EE 8 as Maven dependency:
<dependency>
  <groupId>jakarta.xml.ws</groupId>
  <artifactId>jakarta.xml.ws-api</artifactId>
  <version>2.3.3</version>
</dependency>
<dependency>
  <groupId>com.sun.xml.ws</groupId>
  <artifactId>jaxws-rt</artifactId>
  <version>2.3.3</version>
  <scope>runtime</scope>
</dependency>
See https://stackoverflow.com/questions/54573998/java-11-package-javax-xml-soap-does-not-exist

As explained in Java 11 "java --help-extra" add "--illegal-access=debug" to VM args. This will write a stacktrace to stdout so "Illegal reflective access warnings" can be pinpointed.

IST-3: Illegal reflective access warnings (iText 5.5.13.1): WARNING: Illegal reflective access by com.itextpdf.text.io.ByteBufferRandomAccessSource.
SOLL-3: Use PdfReader(FileInputStream is) instead of PdfReader(String filename) to instantiate PdfReader.

IST-4: Illegal reflective access warnings (jasperreports 6.16.0). WARNING: Illegal reflective access by net.sf.jasperreports.engine.util.ClassUtils (file: ... jasperreports-6.16.0.jar) to constructor com.sun.org.apache.xerces.internal.util.XMLGrammarPoolImpl()
SOLL-4: Add "net.sf.jasperreports.compiler.xml.parser.cache.schemas=false" to jasperreports.properties
Revision 2021-01-08 11:11 by rijkr
Description IST-1: Java 11 compiler reveals minor errors in junit tests of BigDecimal localize and parse methods.
SOLL-1: Do not anticipate on how Java applies currency symbol to BigDecimal values.
IST-2: Java 11 compiler shows error "package javax.xml.soap does not exist". This is because this package is deprecated since Java 9 and is removed in Java 11.
SOLL-2: Fix by adding Jakarta XML Web Services from Jakarta EE 8 as Maven dependency:
<dependency>
  <groupId>jakarta.xml.ws</groupId>
  <artifactId>jakarta.xml.ws-api</artifactId>
  <version>2.3.3</version>
</dependency>
<dependency>
  <groupId>com.sun.xml.ws</groupId>
  <artifactId>jaxws-rt</artifactId>
  <version>2.3.3</version>
  <scope>runtime</scope>
</dependency>
See https://stackoverflow.com/questions/54573998/java-11-package-javax-xml-soap-does-not-exist