Describe the bug
It seems that there's an issue with Jandex registration when using a Response as a response from a JAX-RS REST endpoint.
Unable to properly register the hierarchy of the following classes for reflection as they are not in the Jandex index:
- javax.ws.rs.core.Response
Is printed on quarkus load time.
There was a similar issue when using a rest client
To Reproduce
Steps to reproduce the behavior:
mvn clean package quarkus:devEnvironment (please complete the following information):
Can you verify with 0.27, as I think this should be fixed now
Yeah, this should have been fixed now.
Still happens in 1.0.1.Final
@FreifeldRoyi I can't reproduce this issue, using
@Path("/hello")
public class HelloResource {
@GET
@Produces(MediaType.APPLICATION_JSON)
public Response hello() {
return Response.ok("{\"foo\":\"bar\"}", MediaType.APPLICATION_JSON).build();
}
}
log looks like this:
2020-01-26 14:53:00,132 INFO [io.quarkus] (main) my-quarkus-project 1.0-SNAPSHOT (running on Quarkus 1.0.1.Final) started in 0.727s. Listening on: http://0.0.0.0:8080
2020-01-26 14:53:00,140 INFO [io.quarkus] (main) Profile prod activated.
2020-01-26 14:53:00,141 INFO [io.quarkus] (main) Installed features: [cdi, resteasy]
^C2020-01-26 14:53:03,099 INFO [io.quarkus] (main) my-quarkus-project stopped in 0.029s
For live coding mode I see just:
[INFO] --- quarkus-maven-plugin:1.0.1.Final:dev (default-cli) @ my-quarkus-project ---
Listening for transport dt_socket at address: 5005
2020-01-26 14:56:36,150 WARN [io.qua.res.com.dep.ResteasyCommonProcessor] (build-2) Quarkus detected the need of REST JSON support but you have not provided the necessary JSON extension for this. You can visit https://quarkus.io/guides/rest-json for more information on how to set one.
2020-01-26 14:56:36,637 INFO [io.quarkus] (main) Quarkus 1.0.1.Final started in 1.147s. Listening on: http://0.0.0.0:8080
2020-01-26 14:56:36,639 INFO [io.quarkus] (main) Profile dev activated. Live Coding activated.
2020-01-26 14:56:36,639 INFO [io.quarkus] (main) Installed features: [cdi, resteasy]
^C2020-01-26 14:56:58,082 INFO [io.quarkus] (Quarkus Shutdown Thread) Quarkus stopped in 0.003s
No mention about javax.ws.rs.core.Response in the logs
I think, the issue https://github.com/quarkusio/quarkus/issues/5871 is similar to this one. It prints also the typical Unable to properly register the hierarchy of the following classes for reflection as they are not in the Jandex index:-message when using a Rest endpoint and returning a custom class instead of Response.
I included a reproducer in https://github.com/quarkusio/quarkus/issues/5871 so maybe it can help to solve this issue also..
Most helpful comment
Still happens in 1.0.1.Final