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

RESTEasy Reactive: ReaderInterceptor results in java.lang.IllegalStateException: Should never be called #15453

Closed
bcluap opened this issue Mar 3, 2021 · 5 comments · Fixed by #15455
Labels
area/resteasy-reactive kind/bug Something isn't working
Milestone

Comments

@bcluap
Copy link

bcluap commented Mar 3, 2021

Describe the bug
Using a reader interceptor for a JSON content type results in java.lang.IllegalStateException: Should never be called

Expected behavior
No error should occur

Actual behavior
a 500 is returned:
java.lang.IllegalStateException: Should never be called
at io.quarkus.resteasy.reactive.jackson.runtime.serialisers.JacksonMessageBodyReader.readFrom(JacksonMessageBodyReader.java:34)
at org.jboss.resteasy.reactive.server.jaxrs.ReaderInterceptorContextImpl.proceed(ReaderInterceptorContextImpl.java:50)
at reactive.scenarios.MyFilter.aroundReadFrom(MyFilter.java:26)
at org.jboss.resteasy.reactive.server.jaxrs.ReaderInterceptorContextImpl.proceed(ReaderInterceptorContextImpl.java:52)
at org.jboss.resteasy.reactive.server.handlers.RequestDeserializeHandler.handle(RequestDeserializeHandler.java:74)
at org.jboss.resteasy.reactive.server.handlers.RequestDeserializeHandler.handle(RequestDeserializeHandler.java:25)
at org.jboss.resteasy.reactive.common.core.AbstractResteasyReactiveContext.run(AbstractResteasyReactiveContext.java:117)
at io.netty.util.concurrent.AbstractEventExecutor.safeExecute(AbstractEventExecutor.java:164)
at io.netty.util.concurrent.SingleThreadEventExecutor.runAllTasks(SingleThreadEventExecutor.java:472)
at io.netty.channel.nio.NioEventLoop.run(NioEventLoop.java:497)
at io.netty.util.concurrent.SingleThreadEventExecutor$4.run(SingleThreadEventExecutor.java:989)
at io.netty.util.internal.ThreadExecutorMap$2.run(ThreadExecutorMap.java:74)
at io.netty.util.concurrent.FastThreadLocalRunnable.run(FastThreadLocalRunnable.java:30)
at java.base/java.lang.Thread.run(Thread.java:832)

To Reproduce
git clone https://github.com/bcluap/quarkus-examples.git
cd quarkus-examples/resteasy-reactive
mvn clean test

Configuration
Nothing abnormal

Screenshots
Run the reproducer to see failures. Change the pom to non-reactive mode or 1.11.3.Final and all tests pass

Environment (please complete the following information):
This used to work on 1.11.X but fails from 1.12.X

@bcluap bcluap added the kind/bug Something isn't working label Mar 3, 2021
@quarkus-bot
Copy link

quarkus-bot bot commented Mar 3, 2021

/cc @FroMage, @geoand, @stuartwdouglas

@geoand
Copy link
Contributor

geoand commented Mar 3, 2021

Ah darn... This is a dump mistake that should be easy to fix.

Sorry for the inconvinience :(

@bcluap
Copy link
Author

bcluap commented Mar 3, 2021 via email

@geoand
Copy link
Contributor

geoand commented Mar 3, 2021

You should just give us the application 😆

geoand added a commit to geoand/quarkus that referenced this issue Mar 3, 2021
@geoand
Copy link
Contributor

geoand commented Mar 3, 2021

#15455 takes care of the issue properly

geoand added a commit to geoand/quarkus that referenced this issue Mar 3, 2021
geoand added a commit to geoand/quarkus that referenced this issue Mar 3, 2021
geoand added a commit that referenced this issue Mar 4, 2021
Make Jackson work with ReaderInterceptors
@quarkus-bot quarkus-bot bot added this to the 1.13 - master milestone Mar 4, 2021
@gsmet gsmet modified the milestones: 1.13 - master, 1.12.2.Final Mar 8, 2021
gsmet pushed a commit to gsmet/quarkus that referenced this issue Mar 8, 2021
This was referenced Mar 12, 2021
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
area/resteasy-reactive kind/bug Something isn't working
Projects
None yet
Development

Successfully merging a pull request may close this issue.

3 participants