question-mark
Stuck on an issue?

Lightrun Answers was designed to reduce the constant googling that comes with debugging 3rd party libraries. It collects links to all the places you might be looking at while hunting down a tough bug.

And, if you’re still stuck at the end, we’re happy to hop on a call to see how we can help out.

I use jjwt generate token for my micronaut app,I use graalvm build native-image, when generate token, I get this error:

io.jsonwebtoken.lang.UnknownClassException: Unable to load class named [io.jsonwebtoken.impl.DefaultJwtBuilder] from the thread context, current, or system/application ClassLoaders. All heuristics have been exhausted. Class could not be found. Have you remembered to include the jjwt-impl.jar in your runtime classpath?

I already setting jjwt-impl.jar in build.gradle, but because of native-image has limitation with reflection, so dynamic class loading can not work, I follow the graal manual add reflection-config.json in META-INF and its working!

[ { "name" : "io.jsonwebtoken.impl.DefaultJwtBuilder", "allDeclaredFields" : true, "allPublicMethods" : true, "allDeclaredConstructors" : true } ]

so can we just put the graal config in jjwt-impl.jar to support graal native-image?

Issue Analytics

  • State:open
  • Created 3 years ago
  • Reactions:3
  • Comments:12 (6 by maintainers)

github_iconTop GitHub Comments

2reactions
lhazlewoodcommented, Sep 6, 2021

A CompressionCodecResolver is always needed in case a zip header is encountered, but I understand your point around reflection.

We have discussed at times moving the impl package and its sub-packages into a single .jar and changing everything in there to package protected to prevent people from depending on those classes, but there needs to be some significant analysis to ensure nothing can ‘leak’ unexpectedly. It’ll be a decent amount of work.

A reflect-config.json might be a better/faster stop-gap in the meantime however.

1reaction
linghengqiancommented, Nov 17, 2022
Read more comments on GitHub >

github_iconTop Results From Across the Web

Graalonline Support
Login to Graalonline Support. As first step, please enter the e-mail address which you have put in the profile inside the game. We...
Read more >
Support Center - GraalOnline
If you want to contact us for help, please send a mail to support@graalonline.com. Another way to get help is to ask on...
Read more >
Toonslab Support - GraalOnline Classic Wiki - Fandom
Toonslab Support is used for contacting the official Graal administration team. The reasons for contact can be anything from appealing bans, ...
Read more >
Graal Support - Graalians
Hello, Been trying to find the ticket center for Graal Classic support. Does anyone know the link to it or where I can...
Read more >
GraalVM
GraalVM is a high-performance JDK distribution written for Java and other JVM languages, along with support for JavaScript, Ruby, Python, and several other ......
Read more >

github_iconTop Related Medium Post

No results found

github_iconTop Related StackOverflow Question

No results found

github_iconTroubleshoot Live Code

Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start Free

github_iconTop Related Reddit Thread

No results found

github_iconTop Related Hackernoon Post

No results found

github_iconTop Related Tweet

No results found

github_iconTop Related Dev.to Post

No results found

github_iconTop Related Hashnode Post

No results found