+ Start a Discussion
Tu Nguyen 10Tu Nguyen 10 

Bulk API: Unknown exception in Async API - while trying to create a job

Hi,

We started receiving an exception while trying to invoke the Bulk API to create a job in our Sandbox.  We haven't had any issues before until now.  Our code is unchanged since the last time we touched it.  I was able to capture the request as well as the response.  The call to the SOAP service to log in works fine and returns a sessionID, but when we build the request to create a job it returns the 400 Bad Request response.  Once I stream the response out to get the details I get the following:

  <?xml version="1.0" encoding="UTF-8"?><error
   xmlns="http://www.force.com/2009/06/asyncapi/dataload">
 <exceptionCode>Unknown</exceptionCode>
 <exceptionMessage>Unknown exception in Async API. Please contact support with ID: 1190435897-34246 (361211693)</exceptionMessage>
</error>

Here is the request string we submit, nothing has changed here:
<?xml version="1.0" encoding="UTF-8"?>
    <jobInfo xmlns="http://www.force.com/2009/06/asyncapi/dataload">
        <operation>query</operation>
        <object>Account</object>
               
        <contentType>CSV</contentType>
    </jobInfo>

I've verified the endpoint that it is hitting as well, nothing has changed here either.
https://cs9-api.salesforce.com/services/async/31.0/job

I've checked permissions on the Salesforce objects to verify select access, I've tried a couple of different user credentials in place of our API user that we set up with no luck.  Any help would be appreciated.
pconpcon
The only way to know what is causing this error is to contact Salesforce support directly and provide them with the error number "1190435897-34246 (361211693)" so they can look it up in their logging system.
Tu Nguyen 10Tu Nguyen 10
A ticket was created with support, still waiting on a resolution.  The response they gave me is that it shows a a null pointer exception in their logs and they are looking into it.
john yungkjohn yungk
Not sure if this is the problem, but the endpoint address is a little different than what I normally use, specifically the "-api" portion. I get my endpoint address from com.sforce.soap.partner.LoginResult.getServerUrl() after perform a login using SOAP API. This returns "https://cs18.salesforce.com/services/Soap/m/31.0/..." which is then modified for bulk job creation as "https://cs18.salesforce.com/services/async/31.0/job".

Good luck,
John
Tu Nguyen 10Tu Nguyen 10
@John I do a similar process by taking the instance returned from the login and substituting it in the Bulk API endpoint.  I'll take a look and modify the outgoing endpoint and remove the "-api" to see if that does anything.  My only concern is that it has been this way since initial implementation and worked just fine in both sandbox and prod.  Its currently working on production today, just not the sandbox... 
Tu Nguyen 10Tu Nguyen 10
@John, just tried removing the "-api" from the endpoint and still same error as expected so no luck there.