javax.ws.rs.ProcessingException: Missing body part entity of type "text/plain".

Stack Overflow | DODO | 7 months ago
tip
Click on the to mark the solution that helps you, Samebug will learn from it.
As a community member, you’ll be rewarded for you help.
  1. 0

    Upload file in java

    Stack Overflow | 7 months ago | DODO
    javax.ws.rs.ProcessingException: Missing body part entity of type "text/plain".
  2. 0

    No available MessageBodyWriter for media type "multipart/form-data"

    Stack Overflow | 1 week ago | Ozil
    java.lang.IllegalArgumentException: No available MessageBodyWriter for class "class java.io.ByteArrayOutputStream" and media type "multipart/form-data".

    Root Cause Analysis

    1. java.lang.IllegalArgumentException

      Missing body part entity of type "text/plain".

      at org.glassfish.jersey.media.multipart.internal.MultiPartWriter.writeTo()
    2. org.glassfish.jersey
      MultiPartWriter.writeTo
      1. org.glassfish.jersey.media.multipart.internal.MultiPartWriter.writeTo(MultiPartWriter.java:213)
      2. org.glassfish.jersey.media.multipart.internal.MultiPartWriter.writeTo(MultiPartWriter.java:79)
      2 frames
    3. Jersey Core
      MessageBodyFactory.writeTo
      1. org.glassfish.jersey.message.internal.WriterInterceptorExecutor$TerminalWriterInterceptor.invokeWriteTo(WriterInterceptorExecutor.java:265)
      2. org.glassfish.jersey.message.internal.WriterInterceptorExecutor$TerminalWriterInterceptor.aroundWriteTo(WriterInterceptorExecutor.java:250)
      3. org.glassfish.jersey.message.internal.WriterInterceptorExecutor.proceed(WriterInterceptorExecutor.java:162)
      4. org.glassfish.jersey.message.internal.MessageBodyFactory.writeTo(MessageBodyFactory.java:1130)
      4 frames
    4. jersey-core-client
      JerseyInvocation$1.call
      1. org.glassfish.jersey.client.ClientRequest.doWriteEntity(ClientRequest.java:517)
      2. org.glassfish.jersey.client.ClientRequest.writeEntity(ClientRequest.java:499)
      3. org.glassfish.jersey.client.internal.HttpUrlConnector._apply(HttpUrlConnector.java:388)
      4. org.glassfish.jersey.client.internal.HttpUrlConnector.apply(HttpUrlConnector.java:285)
      5. org.glassfish.jersey.client.ClientRuntime.invoke(ClientRuntime.java:255)
      6. org.glassfish.jersey.client.JerseyInvocation$1.call(JerseyInvocation.java:684)
      7. org.glassfish.jersey.client.JerseyInvocation$1.call(JerseyInvocation.java:681)
      7 frames
    5. Jersey Core
      RequestScope.runInScope
      1. org.glassfish.jersey.internal.Errors.process(Errors.java:315)
      2. org.glassfish.jersey.internal.Errors.process(Errors.java:297)
      3. org.glassfish.jersey.internal.Errors.process(Errors.java:228)
      4. org.glassfish.jersey.process.internal.RequestScope.runInScope(RequestScope.java:444)
      4 frames
    6. jersey-core-client
      JerseyInvocation$Builder.post
      1. org.glassfish.jersey.client.JerseyInvocation.invoke(JerseyInvocation.java:681)
      2. org.glassfish.jersey.client.JerseyInvocation$Builder.method(JerseyInvocation.java:437)
      3. org.glassfish.jersey.client.JerseyInvocation$Builder.post(JerseyInvocation.java:343)
      3 frames
    7. coucou
      Eclient.main
      1. coucou.Eclient.main(Eclient.java:150)
      1 frame