Skip to content
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

List<PathSegment> exception on RESTEasy Reactive #336

Open
snowdrop-bot opened this issue May 6, 2021 · 0 comments
Open

List<PathSegment> exception on RESTEasy Reactive #336

snowdrop-bot opened this issue May 6, 2021 · 0 comments

Comments

@snowdrop-bot
Copy link
Collaborator

Describe the bug

As I asked in Zulip, I wanted to use List<PathSegment> with RESTEasy Reactive extension to use @PathParam and Regular Expressions. i.e. @path("{keyword:.*}")
https://docs.jboss.org/resteasy/docs/4.6.0.Final/userguide/html_single/index.html#_PathParam_and_PathSegment

But I'm getting exceptions as below:
https://github.com/tedwon/quarkus-resteasy-reactive-with-pathsegment/blob/master/README.adoc

It is working properly with @PathParam("id") PathSegment id:
https://github.com/tedwon/quarkus-resteasy-reactive-with-pathsegment/blob/master/src/main/java/org/acme/getting/started/ReactiveGreetingResource.java#L51-L55

However, getting errors java.lang.RuntimeException: Failed to find converter for javax.ws.rs.core.PathSegment with @PathParam("keyword") List<PathSegment> keywords while startup Quarkus.
https://github.com/tedwon/quarkus-resteasy-reactive-with-pathsegment/blob/master/src/main/java/org/acme/getting/started/ReactiveGreetingResource.java#L57-L61

Note that it is working properly for the same code with List on my other Quarkus app with quarkus-resteasy extension.

Expected behavior

No exception for the usage of List with quarkus-resteasy extension

Actual behavior

2021-05-02 02:16:02,416 ERROR [io.qua.dep.dev.IsolatedDevModeMain] (main) Failed to start quarkus: java.lang.RuntimeException: io.quarkus.builder.BuildException: Build failure: Build failed due to errors
	[error]: Build step io.quarkus.resteasy.reactive.server.deployment.ResteasyReactiveProcessor#setupEndpoints threw an exception: java.lang.RuntimeException: java.lang.RuntimeException: Failed to process method org.acme.getting.started.ReactiveGreetingResource#java.lang.String searchByKeywords(java.util.List<javax.ws.rs.core.PathSegment> keywords)
	at org.jboss.resteasy.reactive.common.processor.EndpointIndexer.createEndpoints(EndpointIndexer.java:238)
	at io.quarkus.resteasy.reactive.server.deployment.ResteasyReactiveProcessor.setupEndpoints(ResteasyReactiveProcessor.java:402)
	at java.base/jdk.internal.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
	at java.base/jdk.internal.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:62)
	at java.base/jdk.internal.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43)
	at java.base/java.lang.reflect.Method.invoke(Method.java:566)
	at io.quarkus.deployment.ExtensionLoader$2.execute(ExtensionLoader.java:920)
	at io.quarkus.builder.BuildContext.run(BuildContext.java:277)
	at org.jboss.threads.EnhancedQueueExecutor$Task.run(EnhancedQueueExecutor.java:2415)
	at org.jboss.threads.EnhancedQueueExecutor$ThreadBody.run(EnhancedQueueExecutor.java:1452)
	at java.base/java.lang.Thread.run(Thread.java:834)
	at org.jboss.threads.JBossThread.run(JBossThread.java:501)
Caused by: java.lang.RuntimeException: Failed to process method org.acme.getting.started.ReactiveGreetingResource#java.lang.String searchByKeywords(java.util.List<javax.ws.rs.core.PathSegment> keywords)
	at org.jboss.resteasy.reactive.common.processor.EndpointIndexer.createResourceMethod(EndpointIndexer.java:524)
	at org.jboss.resteasy.reactive.common.processor.EndpointIndexer.createEndpoints(EndpointIndexer.java:285)
	at org.jboss.resteasy.reactive.common.processor.EndpointIndexer.createEndpoints(EndpointIndexer.java:209)
	... 11 more
Caused by: java.lang.RuntimeException: Failed to find converter for javax.ws.rs.core.PathSegment
	at io.quarkus.resteasy.reactive.server.deployment.QuarkusServerEndpointIndexer.extractConverter(QuarkusServerEndpointIndexer.java:198)
	at org.jboss.resteasy.reactive.server.processor.ServerEndpointIndexer.handleListParam(ServerEndpointIndexer.java:277)
	at org.jboss.resteasy.reactive.server.processor.ServerEndpointIndexer.handleListParam(ServerEndpointIndexer.java:57)
	at org.jboss.resteasy.reactive.common.processor.EndpointIndexer.extractParameterInfo(EndpointIndexer.java:909)
	at org.jboss.resteasy.reactive.common.processor.EndpointIndexer.createResourceMethod(EndpointIndexer.java:407)
	... 13 more

To Reproduce

Please run this reproducer project:
https://github.com/tedwon/quarkus-resteasy-reactive-with-pathsegment

./mvnw quarkus:dev

Quarkus version or git rev

QUARKUS 1.13.3


quarkusio#17034


$upstream:17034$

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

No branches or pull requests

2 participants