+ Start a Discussion
Ashish Goel 5Ashish Goel 5 

Error while retriving query results for Bulk API in production instance while the request works fine in sandbox

Hi All,

I am facing this wierd issue where I am trying to run a Bulk API java program. When I tested this program in a sandbox, I was getting success response and results. However, when we moved this to our production, I am getting below error:

[AsyncApiException  exceptionCode='UnsupportedContentType'

 exceptionMessage='Unsupported content type: text/xml'

]

I traced back the error to the Create or update job method of Bulk connection 

Could you let me know what am I missing here.
john yungkjohn yungk
when creating the JobInfo, I set "Content-Type" to "application/xml; charset=UTF-8". Something like the following:
connection.setRequestProperty("Content-Type", "application/xml; charset=UTF-8")
Good luck,
John