Welcome to the Treehouse Community

The Treehouse Community is a meeting place for developers, designers, and programmers of all backgrounds and skill levels to get support. Collaborate here on code errors or bugs that you need feedback on, or asking for an extra set of eyes on your latest project. Join thousands of Treehouse students and alumni in the community today. (Note: Only Treehouse students can comment or ask questions, but non-students are welcome to browse our conversations.)

Looking to learn something new?

Treehouse offers a seven day free trial for new students. Get access to thousands of hours of content and a supportive community. Start your free trial today.

Java Hibernate Basics Persisting Data with Hibernate Fetching Data with Hibernate

Mohmed Taha
Mohmed Taha
1,427 Points

Data Persistence won't run in Java 9.0.1 on IntelliJ due to errors in XML parsing and JAXB issues, please help

Exception in thread "main" java.lang.NoClassDefFoundError: javax/xml/bind/JAXBException

Caused by: java.lang.ClassNotFoundException: javax.xml.bind.JAXBException

I tried installing javax.xml jaxb-api & jaxb-impl, yet I got a lot of new errors:

Caused by: org.hibernate.internal.util.config.ConfigurationException: Unable to perform unmarshalling at line number -1 and column -1 in RESOURCE hibernate.cfg.xml. Message: cvc-complex-type.2.4.a: Invalid content was found starting with element '{"http://www.hibernate.org/xsd/orm/cfg":argLine}'. One of '{"http://www.hibernate.org/xsd/orm/cfg":session-factory}' is expected.

[org.xml.sax.SAXParseException; cvc-complex-type.2.4.a: Invalid content was found starting with element '{"http://www.hibernate.org/xsd/orm/cfg":argLine}'. One of '{"http://www.hibernate.org/xsd/orm/cfg":session-factory}' is expected.]

Caused by: org.xml.sax.SAXParseException; cvc-complex-type.2.4.a: Invalid content was found starting with element '{"http://www.hibernate.org/xsd/orm/cfg":argLine}'. One of '{"http://www.hibernate.org/xsd/orm/cfg":session-factory}' is expected.

1 Answer

Marvin Deutz
Marvin Deutz
8,349 Points

Probably not relevant any more, but I just rolled back to using JDK8 for this course.