-
Notifications
You must be signed in to change notification settings - Fork 2.5k
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
StackOverflowException for Throwable ExceptionMapper #18603
Comments
@antonwiens could you include part of the stacktrace in the description? It's helpful for other users to find similar issues. |
I added one, sry. |
@gsmet any chance this will make it for 2.1? this is blocking me from using quarkus 2 unfortunately |
@antonwiens so it was working in 1.13 and doesn't work anymore? @mkouba could you have a look? I'm seeing recursive interceptor calls so I wonder if it could be related to some of the recent work on the subject. |
I can say that it was working in 1.10 and in 1.12 for normal resteasy. I don't know about 1.13 and resteasy-reactive, as its the first time i am using it. |
Hm, it looks like the interceptor is associated with a class generated by resteasy reactive: @Singleton
@Unremovable
public class ThrowableExceptionMapper$GeneratedExceptionHandlerFor$Throwable$OfMethod$map implements ResteasyReactiveExceptionMapper {
private final ThrowableExceptionMapper delegate;
@Inject
public ThrowableExceptionMapper$GeneratedExceptionHandlerFor$Throwable$OfMethod$map(ThrowableExceptionMapper var1) {
this.delegate = var1;
}
public Response toResponse(Throwable var1) {
throw (Throwable)(new IllegalStateException("This should never be called"));
}
public Response toResponse(Throwable var1, ServerRequestContext var2) {
return this.toResponse(var1, var2); // <-- This causes an infinite loop!?
}
} |
I'll take a look |
/cc @FroMage, @stuartwdouglas |
#18613 takes care of the issue |
Fix Throwable handling in @ServerExceptionMapper
Fixes: quarkusio#18603 (cherry picked from commit 1aa3e26)
Describe the bug
An ServerExceptionMapper for Throwables always throws a StackOverflowException.
Reproducer:
reproducer-cleaned.zip
Just Call the "/hello" Endpoint to trigger the exception.
Version: 2.0.1
Stacktrace:
EDIT:
I cleaned up the reproducer, because i tested a lot of stuff and left unused extensions in the gradle build file.
Also i changed the target version for kotlin to 11, because i forgot to change it.
The text was updated successfully, but these errors were encountered: