0

I'm evaluating Citrus framework and I have problems with the setup. Following the documentation, I ran mvn archetype:generate -Dfilter=com.consol.citrus.mvn:citrus, selected option "Citrus quickstart project" and defined values for groupId and the others. Then I ran mvn clean verify and it failed with java.lang.NoClassDefFoundError: javax/xml/bind/JAXBException. It seems that not all dependencies are included in the archetype, or that I need to choose another archetype. What is the recommended way to add the JAX-B APIs in my case? Should I use another archetype maybe?

OS: Windows 10 Enterprise amd64; JDK: RedHat OpenJDK 11; IDE: VS Code 1.50.1; Maven: 3.6.3; Citrus version: 2.7.3

Markus Neifer
  • 53
  • 1
  • 6
  • I have added Maven dependencies for JAX-B and could successfully run a `mvn test`. However, the integration-tests still fail with a `java.lang.NoClassDefFoundError: javax/xml/bind/JAXBException`. – Markus Neifer Oct 19 '20 at 11:52

1 Answers1

0

Fixed my Citrus framework setup on Java 11 by adding the JAXB Maven dependencies javax.xml.bind:jaxb-api and org.glassfish.jaxb:jaxb-runtime. Plus, I have upgraded maven-failsafe-plugin to version 2.22.2. Now, I can run mvn clean verify without errors and get build success.

See also Java: How to resolve java.lang.NoClassDefFoundError: javax/xml/bind/JAXBException and https://maven.apache.org/surefire/maven-failsafe-plugin/java9.html

Markus Neifer
  • 53
  • 1
  • 6