title: POST entity with a byte array attribute as JSON
body: <p>I'm new with REST and have to make a POST that receive an entity with a nested object that has inside a byte array.
  This is my POST:</p>
  
  <pre><code>@POST
  @Path("/post-entity")
  @Consumes({MediaType.APPLICATION_JSON, MediaType.APPLICATION_XML})
  @Produces({MediaType.APPLICATION_JSON, MediaType.APPLICATION_XML})
  public Response processEventcallback(ProcessEvent processEvent) {
  
      System.out.println(entity.toString());
      return null;
  }
  </code></pre>
  
  <p>I call the POST like this:</p>
  
  <pre><code>    Client client = ClientBuilder.newClient();
      Entity entity = new Entity ();
      entity .setId("645");
      entity .setKey("cqp");
      entity .setVersion("1.0");
  
      Message msg= new Message();
      msg.setContent(Base64.getEncoder().encode("post test".getBytes()));
      msg.setId("carl");
      entity.setMsg(msg);
  
      WebTarget target = client.target("http://localhost:8080/myRest/webapi/");
  
      Response response = target.path("send" ).request()
              .post(Entity.entity(entity, MediaType.APPLICATION_JSON));
  </code></pre>
  
  <p>When i use xml as media type in the post it's all ok, the problem is when i use (json as in the code before), i get:</p>
  
  <pre><code>javax.ws.rs.ProcessingException: javax/mail/internet/MimeMultipart
  ...
  ...
  Caused by: java.lang.NoClassDefFoundError: javax/mail/internet/MimeMultipart
  </code></pre>
  
  <p>if I remove the byte array in message it works just fine</p>