Skip to content
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

Closed
gregoryalary opened this issue Jan 9, 2018 · 4 comments
Closed
Milestone

Comments

@gregoryalary
Copy link

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)

@dachristensen
Copy link

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.

@RyanBard
Copy link
Contributor

RyanBard commented Mar 2, 2018

You can also fix the problem by explicitly depending on jaxb:

@lhazlewood
Copy link
Contributor

Closing as a duplicate of #333. Work will be tracked via that issue and we hope to have that released asap in the coming days. Thanks to @RyanBard for the jaxb optional dependency pointer!

@lhazlewood lhazlewood added this to the 0.10.0 milestone Aug 1, 2018
@lhazlewood
Copy link
Contributor

This has been fixed and released in 0.10.0.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

4 participants