Quarkus REST in NATIVE - abstract resources with @Path requires impl. to be CDI beans while RESTEasy does not #42976
Labels
area/arc
Issue related to ARC (dependency injection)
area/native-image
area/rest
kind/bug
Something isn't working
Describe the bug
Quarkus REST in NATIVE - abstract resources with
@Path
requires impl. to be CDI beans while RESTEasy does notThis is basically #41567 for NATIVE mode.
#41606 fixed the issue for JVM mode, but NATIVE is still broken, stacktrace appears after first request.
Expected behavior
The same behavior as in JVM mode.
Actual behavior
2024-09-02 23:43:52,344 ERROR [io.qua.ver.htt.run.QuarkusErrorHandler] (executor-thread-1) HTTP Request to /hello failed, error id: 2061ff63-7e62-4ace-8e5b-1103e212d2f9-1: java.lang.IllegalArgumentException: Unable to create class 'org.acme.GreetingResource'. To fix the problem, make sure this class is a CDI bean.
is thrownHow to Reproduce?
sdk use java 21.0.2-graalce
## or equivalent for Mandrelgit clone [email protected]:michalvavrik/abstract-quarkus-rest-repro.git
cd abstract-quarkus-rest-repro
mvn clean verify -Dnative -Dquarkus.platform.group-id=io.quarkus -Dquarkus.platform.version=999-SNAPSHOT
After switching
<artifactId>quarkus-rest</artifactId>
to<artifactId>quarkus-resteasy</artifactId>
the app works well.Output of
uname -a
orver
macOS
Output of
java -version
Java 21
Quarkus version or git rev
Quarkus main / Quarkus 3.14.1
Build tool (ie. output of
mvnw --version
orgradlew --version
)No response
Additional information
No response
The text was updated successfully, but these errors were encountered: