-
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
Unable to use @ClientExceptionMapper in native build #23766
Comments
Interesting, I'll take a look soon |
I have found the issue. While trying to make a reproducer, the reproducer worked just fine. The problem was that my restClient interface had a custom interceptor. Unsure at all why but it made the graalVM fail. To fix the issue I did annotate the toException method with something like this;
I'll let you close the issue if you think this is a normal behaviour. Thanks you for your time. |
Thanks for the update. Mind showing the code for the interceptor as well? Asking because I tried to reproduce the problem with a sample interceptor and I could not |
I am oddly totally unable to create a reproducer for it, even if I copy my annotation in totality. I can at least put my full stacktrace here in case there is anything that could shed some light on what is happening, in the meantime I try to create a reproducer. With my "real" app, I get it consistently.
|
Thanks |
@geoand I have made a reproducer here I see a couple of issues. So in the end what I thought was working wasn't. Build would work, but it would not work at runtime
Do you think maybe the bug could be reopened? |
Thanks. I'll have a look next week and reopen the issue if necessary. |
#23830 fixes the issue |
Don't copy static methods to CDI Wrapper of REST Client
Fixes: quarkusio#23766 (cherry picked from commit a4eed95)
@geoand I still have the issue on 2.7.2.Final. You can try the same reproducer I just updated the pom version to use 2.7.2, the rest is the same. Reproducer here Steps;
Exception:
|
Thanks, I'll have a look tomorrow |
Make sure @ClientExceptionMapper works properly in native mode
Fixes: quarkusio#23766 (cherry picked from commit ede25f8)
Describe the bug
While building I get this exception;
Error: com.oracle.graal.pointsto.constraints.UnresolvedElementException: Discovered unresolved method during parsing: org.acme.RestService.toException(javax.ws.rs.core.Response).
I tried making the method public, and registering the interface for reflection but it did not work.
cc @geoand
Expected behavior
Graalvm build should work
Actual behavior
Graalvm build fails with an exception
How to Reproduce?
I dont have a reproducer now, but I can provide one in needed.
Output of
uname -a
orver
Darwin Kernel Version 20.6.0
Output of
java -version
openjdk version "17.0.2" 2022-01-18
GraalVM version (if different from Java)
GraalVM 21.3.1 Java 17 CE
Quarkus version or git rev
2.7.1
Build tool (ie. output of
mvnw --version
orgradlew --version
)Apache Maven 3.8.4
Additional information
No response
The text was updated successfully, but these errors were encountered: