79344081

Date: 2025-01-09 21:33:22
Score: 2
Natty:
Report link

I've the following methods which are not working on Wildfly 34 but working perfectly on OpenLiberty:

@POST
@Path("/upload")
@Consumes(MediaType.MULTIPART_FORM_DATA)
public void uploadFiles(@Context final HttpServletRequest request, @Suspended final AsyncResponse asyncResponse) {
    final var fileParts = request.getParts().stream().filter(part -> "files".equals(part.getName())).toList();
}

Error on wildfly: java.lang.IllegalStateException: UT010057: multipart config was not present on Servlet

Same error for the following:

@POST
@Path("/upload")
@Consumes(MediaType.MULTIPART_FORM_DATA)
public void uploadFile(@FormParam("fileName") final String fileName, @FormParam("file") final InputStream inputStream, @Suspended final AsyncResponse asyncResponse)  {
}

Any hint?

Reasons:
  • Long answer (-0.5):
  • Has code block (-0.5):
  • Ends in question mark (2):
  • Low reputation (1):
Posted by: dabbabi