Skip to content

Fix: JsonJacksonCodec fails to serialize Throwable on Java17 #5436

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

Merged
merged 1 commit into from
Nov 18, 2023

Conversation

tomj-vm
Copy link

@tomj-vm tomj-vm commented Nov 16, 2023

This fixes issue: #5369

The serialization of Throwable instances would fail on Java17 with error:

com.fasterxml.jackson.databind.exc.InvalidDefinitionException: Invalid type definition for type `java.lang.Throwable`: Failed to call `setAccess()` on Field 'detailMessage' (of class `java.lang.Throwable`) due to `java.lang.reflect.InaccessibleObjectException`, problem: Unable to make field private java.lang.String java.lang.Throwable.detailMessage accessible: module java.base does not "opens java.lang" to unnamed module @32eff876
  //...
Caused by: java.lang.IllegalArgumentException: Failed to call `setAccess()` on Field 'detailMessage' (of class `java.lang.Throwable`) due to `java.lang.reflect.InaccessibleObjectException`, problem: Unable to make field private java.lang.String java.lang.Throwable.detailMessage accessible: module java.base does not "opens java.lang" to unnamed module @32eff876
   // ...
Caused by: java.lang.reflect.InaccessibleObjectException: Unable to make field private java.lang.String java.lang.Throwable.detailMessage accessible: module java.base does not "opens java.lang" to unnamed module @32eff876
  // ...

…edisson#5369

Signed-off-by: Tomasz Jankowski <jankowski.tomek@gmail.com>
@mrniko mrniko added this to the 3.25.0 milestone Nov 18, 2023
@mrniko mrniko added the bug label Nov 18, 2023
@mrniko mrniko merged commit 6266e12 into redisson:master Nov 18, 2023
@mrniko
Copy link
Member

mrniko commented Nov 18, 2023

Thanks for contribution!

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

Successfully merging this pull request may close these issues.

3 participants