title: MessageBodyWriter not found for media type=application/octet-stream, type=class java.util.HashMap, genericType=class java.util.HashMap
body: <p>do I need a rest to answer files and download them with a method get or some other http method, but I've got this error which I will describe below:</p>
  
  <pre><code>GRAVE: MessageBodyWriter not found for media type=application/octet-stream, type=class java.util.HashMap, genericType=class java.util.HashMap.
  </code></pre>
  
  <p>This is a class example which gives me the same error, download any pdf file but I have the same error with this.</p>
  
  <pre><code>@GET
  @Path("/pdf")
  public Response downloadPdfFile() {
      StreamingOutput fileStream = new StreamingOutput() {
          @Override
          public void write(java.io.OutputStream output) throws IOException, WebApplicationException {
              System.out.println("ENTRANDO!!!!");
              FileInputStream fileInputStream = new FileInputStream(new File(FILE_PATH));
              byte[] buffer = new byte[1024];
              int count = 0;
              while ((count = fileInputStream.read(buffer)) &gt;= 0) {
                  output.write(buffer, 0, count);
              }
              output.flush();
          }
      };
      return Response
              .ok(fileStream, MediaType.APPLICATION_OCTET_STREAM)
              .header("content-disposition", "attachment; filename = myfile.pdf")
              .build();
  }
  </code></pre>
  
  <p>with these units that are used:</p>
  
  <pre><code>&lt;dependency&gt;
      &lt;groupId&gt;org.glassfish.jersey.media&lt;/groupId&gt;
      &lt;artifactId&gt;jersey-media-json-jackson&lt;/artifactId&gt;
      &lt;version&gt;2.6&lt;/version&gt;
  &lt;/dependency&gt;
  &lt;dependency&gt;
      &lt;groupId&gt;javax&lt;/groupId&gt;
      &lt;artifactId&gt;javaee-api&lt;/artifactId&gt;
      &lt;version&gt;7.0&lt;/version&gt;
      &lt;type&gt;jar&lt;/type&gt;
  &lt;/dependency&gt;
  &lt;dependency&gt;
      &lt;groupId&gt;javax&lt;/groupId&gt;
      &lt;artifactId&gt;javaee-web-api&lt;/artifactId&gt;
      &lt;version&gt;6.0&lt;/version&gt;
      &lt;scope&gt;provided&lt;/scope&gt;
  &lt;/dependency&gt;
  &lt;dependency&gt;
      &lt;groupId&gt;org.glassfish.jersey&lt;/groupId&gt;
      &lt;artifactId&gt;jersey-bom&lt;/artifactId&gt;
      &lt;version&gt;2.22.1&lt;/version&gt;
      &lt;type&gt;pom&lt;/type&gt;
      &lt;scope&gt;compile&lt;/scope&gt;
  &lt;/dependency&gt;    
  &lt;dependency&gt;
      &lt;groupId&gt;org.glassfish.jersey.containers&lt;/groupId&gt;
      &lt;artifactId&gt;jersey-container-servlet-core&lt;/artifactId&gt;
      &lt;version&gt;2.22.1&lt;/version&gt;
      &lt;type&gt;jar&lt;/type&gt;
      &lt;scope&gt;compile&lt;/scope&gt;
  &lt;/dependency&gt;     
  &lt;dependency&gt;
      &lt;groupId&gt;org.apache.logging.log4j&lt;/groupId&gt;
      &lt;artifactId&gt;log4j-api&lt;/artifactId&gt;
      &lt;version&gt;2.1&lt;/version&gt;
  &lt;/dependency&gt;
  &lt;dependency&gt;
      &lt;groupId&gt;org.apache.logging.log4j&lt;/groupId&gt;
      &lt;artifactId&gt;log4j-core&lt;/artifactId&gt;
      &lt;version&gt;2.1&lt;/version&gt;
  &lt;/dependency&gt;
  </code></pre>
  
  <p><strong>UPDATE</strong>
  I found that  org.glassfish.jersey.media.multipart.MultiPartFeature in jersey configuration causes the error but i can't remove this feature but i upload multipart files 
  please help </p>