3

I'm already switching java version from 8 to 11 in one of the project and facing with the problem with removed ee modules (jeps320).

I'm using gradle to build the project and added as a runtime dependency 'org.glassfish.jaxb:jaxb-runtime:2.4.0-b180830.0438'

and I have this jar inside created project spring boot fat jar in the library. Unfortunatelly I got th following expcetion

javax.xml.bind.JAXBException: Implementation of JAXB-API has not been found on module path or classpath.
 - with linked exception: [java.lang.ClassNotFoundException: com.sun.xml.bind.v2.ContextFactory]

(I didn"t add java.xml.bind to the module-info and when I'm trying to start an app from command line with the switche --add-modules="java.xml.bind" I got an error.

java.lang.module.FindException: Module javax.xml.bind not found

Any idea? How to solve this?

tomasz-mer
  • 3,753
  • 10
  • 50
  • 69
  • Maybe look at https://stackoverflow.com/questions/52502189/java-11-package-javax-xml-bind-does-not-exist. – Ralf Renz Nov 14 '18 at 13:15
  • I did it but got milons of error like below. 14:27:48.086 [INFO] [org.gradle.api.internal.tasks.compile.JdkJavaCompiler] Compiling with JDK Java compiler API. 14:27:48.997 [ERROR] [system.err] error: the unnamed module reads package javax.xml.stream from both stax.api and java.xml – tomasz-mer Nov 14 '18 at 13:29
  • @user6778654 You're possibly moving to the modular world of java for the first time. This is where you would find such issues like module not found, split packages etc commonly. You would need to have some patience and gradually solve for them one at a time. – Naman Nov 14 '18 at 18:42

0 Answers0