You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Describe the bug
Sending multipart/form-data with mpRestClient asynchronous @restclient (injected in CDI RequestScoped bean) results in exception
[INFO] [err] jakarta.ws.rs.WebApplicationException: Failure in downstream service
[INFO] [err] at ITClass.postMethod(OcrIT.java:104)
[INFO] [err] at ITClass$Proxy$_$$WeldSubclass.postMethod$$super(Unknown Source)
[INFO] [err] at java.base/jdk.internal.reflect.DirectMethodHandleAccessor.invoke(DirectMethodHandleAccessor.java:103)
[INFO] [err] at java.base/java.lang.reflect.Method.invoke(Method.java:580)
[INFO] [err] at org.jboss.weld.interceptor.proxy.TerminalAroundInvokeInvocationContext.proceedInternal(TerminalAroundInvokeInvocationContext.java:51)
[INFO] [err] at org.jboss.weld.interceptor.proxy.AroundInvokeInvocationContext.proceed(AroundInvokeInvocationContext.java:78)
[INFO] [err] at com.ibm.tx.jta.cdi.interceptors.TransactionalInterceptor$2.run(TransactionalInterceptor.java:176)
[INFO] [err] at [internal classes]
[INFO] [err] at java.base/jdk.internal.reflect.DirectMethodHandleAccessor.invoke(DirectMethodHandleAccessor.java:103)
[INFO] [err] at java.base/java.lang.reflect.Method.invoke(Method.java:580)
[INFO] [err] at org.jboss.weld.interceptor.reader.SimpleInterceptorInvocation$SimpleMethodInvocation.invoke(SimpleInterceptorInvocation.java:73)
[INFO] [err] at org.jboss.weld.interceptor.proxy.InterceptorMethodHandler.executeAroundInvoke(InterceptorMethodHandler.java:84)
[INFO] [err] at org.jboss.weld.interceptor.proxy.InterceptorMethodHandler.executeInterception(InterceptorMethodHandler.java:72)
[INFO] [err] at org.jboss.weld.interceptor.proxy.InterceptorMethodHandler.invoke(InterceptorMethodHandler.java:56)
[INFO] [err] at org.jboss.weld.bean.proxy.CombinedInterceptorAndDecoratorStackMethodHandler.invoke(CombinedInterceptorAndDecoratorStackMethodHandler.java:79)
[INFO] [err] at org.jboss.weld.bean.proxy.CombinedInterceptorAndDecoratorStackMethodHandler.invoke(CombinedInterceptorAndDecoratorStackMethodHandler.java:68)
[INFO] [err] at ITClass$Proxy$$$WeldSubclass.postMethod(Unknown Source)
[INFO] [err] at ITClass$Proxy$$$_WeldClientProxy.postMethod(Unknown Source)
[INFO] [err] at java.base/jdk.internal.reflect.DirectMethodHandleAccessor.invoke(DirectMethodHandleAccessor.java:103)
[INFO] [err] at java.base/java.lang.reflect.Method.invoke(Method.java:580)
[INFO] [err] at org.jboss.resteasy.core.MethodInjectorImpl.invoke(MethodInjectorImpl.java:170)
[INFO] [err] at [internal classes]
[INFO] [err] at org.jboss.resteasy.core.ResourceMethodInvoker.lambda$invokeOnTarget$2(ResourceMethodInvoker.java:474)
[INFO] [err] at org.jboss.resteasy.core.interception.jaxrs.PreMatchContainerRequestContext.filter(PreMatchContainerRequestContext.java:434)
[INFO] [err] at [internal classes]
[INFO] [err] at org.jboss.resteasy.core.SynchronousDispatcher.lambda$invoke$4(SynchronousDispatcher.java:261)
[INFO] [err] at org.jboss.resteasy.core.SynchronousDispatcher.lambda$preprocess$0(SynchronousDispatcher.java:161)
[INFO] [err] at org.jboss.resteasy.core.interception.jaxrs.PreMatchContainerRequestContext.filter(PreMatchContainerRequestContext.java:434)
[INFO] [err] at [internal classes]
[INFO] [err] at jakarta.servlet.http.HttpServlet.service(HttpServlet.java:614)
[INFO] [err] at com.ibm.ws.webcontainer.servlet.ServletWrapper.service(ServletWrapper.java:1266)
[INFO] [err] at [internal classes]
[INFO] [err] at java.base/java.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1144)
[INFO] [err] at java.base/java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:642)
[INFO] [err] at java.base/java.lang.Thread.run(Thread.java:1583)
[INFO] [err] Caused by: java.util.concurrent.CompletionException: jakarta.ws.rs.ProcessingException: RESTEASY004655: Unable to invoke request: jakarta.ws.rs.WebApplicationException: Unexpected entity instance: org.jboss.resteasy.plugins.providers.multipart.ResteasyEntityPartBuilder$EntityPartImpl
[INFO] [err] at java.base/java.util.concurrent.CompletableFuture.encodeThrowable(CompletableFuture.java:315)
[INFO] [err] at java.base/java.util.concurrent.CompletableFuture.completeThrowable(CompletableFuture.java:320)
[INFO] [err] at java.base/java.util.concurrent.CompletableFuture.uniHandle(CompletableFuture.java:936)
[INFO] [err] at java.base/java.util.concurrent.CompletableFuture$UniHandle.tryFire(CompletableFuture.java:911)
[INFO] [err] at java.base/java.util.concurrent.CompletableFuture.postComplete(CompletableFuture.java:510)
[INFO] [err] at java.base/java.util.concurrent.CompletableFuture$AsyncSupply.run(CompletableFuture.java:1773)
[INFO] [err] at org.jboss.resteasy.microprofile.client.impl.MpClientInvocation$Decorator.lambda$decorate$0(MpClientInvocation.java:93)
[INFO] [err] at org.jboss.resteasy.concurrent.ContextualExecutors.lambda$runnable$3(ContextualExecutors.java:313)
[INFO] [err] at io.openliberty.restfulWS.client.internal.ThreadContextAsyncTaskWrapper$3.run(ThreadContextAsyncTaskWrapper.java:70)
[INFO] [err] ... 3 more
[INFO] [err] Caused by: jakarta.ws.rs.ProcessingException: RESTEASY004655: Unable to invoke request: jakarta.ws.rs.WebApplicationException: Unexpected entity instance: org.jboss.resteasy.plugins.providers.multipart.ResteasyEntityPartBuilder$EntityPartImpl
[INFO] [err] at org.jboss.resteasy.client.jaxrs.engines.ManualClosingApacheHttpClient43Engine.invoke(ManualClosingApacheHttpClient43Engine.java:391)
[INFO] [err] at [internal classes]
[INFO] [err] at org.jboss.resteasy.client.jaxrs.internal.ClientInvocation.lambda$executorSubmit$9(ClientInvocation.java:829)
[INFO] [err] at java.base/java.util.concurrent.CompletableFuture$AsyncSupply.run(CompletableFuture.java:1768)
[INFO] [err] ... 6 more
[INFO] [err] Caused by: jakarta.ws.rs.WebApplicationException: Unexpected entity instance: org.jboss.resteasy.plugins.providers.multipart.ResteasyEntityPartBuilder$EntityPartImpl
[INFO] [err] at org.jboss.resteasy.plugins.providers.multipart.IBMMultipartListProvider.writeTo(IBMMultipartListProvider.java:150)
[INFO] [err] at [internal classes]
[INFO] [err] ... 9 more
Steps to Reproduce
Enable Features:
cdi-4.0
mpRestClient-3.0
Create a Rest Client with post form-data @post @path("/path") @produces(MediaType.APPLICATION_JSON) @consumes(MediaType.MULTIPART_FORM_DATA)
CompletionStage postMethod(@HeaderParam("Authorization")String bearerToken, List parts) throws IOException, ProcessingException;
Consume the service from RequestScoped bean
....
restClient.postMethod().whenComplete(consumer);
Expected behavior
Expeected is multipart/form-data POST call to success the same way as a GET call
Diagnostic information:
OpenLiberty Version: 24.0.0.5
Affected feature: mpRestClient-3.0
Java Version: OpenJDK 64-Bit Server VM Temurin-21.0.3+9 (build 21.0.3+9-LTS, mixed mode, sharing)
yooman00
changed the title
mpRestClient multipart/ form-data asynchronous
mpRestClient multipart/form-data with List<EntityPart> asynchronous failed
Feb 13, 2025
yooman00
changed the title
mpRestClient multipart/form-data with List<EntityPart> asynchronous failed
mpRestClient send multipart/form-data with List<EntityPart> asynchronous failed
Feb 13, 2025
Describe the bug
Sending multipart/form-data with mpRestClient asynchronous @restclient (injected in CDI RequestScoped bean) results in exception
[INFO] [err] jakarta.ws.rs.WebApplicationException: Failure in downstream service
[INFO] [err] at ITClass.postMethod(OcrIT.java:104)
[INFO] [err] at ITClass$Proxy$_$$WeldSubclass.postMethod$$super(Unknown Source)
[INFO] [err] at java.base/jdk.internal.reflect.DirectMethodHandleAccessor.invoke(DirectMethodHandleAccessor.java:103)
[INFO] [err] at java.base/java.lang.reflect.Method.invoke(Method.java:580)
[INFO] [err] at org.jboss.weld.interceptor.proxy.TerminalAroundInvokeInvocationContext.proceedInternal(TerminalAroundInvokeInvocationContext.java:51)
[INFO] [err] at org.jboss.weld.interceptor.proxy.AroundInvokeInvocationContext.proceed(AroundInvokeInvocationContext.java:78)
[INFO] [err] at com.ibm.tx.jta.cdi.interceptors.TransactionalInterceptor$2.run(TransactionalInterceptor.java:176)
[INFO] [err] at [internal classes]
[INFO] [err] at java.base/jdk.internal.reflect.DirectMethodHandleAccessor.invoke(DirectMethodHandleAccessor.java:103)
[INFO] [err] at java.base/java.lang.reflect.Method.invoke(Method.java:580)
[INFO] [err] at org.jboss.weld.interceptor.reader.SimpleInterceptorInvocation$SimpleMethodInvocation.invoke(SimpleInterceptorInvocation.java:73)
[INFO] [err] at org.jboss.weld.interceptor.proxy.InterceptorMethodHandler.executeAroundInvoke(InterceptorMethodHandler.java:84)
[INFO] [err] at org.jboss.weld.interceptor.proxy.InterceptorMethodHandler.executeInterception(InterceptorMethodHandler.java:72)
[INFO] [err] at org.jboss.weld.interceptor.proxy.InterceptorMethodHandler.invoke(InterceptorMethodHandler.java:56)
[INFO] [err] at org.jboss.weld.bean.proxy.CombinedInterceptorAndDecoratorStackMethodHandler.invoke(CombinedInterceptorAndDecoratorStackMethodHandler.java:79)
[INFO] [err] at org.jboss.weld.bean.proxy.CombinedInterceptorAndDecoratorStackMethodHandler.invoke(CombinedInterceptorAndDecoratorStackMethodHandler.java:68)
[INFO] [err] at ITClass$Proxy$$$WeldSubclass.postMethod(Unknown Source)
[INFO] [err] at ITClass$Proxy$$$_WeldClientProxy.postMethod(Unknown Source)
[INFO] [err] at java.base/jdk.internal.reflect.DirectMethodHandleAccessor.invoke(DirectMethodHandleAccessor.java:103)
[INFO] [err] at java.base/java.lang.reflect.Method.invoke(Method.java:580)
[INFO] [err] at org.jboss.resteasy.core.MethodInjectorImpl.invoke(MethodInjectorImpl.java:170)
[INFO] [err] at [internal classes]
[INFO] [err] at org.jboss.resteasy.core.ResourceMethodInvoker.lambda$invokeOnTarget$2(ResourceMethodInvoker.java:474)
[INFO] [err] at org.jboss.resteasy.core.interception.jaxrs.PreMatchContainerRequestContext.filter(PreMatchContainerRequestContext.java:434)
[INFO] [err] at [internal classes]
[INFO] [err] at org.jboss.resteasy.core.SynchronousDispatcher.lambda$invoke$4(SynchronousDispatcher.java:261)
[INFO] [err] at org.jboss.resteasy.core.SynchronousDispatcher.lambda$preprocess$0(SynchronousDispatcher.java:161)
[INFO] [err] at org.jboss.resteasy.core.interception.jaxrs.PreMatchContainerRequestContext.filter(PreMatchContainerRequestContext.java:434)
[INFO] [err] at [internal classes]
[INFO] [err] at jakarta.servlet.http.HttpServlet.service(HttpServlet.java:614)
[INFO] [err] at com.ibm.ws.webcontainer.servlet.ServletWrapper.service(ServletWrapper.java:1266)
[INFO] [err] at [internal classes]
[INFO] [err] at java.base/java.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1144)
[INFO] [err] at java.base/java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:642)
[INFO] [err] at java.base/java.lang.Thread.run(Thread.java:1583)
[INFO] [err] Caused by: java.util.concurrent.CompletionException: jakarta.ws.rs.ProcessingException: RESTEASY004655: Unable to invoke request: jakarta.ws.rs.WebApplicationException: Unexpected entity instance: org.jboss.resteasy.plugins.providers.multipart.ResteasyEntityPartBuilder$EntityPartImpl
[INFO] [err] at java.base/java.util.concurrent.CompletableFuture.encodeThrowable(CompletableFuture.java:315)
[INFO] [err] at java.base/java.util.concurrent.CompletableFuture.completeThrowable(CompletableFuture.java:320)
[INFO] [err] at java.base/java.util.concurrent.CompletableFuture.uniHandle(CompletableFuture.java:936)
[INFO] [err] at java.base/java.util.concurrent.CompletableFuture$UniHandle.tryFire(CompletableFuture.java:911)
[INFO] [err] at java.base/java.util.concurrent.CompletableFuture.postComplete(CompletableFuture.java:510)
[INFO] [err] at java.base/java.util.concurrent.CompletableFuture$AsyncSupply.run(CompletableFuture.java:1773)
[INFO] [err] at org.jboss.resteasy.microprofile.client.impl.MpClientInvocation$Decorator.lambda$decorate$0(MpClientInvocation.java:93)
[INFO] [err] at org.jboss.resteasy.concurrent.ContextualExecutors.lambda$runnable$3(ContextualExecutors.java:313)
[INFO] [err] at io.openliberty.restfulWS.client.internal.ThreadContextAsyncTaskWrapper$3.run(ThreadContextAsyncTaskWrapper.java:70)
[INFO] [err] ... 3 more
[INFO] [err] Caused by: jakarta.ws.rs.ProcessingException: RESTEASY004655: Unable to invoke request: jakarta.ws.rs.WebApplicationException: Unexpected entity instance: org.jboss.resteasy.plugins.providers.multipart.ResteasyEntityPartBuilder$EntityPartImpl
[INFO] [err] at org.jboss.resteasy.client.jaxrs.engines.ManualClosingApacheHttpClient43Engine.invoke(ManualClosingApacheHttpClient43Engine.java:391)
[INFO] [err] at [internal classes]
[INFO] [err] at org.jboss.resteasy.client.jaxrs.internal.ClientInvocation.lambda$executorSubmit$9(ClientInvocation.java:829)
[INFO] [err] at java.base/java.util.concurrent.CompletableFuture$AsyncSupply.run(CompletableFuture.java:1768)
[INFO] [err] ... 6 more
[INFO] [err] Caused by: jakarta.ws.rs.WebApplicationException: Unexpected entity instance: org.jboss.resteasy.plugins.providers.multipart.ResteasyEntityPartBuilder$EntityPartImpl
[INFO] [err] at org.jboss.resteasy.plugins.providers.multipart.IBMMultipartListProvider.writeTo(IBMMultipartListProvider.java:150)
[INFO] [err] at [internal classes]
[INFO] [err] ... 9 more
Steps to Reproduce
cdi-4.0
mpRestClient-3.0
@post
@path("/path")
@produces(MediaType.APPLICATION_JSON)
@consumes(MediaType.MULTIPART_FORM_DATA)
CompletionStage postMethod(@HeaderParam("Authorization")String bearerToken, List parts) throws IOException, ProcessingException;
....
restClient.postMethod().whenComplete(consumer);
Expected behavior
Expeected is multipart/form-data POST call to success the same way as a GET call
Diagnostic information:
Additional context
Add any other context about the problem here.
The text was updated successfully, but these errors were encountered: