IBM Support

PH68322: SENDING MULTIPART/FORM-DATA WITH MPRESTCLIENT ASYNCHRONOUS @REST

Subscribe to this APAR

By subscribing, you receive periodic emails alerting you to the status of the APAR, along with a link to the fix after it becomes available. You can track this item individually or track all items by product.

Notify me when this APAR changes.

Notify me when an APAR for this component changes.

 

APAR status

  • Closed as program error.

Error description

  • Sending multipart/form-data with mpRestClient asynchronous
    @restclient (injected in CDI RequestScoped bean) results in
    exception. The same Request works synchronous as expected.The
    problem that is being experienced is because the wrong
    MessageBodyWriter is being selected to process the async
    request.
    
    [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.DirectMethodHand
    leAccessor.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.TerminalAround
    InvokeInvocationContext.proceedInternal(TerminalAroundInvokeInv
    ocationContext.java:51)
    [INFO] [err] at org.jboss.weld.interceptor.proxy.AroundInvokeIn
    vocationContext.proceed(AroundInvokeInvocationContext.java:78)
    

Local fix

Problem summary

  • ****************************************************************
    * USERS AFFECTED:  All users of IBM WebSphere Application      *
    *                  Server Liberty Core using Microprofile      *
    *                  Rest Client with asynchronous multipart     *
    *                  processing                                  *
    ****************************************************************
    * PROBLEM DESCRIPTION: The problem results from the            *
    *                      incorrect MessageBodyWriter being       *
    *                      selected in asynchronous                *
    *                      scenario.The following exception        *
    *                      confirms this:                          *
    *                      jakarta.ws.rs.WebApplicationException:  *
    *                      Unexpected entity instance:             *
    *                      org.jboss.resteasy.plugins.providers.mu *
    *                      ltipart.ResteasyEntityPartBuilder$Entit *
    *                      yPartImpl                               *
    *                      SystemErrR at                           *
    *                      org.jboss.resteasy.plugins.providers.mu *
    *                      ltipart.IBMMultipartListProvider.writeT *
    *                      o(IBMMultipartListProvider.java:150)    *
    ****************************************************************
    * RECOMMENDATION:                                              *
    ****************************************************************
    This problem results from the wrong MessageBodyWriter being
    selected for Restful Web Services asynchronous multipart
    processing.  When this occurs an exception similar to the
    following may be in the logs:
    Caused by: jakarta.ws.rs.WebApplicationException: Unexpected
    entity instance:
    org.jboss.resteasy.plugins.providers.multipart.ResteasyEntityPar
    tBuilder$EntityPartImpl
    [20.02.25, 16:21:19:678 MEZ] 0000005d SystemErr
    R 	at
    org.jboss.resteasy.plugins.providers.multipart.IBMMultipartListP
    rovider.writeTo(IBMMultipartListProvider.java:150)
    [20.02.25, 16:21:19:678 MEZ] 0000005d SystemErr
    R 	at
    org.jboss.resteasy.plugins.providers.multipart.IBMMultipartListP
    rovider.writeTo(IBMMultipartListProvider.java:49)
    [20.02.25, 16:21:19:678 MEZ] 0000005d SystemErr
    R 	at
    org.jboss.resteasy.core.interception.jaxrs.AbstractWriterInterce
    ptorContext.writeTo(AbstractWriterInterceptorContext.java:284)
    [20.02.25, 16:21:19:679 MEZ] 0000005d SystemErr
    R 	at
    org.jboss.resteasy.core.interception.jaxrs.AbstractWriterInterce
    ptorContext.syncProceed(AbstractWriterInterceptorContext.java:24
    5)
    [20.02.25, 16:21:19:679 MEZ] 0000005d SystemErr
    R 	at
    org.jboss.resteasy.core.interception.jaxrs.AbstractWriterInterce
    ptorContext.proceed(AbstractWriterInterceptorContext.java:224)
    [20.02.25, 16:21:19:679 MEZ] 0000005d SystemErr
    R 	at
    org.jboss.resteasy.client.jaxrs.internal.ClientInvocation.writeR
    equestBody(ClientInvocation.java:435)
    

Problem conclusion

  • Restful Web Services multipart processing requires
    GenericEntity objects.  The Open Liberty code for multipart
    asynchronous processing was not properly casting the Entity a
    GenericEntity in this scenario.  This caused the wrong
    MessageBodyWriter to be selected.   The code was fixed to
    address this issue.The fix for this APAR is targeted
    for inclusion in 25.0.0.11
    

Temporary fix

Comments

APAR Information

  • APAR number

    PH68322

  • Reported component name

    WAS LIBERTY COR

  • Reported component ID

    5725L2900

  • Reported release

    CD0

  • Status

    CLOSED PER

  • PE

    NoPE

  • HIPER

    NoHIPER

  • Special Attention

    NoSpecatt / Xsystem

  • Submitted date

    2025-09-29

  • Closed date

    2025-10-27

  • Last modified date

    2025-10-27

  • APAR is sysrouted FROM one or more of the following:

  • APAR is sysrouted TO one or more of the following:

Fix information

  • Fixed component name

    WAS LIBERTY COR

  • Fixed component ID

    5725L2900

Applicable component levels

[{"Business Unit":{"code":"BU048","label":"IBM Software"},"Product":{"code":"SSD28V","label":"WebSphere Application Server Liberty Core"},"Platform":[{"code":"PF025","label":"Platform Independent"}],"Version":"CD0","Line of Business":{"code":"LOB77","label":"Automation Platform"}}]

Document Information

Modified date:
27 October 2025