October 21, 2020

java.lang.ClassNotFoundException: javax.xml.bind.DatatypeConverter [ Solution ]

java.lang.NoClassDefFoundError: javax/xml/bind/DatatypeConverter
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]
at com.cfed.config.JwtTokenUtil.doGenerateToken(JwtTokenUtil.java:71) ~[classes/:na]
at com.cfed.config.JwtTokenUtil.generateToken(JwtTokenUtil.java:59) ~[classes/:na]
at com.cfed.controller.JWTAuthenticationController.createAuthenticationToken(JWTAuthenticationController.java:43) ~[classes/:na]

Solution


Change your execution environment version to lower than java 9

Java Removed JAXB API from higher version than java 9.

No comments:

Post a Comment

Your feedback may help others !!!

Facebook comments