-
Notifications
You must be signed in to change notification settings - Fork 2.7k
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
A NoSuchMethodException is raised when a REST resource is called with a single JsonObject argument in native build #45084
Comments
I would suggest you use Tested with |
Even if there is a workaround, that's probably something we should fix. It looks related to a few issues @geoand has been fixing recently. |
Absolutely! |
#45097 fixes the problem |
Ensure that jakarta json types can be deserialized in native mode
Fixes: quarkusio#45084 (cherry picked from commit 0879ce4)
Describe the bug
I have a simple resource that exposes a single POST endpoint which consumes JSON, produces a plaintext and has a single argument of type
JsonObject
. When I build this application natively and call the endpoint with a JSON string it raises aNoSuchMethodException
.A JVM build works just fine: The endpoint returns the
message
string.Expected behavior
The endpoint should return the
message
string from the JSON request object.Actual behavior
It raises a
NoSuchMethodException
:How to Reproduce?
For a reproducer see: https://github.com/nikolassv/quarkus-reproducer-rest-nosuchmethodexception
Output of
uname -a
orver
Linux 5.15.167.4-microsoft-standard-WSL2 #1 SMP Tue Nov 5 00:21:55 UTC 2024 x86_64 x86_64 x86_64 GNU/Linux
Output of
java -version
openjdk version "21" 2023-09-19 OpenJDK Runtime Environment GraalVM CE 21+35.1 (build 21+35-jvmci-23.1-b15) OpenJDK 64-Bit Server VM GraalVM CE 21+35.1 (build 21+35-jvmci-23.1-b15, mixed mode, sharing)
Mandrel or GraalVM version (if different from Java)
No response
Quarkus version or git rev
3.17.4
Build tool (ie. output of
mvnw --version
orgradlew --version
)Apache Maven 3.9.9 (8e8579a9e76f7d015ee5ec7bfcdc97d260186937)
Additional information
No response
The text was updated successfully, but these errors were encountered: