Ticket: User Management - a FIX for Class not found error

While all test cases passed and I verified CRUD operations in Compass, Java was throwing an error when clicking the “Click to begin validation” for the User Management ticket. I’m using Java 15.0.1.

In the app, the validation fails: “User Management: invalid response to register”

In IntelliJ, the error looks something like this:

java.lang.ClassNotFoundException: javax.xml.bind.DatatypeConverter
	at java.base/jdk.internal.loader.BuiltinClassLoader.loadClass(BuiltinClassLoader.java:606) ~[na:na]
	at java.base/jdk.internal.loader.ClassLoaders$AppClassLoader.loadClass(ClassLoaders.java:168) ~[na:na]
	at java.base/java.lang.ClassLoader.loadClass(ClassLoader.java:522) ~[na:na]
	at io.jsonwebtoken.impl.Base64Codec.decode(Base64Codec.java:26) ~[jjwt-0.9.1.jar:0.9.1]
	at io.jsonwebtoken.impl.DefaultJwtBuilder.signWith(DefaultJwtBuilder.java:99) ~[jjwt-0.9.1.jar:0.9.1]

Turns out Java 15 is missing a required dependency for this project. Adding this to pom.xml, clicking “Reload Project”, restarting Application.java, and clicking “Click to begin validation” gives me the correct validation code to pass the ticket:

<dependency>
    <groupId>javax.xml.bind</groupId>
    <artifactId>jaxb-api</artifactId>
    <version>2.3.0</version>
</dependency>

https://www.codejava.net/coding/solved-java-lang-noclassdeffounderror-javax-xml-bind-jaxbexception

Hope this helps anyone struggling with this ticket!

5 Likes

Thanks so much man I was really stuck on this for a while you’re a life saver!

This helped me out as well. Thanks Ian!