1

I am new to Java and Hibernate. I was trying a simple example with a User details class, main class and Hibernate.cfg.xml. Running the application, I got:

Exception in thread "main" java.lang.NoClassDefFoundError: javax/xml/bind/JAXBException at org.hibernate.boot.spi.XmlMappingBinderAccess.(XmlMappingBinderAccess.java:43)

I added --add-modules java.xml.bind in arguments, but now I am facing:

Error occurred during initialization of boot layer java.lang.module.FindException: Module java.xml.bind not found

I am using Java 11.

Sae1962
  • 1,122
  • 15
  • 31
Raj
  • 11
  • 2
  • In Java 11 you also need to include the dependency. See this answer for details: https://stackoverflow.com/a/43574427/636009 – David Conrad Oct 15 '18 at 20:40

0 Answers0