• BC_IA
  • NEWBIE
  • 0 Points
  • Member since 2012

  • Chatter
    Feed
  • 0
    Best Answers
  • 0
    Likes Received
  • 0
    Likes Given
  • 0
    Questions
  • 6
    Replies

Hi,

 

We use the Bulk API to query data from Salesforce. We have encountered a problem. If we execute the following code:

 

// Login
SforceServiceLocator locator = new SforceServiceLocator();
SoapBindingStub binding = (SoapBindingStub) locator.getSoap();
LoginResult result = binding.login(USERNAME, PASSWORD+SECURITY_TOKEN);
binding._setProperty(Stub.ENDPOINT_ADDRESS_PROPERTY, result.getServerUrl());
binding.setHeader(locator.getServiceName().getNamespaceURI(), "SessionHeader", 
new SessionHeader(result.getSessionId()));

// Create bulk connection
ConnectorConfig config = new ConnectorConfig();
config.setSessionId(result.getSessionId());
String serverUrl = result.getServerUrl();
String apiVersion = "22.0";
String restEndpoint = serverUrl.substring(0, serverUrl.indexOf("Soap/")) + "async/" + apiVersion;
config.setRestEndpoint(restEndpoint);
config.setCompression(true);
config.setTraceMessage(false);
BulkConnection connection = new BulkConnection(config);

// Create new job
System.out.println("Creating job");
JobInfo job = new JobInfo();
job.setObject("Campaign");
job.setOperation(OperationEnum.query);
job.setContentType(ContentType.CSV);
job.setConcurrencyMode(ConcurrencyMode.Serial);
job = connection.createJob(job);

We get the following error:
Creating job
[AsyncApiException  exceptionCode='Unknown'
 exceptionMessage='Unknown exception in Async API. Please contact support with ID: 858593402-23999 (-862000079)'
]
at com.sforce.async.BulkConnection.parseAndThrowException(BulkConnection.java:108)
at com.sforce.async.BulkConnection.createOrUpdateJob(BulkConnection.java:92)
at com.sforce.async.BulkConnection.createJob(BulkConnection.java:72)
at salesforce.SalesforceBulkApiTest.main(SalesforceBulkApiTest.java:68)

This seems to be related to the object selection. For example if we change it to:
job.setObject("Contact")
We do not get this error. We get similar errors for other tables. If its the case that these tables cannot be queried, can we determine this before we execute the query?
Thanks!
Chris

Hi all,

 

I'm trying to start a Job via the Bulk API to query the AccountHistory table, but I get this error:

 

'Unknown exception in Async API. Please contact support with ID: ###'

 

Same goes for LeadHistory, etc.  Are the History tables not supported in the Bulk query API?

 

Thanks!

Chung

When I make calls for a job, I keep getting the same error message over and over...

FeatureNotEnabled

The Bulk API is not enabled for this organization.

 

How do you enable bulk api? we have a enterprise license

  • December 29, 2010
  • Like
  • 0