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

fix(jans-core): inherit context classloader in @Asynchronous events #8952

Closed
yurem opened this issue Jul 11, 2024 · 0 comments · Fixed by #8953
Closed

fix(jans-core): inherit context classloader in @Asynchronous events #8952

yurem opened this issue Jul 11, 2024 · 0 comments · Fixed by #8953
Assignees
Labels
comp-jans-core Component affected by issue or PR kind-bug Issue or PR is a bug in existing functionality

Comments

@yurem
Copy link
Contributor

yurem commented Jul 11, 2024

When server invokes RestAasy client api in @Asynchronous event server throws:

jakarta.ws.rs.ProcessingException: RESTEASY003145: Unable to find a MessageBodyReader of content-type application/json and type class java.lang.String
	at org.jboss.resteasy.core.interception.jaxrs.ClientReaderInterceptorContext.throwReaderNotFound(ClientReaderInterceptorContext.java:47) ~[resteasy-core-6.0.3.Final.jar:6.0.3.Final]
	at org.jboss.resteasy.core.interception.jaxrs.AbstractReaderInterceptorContext.getReader(AbstractReaderInterceptorContext.java:133) ~[resteasy-core-6.0.3.Final.jar:6.0.3.Final]
	at org.jboss.resteasy.core.interception.jaxrs.AbstractReaderInterceptorContext.proceed(AbstractReaderInterceptorContext.java:75) ~[resteasy-core-6.0.3.Final.jar:6.0.3.Final]
	at org.jboss.resteasy.client.jaxrs.internal.ClientResponse.readFrom(ClientResponse.java:217) ~[resteasy-client-6.0.3.Final.jar:6.0.3.Final]
	at org.jboss.resteasy.specimpl.BuiltResponse.readEntity(BuiltResponse.java:90) ~[resteasy-core-6.0.3.Final.jar:6.0.3.Final]
	at org.jboss.resteasy.specimpl.AbstractBuiltResponse.readEntity(AbstractBuiltResponse.java:262) ~[resteasy-core-6.0.3.Final.jar:6.0.3.Final]
	at io.jans.as.client.OpenIdConfigurationClient.exec(OpenIdConfigurationClient.java:80) [classes/:?]

This happens despite the fact that all required jars are in classpath. We already added workaround to specific case #5116 for external scripts.

We need to fix it root case. All spawned threads should inherit context classpath.

This issue caused by: changes in JDK/RestRasy initialization routine/etc

@yurem yurem self-assigned this Jul 11, 2024
@mo-auto mo-auto added comp-jans-core Component affected by issue or PR kind-bug Issue or PR is a bug in existing functionality labels Jul 11, 2024
yurem added a commit that referenced this issue Jul 11, 2024
Signed-off-by: Yuriy Movchan <Yuriy.Movchan@gmail.com>
yurem added a commit that referenced this issue Jul 11, 2024
Signed-off-by: Yuriy Movchan <Yuriy.Movchan@gmail.com>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
comp-jans-core Component affected by issue or PR kind-bug Issue or PR is a bug in existing functionality
Projects
None yet
Development

Successfully merging a pull request may close this issue.

2 participants