Do not input private or sensitive data. View Qlik Privacy & Cookie Policy.
Skip to main content

Announcements
Qlik Open Lakehouse is Now Generally Available! Discover the key highlights and partner resources here.
cancel
Showing results for 
Search instead for 
Did you mean: 
Anonymous
Not applicable

Simple Salesforce Job error

Hi,
I have built my first Salesforce job in Talend and I am getting the following error:
connecting to socket on port 3646
connected
Exception in component tSalesforceOutput_1
java.lang.ClassCastException: org.talend.salesforceBulk.SforceBasicBulkConnection cannot be cast to org.talend.salesforce.SforceConnection
at sf___from_contact___pa.partial1_set_migration_id_on_contact_0_1.Partial1_set_Migration_ID_on_Contact.tSalesforceInput_1Process(Partial1_set_Migration_ID_on_Contact.java:4524)
at sf___from_contact___pa.partial1_set_migration_id_on_contact_0_1.Partial1_set_Migration_ID_on_Contact.runJobInTOS(Partial1_set_Migration_ID_on_Contact.java:5409)
at sf___from_contact___pa.partial1_set_migration_id_on_contact_0_1.Partial1_set_Migration_ID_on_Contact.main(Partial1_set_Migration_ID_on_Contact.java:5242)
disconnected
The following images describe the job:
0683p000009ME7v.png
0683p000009MDfg.png
0683p000009ME80.png
Labels (4)
4 Replies
Anonymous
Not applicable
Author

It looks like you may set-up one or both of your tSalesforceConnection as "For Salesforce bulk component" but you're not using the bulk components.
Review these and un-select if you have.
Anonymous
Not applicable
Author

Thanks mate.
I actually changed my job a fair bit.
I removed the tSalesforceConnection components and setup the tSalesforceInput and tSalesforceOutput to use connections from my repository and it seems to work now, but it is painfully slow as it processing 200 rows at a time.
0683p000009ME4O.png
0683p000009ME85.png
0683p000009ME10.png
Anonymous
Not applicable
Author

I'd recommend not getting in to the habit of using a connection from the repository. I would stick with using tSalesforceConnection and externalise your connection parameters.
I would drop the data in to a file before writing to Salesforce. This will allow you to checkpoint your Job and also allow you to make use of Bulk Components.
What is your data volume?
There are bulk components that will speed things up.
I think Salesforce recommend using Bulk for anything over a couple of hundred records.
CRTtech
Contributor
Contributor

I'd recommend not getting in to the habit of using a connection from the repository. I would stick with using tSalesforceConnection and externalise your connection parameters.

When I do this, I get a Null error off the connection object when I try to use it. 
Someone posted someplace that you may have to 'open the connection' before you use it, and that makes sense from a database connectivity point-of-view to me, but I haven't used Talend enough to know if that means dropping a tOpenThisConnection object or something on the palette or if there's something else to do.. 
I have mine pointing at the repository for my objects now too currently, and it is very slow, as mentioned above...