Ticket: User Management::: Getting Error "java.lang.ClassNotFoundException: javax.xml.bind.DatatypeConverter"

Hi,

I am trying to solve the assignment as follows:

Chapter 2: User-Facing Backend

Ticket: User Management

But, I am getting error “java.lang.ClassNotFoundException: javax.xml.bind.DatatypeConverter” when calling the following code;

Jwts.builder()
.setSubject(userPrincipal.getEmail())
.setIssuedAt(new Date())
.setExpiration(expiryDate)
.signWith(SignatureAlgorithm.HS512, jwtSecret)
.compact();
Please help me to solve this issue

Hi @Kishore_Kumar_Pal,

Please check following links and let me know if it doesn’t help:

Kanika

Thanks for your great help. I have solved it by adding following dependencies

io.jsonwebtoken jjwt-api 0.10.7 io.jsonwebtoken jjwt-impl 0.10.7 runtime io.jsonwebtoken jjwt-jackson 0.10.7 runtime
1 Like

Thats great @Kishore_Kumar_Pal! Good luck.

Kanika