• Brooks Bruce 55
  • NEWBIE
  • 0 Points
  • Member since 2017

  • Chatter
    Feed
  • 0
    Best Answers
  • 1
    Likes Received
  • 0
    Likes Given
  • 1
    Questions
  • 0
    Replies
We're seeing a strange new error coming from a simple "SELECT FROM Contact..." call that's causing our nightly SFDC update script to break. Was hoping you could help us troubleshoot, nothing about this query has changed on our end recently. We've been seeing the error for the past 3 nights, and I can consistently reproduce it by re-running the script manually.

Here is the error:
503 org.eclipse.jetty9.servlet.ServletHolder$1: java.lang.IllegalStateException: About-to-be-created singleton instance implicitly appeared through the creation of the factory bean that its bean definition points to

Here is the Python code that produces the error:
"""Get all contacts in salesforce."""
# Don't use bulk api because it doesn't allow for FK queries
if _get_all_sf_contacts.cache is None:
contact_query = '''SELECT Id,
Billing_Account_ID__c,
Email,
AccountId,
Account.Name,
Account.NumberOfEmployees,
Account.Industry,
Account.Owner.Email,
owner.name,
owner.email,
LastActivityDate
FROM Contact'''
all_sf_contacts = []
salesforce = log_in_to_salesforce_api(use_sandbox=use_sandbox)
result = salesforce.query(contact_query)
while True:
all_sf_contacts.extend(result.get('records'))
nextRecordsUrl = result.get('nextRecordsUrl')
if nextRecordsUrl:
result = salesforce.query_more(nextRecordsUrl, True)
else:
break

One thought I had is that we could use the bulk api to make this query if it supported Foreign Key column lookups (i.e. selecting "Account.Name" from Contact), it currently doesn't appear to.

Thanks for your help.
We're seeing a strange new error coming from a simple "SELECT FROM Contact..." call that's causing our nightly SFDC update script to break. Was hoping you could help us troubleshoot, nothing about this query has changed on our end recently. We've been seeing the error for the past 3 nights, and I can consistently reproduce it by re-running the script manually.

Here is the error:
503 org.eclipse.jetty9.servlet.ServletHolder$1: java.lang.IllegalStateException: About-to-be-created singleton instance implicitly appeared through the creation of the factory bean that its bean definition points to

Here is the Python code that produces the error:
"""Get all contacts in salesforce."""
# Don't use bulk api because it doesn't allow for FK queries
if _get_all_sf_contacts.cache is None:
contact_query = '''SELECT Id,
Billing_Account_ID__c,
Email,
AccountId,
Account.Name,
Account.NumberOfEmployees,
Account.Industry,
Account.Owner.Email,
owner.name,
owner.email,
LastActivityDate
FROM Contact'''
all_sf_contacts = []
salesforce = log_in_to_salesforce_api(use_sandbox=use_sandbox)
result = salesforce.query(contact_query)
while True:
all_sf_contacts.extend(result.get('records'))
nextRecordsUrl = result.get('nextRecordsUrl')
if nextRecordsUrl:
result = salesforce.query_more(nextRecordsUrl, True)
else:
break

One thought I had is that we could use the bulk api to make this query if it supported Foreign Key column lookups (i.e. selecting "Account.Name" from Contact), it currently doesn't appear to.

Thanks for your help.