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

Announcements
Learn how to migrate to Qlik Cloud Analytics™: On-Demand Briefing!
cancel
Showing results for 
Search instead for 
Did you mean: 
oliver5
Contributor II
Contributor II

Salesforce Exception: Failed to get next element / only whitespace content allowed

We are unfortunately getting sporadic talend exceptions from the Salesforce Connector when upserting data to Salesforce. This exception seems to occur randomly and it seems it has nothing to do with the data being transferred, because a second attempt on the same data set will not run into an exception.

 

It seems, that there is some kind of library issue, which is quite hard for for us to debug, because we cannot reproduce this issue when running the job in talend studio. Is there a recommendation of what we can do to find out what's causing this issue?

 

This is the full exception: https://pastebin.com/KRjgyQHb

 

tSalesforceOutput_1 com.sforce.ws.ConnectionException: Failed to get next element

java.io.IOException: com.sforce.ws.ConnectionException: Failed to get next element

   at org.talend.components.salesforce.runtime.SalesforceWriter.doUpsert(SalesforceWriter.java:476)

[...]

Caused by: com.sforce.ws.ConnectionException: Failed to get next element

   at com.sforce.ws.parser.XmlInputStream.nextTag(XmlInputStream.java:169)

[...]

Caused by: com.sforce.ws.parser.XmlPullParserException: only whitespace content allowed before start tag and not u (position: START_DOCUMENT seen u... @1:1)

   at com.sforce.ws.parser.MXParser.parseProlog(MXParser.java:1532) ~[force-wsc-53.1.0.jar:?]

[...]

Labels (4)
1 Solution

Accepted Solutions
oliver5
Contributor II
Contributor II
Author

Hey @LucMas,

Yeah, the issue was a Salesforce API issue. We escalated the issue with their DevOps team, as the Salesforce API was sometimes returning 503 status code, which caused this error in Talend. Talend couldn't do anything for us here, so we've rebuilt our jobs and added our own retry mechanism for failed jobs..

View solution in original post

14 Replies
Anonymous
Not applicable

Hello,

Could you please indicate what's Salesforce API version you are using? Please double check the Endpoint URL defined for the tSalesforceOutput component

What does your job look like and did you use any security token?

Best regards

Sabrina

oliver5
Contributor II
Contributor II
Author

Hey, it doesn't seem to be related to a specific job. Occasionally, every existing job fails, no matter how it is built. This behavior occurs approximately once in 24 runs per day.

 

We are using API version 52.0. The tSalesforceOutput component is configured to authenticate using a Security Token, Password, and User ID. We have already checked status.salesforce.com for any technical incidents on our instance, but the API seems to be working as expected. In one job, for example, we're upserting mapped Dynamics CRM data to the Contact component using tMap: tMicrosoftCRMInput -> tMap -> tSalesforceOutput.

 

Do you have any ideas on how to further debug this, or do you think this could be a Salesforce Library/API Bug?

Anonymous
Not applicable

Hello,

All existed jobs failed? All Salesforce jobs?

With your API version 52.0, the "Test" of SalesForce connection setting is OK with you (Connection successful)?

Could you please clarify in which Talend version/edition you are and what's JDK version you are using? Please make sure that you are using compatible version of java.

Best regards

Sabrina

 

oliver5
Contributor II
Contributor II
Author

Yes, the connection is successful. However, it appears that there is an unhandled library issue. For some reason, when Salesforce sends an empty response body (which is happening from time to time), the Talend application crashes. Is there a fix available?

 

Talend Data Integration

Version: 8.0.1

Build id: R2022-12

OS: Windows Server 2022, v.10.0, x86_64 / win32

Java vendor: Azul Systems, Inc.

Java runtime version: 11.0.18+10-LTS

Java version: 11.0.18

 

Anonymous
Not applicable

Hello,

Is it a random issue when upserting data to Salesforce?

In Talend 8, Salesforce Endpoint is updated to v52. What does your module look like in the Modules view?

0695b00000odQYlAAM.pngBest regards

Sabrina

oliver5
Contributor II
Contributor II
Author

Yes, this is a random issue. Here is the module overview:

 

0695b00000odRQxAAM.png

Anonymous
Not applicable

Hello,

It seems to be a bug from your side. Are you using talend subscription 8.0.1? Have you ever installed any patch into your studio? Any support case has been raised for this random issue?

Best regards

Sabrina

 

oliver5
Contributor II
Contributor II
Author

Why do you think it's an internal bug on our side? We'll continue this thread on an internal support ticket from my collegue. ID: 00307018

 

Thanks anyway for your support!

Anonymous
Not applicable

Hello,

As this issue appear randomly, it is a first step to guess this issue could be caused by your configuration, setting or upserting data to salesforce. We need to do further investigation through remote assistance to address this issue.

Best regards

Sabrina