Add attachment service to jira is rejecting the request .

I am hitting the add attachment rest service  from my application. The request is getting failed with below exception.

* Error mapping incoming response to .response_POST: com.fasterxml.jackson.databind.JsonMappingException: Can not instantiate value of type [map type; class java.util.LinkedHashMap, [simple type, class java.lang.Object] -> [simple type, class java.lang.Object]] from String value ('1.0'); no single-String constructor/factory method
at [Source: "1.0" encoding="UTF-8" standalone="yes"?><status><status-code>500</status-code><message>org.apache.commons.fileupload.FileUploadException: the request was rejected because no multipart boundary was found</message><stack-trace>java.lang.RuntimeException: org.apache.commons.fileupload.FileUploadException: the request was rejected because no multipart boundary was found
at com.sun.jersey.spi.container.ContainerRequest.getEntity(
at com.sun.jersey.spi.container.AdaptingContainerRequest.getEntity(

2 answers

Request generated is below


No Title
POST /rest/api/latest/issue/PHOENIX-38/attachments HTTP/1.1
Accept: */*
Content-Type: multipart/form-data;
X-Atlassian-Token: no-check
Content-Length: 407
Connection: Keep-Alive
User-Agent: Apache-HttpClient/4.5.2 (Java/1.8.0_111)
Accept-Encoding: gzip,deflate
Authorization: Basic YW5pbHZhbmFwYXJ0aGlAZ21haWwuY29tOnBlZ2FydWxlcw==

Content-Disposition: form-data; name="PostData"

{"fields":{"summary":"up dtaedfrom RTA Integration","issuetype":{"name":"Bug"},"file":"Hello.txt","project":{"key":"PHOENIX"}}}
Content-Type: text/plain
Content-Disposition: form-data; name="file"; filename="Hello.txt"


0 votes
Sam Hall Community Champion Apr 10, 2017

Hi Harish - Welcome to the community.

Since your question is development related, you can also try asking this over at: (if you haven't already).

You can read more about the Developer Community in this article:

Suggest an answer

Log in or Sign up to answer
Community showcase
Published Nov 29, 2018 in Jira

How to set up an incident workflow from the VP of Engineering at Sentry

Hey Atlassian community, I help lead engineering at Sentry, an open-source error-tracking and monitoring tool that integrates with Jira. We started using Jira Software Cloud internally last year, a...

1,080 views 0 8
Read article

Atlassian User Groups

Connect with like-minded Atlassian users at free events near you!

Find a group

Connect with like-minded Atlassian users at free events near you!

Find my local user group

Unfortunately there are no AUG chapters near you at the moment.

Start an AUG

You're one step closer to meeting fellow Atlassian users at your local meet up. Learn more about AUGs

Groups near you