-
Notifications
You must be signed in to change notification settings - Fork 1.3k
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Remove usage of javax.xml.bind.DatatypeConverter (removed in Java 9) #297
Comments
I ran into this as well. I just submitted a pull request that resolves this, but breaks the build for java7 as it leverages java.util.Base64 which was added in Java8. As such, I closed the pull request myself. If jjwt needs to support java7, then I'm not sure of a good way to get around this without adding an external dependency on something like commons-codec. |
You can also fix the problem by explicitly depending on jaxb: |
This has been fixed and released in 0.10.0. |
JDK9 marks the package javax.xml.bind as deprecated for removal.
The current use results in a java.lang.NoClassDefFoundError :
Exception in thread "main" java.lang.NoClassDefFoundError: javax/xml/bind/DatatypeConverter at io.jsonwebtoken.impl.Base64Codec.decode(Base64Codec.java:26) at io.jsonwebtoken.impl.DefaultJwtBuilder.signWith(DefaultJwtBuilder.java:99)
The text was updated successfully, but these errors were encountered: