tSalesforceInput return null message when Invalid Login

One Star

tSalesforceInput return null message when Invalid Login

I can't get the tSalesforceInput error message pop-up in Message box and log into Job "logs_file.txt" when Salesforce login details is invalid. I can see the following error when I RUN from TOS: -
Exception in component tSalesforceInput_5
AxisFault
faultCode: {urn:fault.partner.soap.sforce.com}INVALID_LOGIN
faultSubcode:
faultString: INVALID_LOGIN: Invalid username, password, security token; or user locked out.
faultActor:
faultNode:
faultDetail:
{urn:fault.partner.soap.sforce.com}LoginFault:<ns1:exceptionCode>INVALID_LOGIN</ns1:exceptionCode><ns1:exceptionMessage>Invalid username, password, security token; or user locked out.</ns1:exceptionMessage>
This is the message log into logs_file.txt: -
2009-03-24 11:15:21;rhhAc2;ISEOyH;ISEOyH;salesforce_sync;Salesforce_NewAccount_Sync;Default;6;Java Exception;tSalesforceInput_5;;1
I am using Talend version 3.0.3.
Please help.
One Star

Re: tSalesforceInput return null message when Invalid Login

Found an interim solution to overcome this problem by modifying tSalesforceInput_begin.javajet and tSalesforceOutput_begin.javajet.
C:\TOS-Win32-r21383-V3.0.3\plugins\org.talend.designer.components.localprovider_3.0.3.r21383\components\tSalesforceInput\tSalesforceInput_begin.javajet: -
try {
sforceManagement_<%=cid %>.login(<%=username %>, <%=password %>, <%=endpoint %>);
} catch(com.sforce.soap.partner.fault.LoginFault ex2){

Exception e = new Exception(ex2.getExceptionMessage());
throw new TalendException(e, currentComponent, globalMap);
}
................
java.util.List<com.sforce.soap.partner.sobject.SObject> list_<%=cid %>=null;
try {

list_<%=cid %> = sforceManagement_<%=cid %>.query(sb_<%=cid %>.toString());

} catch(com.sforce.soap.partner.fault.InvalidSObjectFault ex1){

Exception e = new Exception(ex1.getExceptionMessage());
throw new TalendException(e, currentComponent, globalMap);
} catch(com.sforce.soap.partner.fault.MalformedQueryFault ex2){

Exception e = new Exception(ex2.getExceptionMessage());
throw new TalendException(e, currentComponent, globalMap);
} catch(com.sforce.soap.partner.fault.InvalidFieldFault ex3){

Exception e = new Exception(ex3.getExceptionMessage());
throw new TalendException(e, currentComponent, globalMap);
} catch (com.sforce.soap.partner.fault.UnexpectedErrorFault ex4){

Exception e = new Exception(ex4.getExceptionMessage());
throw new TalendException(e, currentComponent, globalMap);
} catch (java.rmi.RemoteException ex5) {

Exception e = new Exception(ex5.getMessage());
throw new TalendException(e, currentComponent, globalMap);
}
C:\TOS-Win32-r21383-V3.0.3\plugins\org.talend.designer.components.localprovider_3.0.3.r21383\components\tSalesforceOutput\tSalesforceOutput_begin.javajet: -
//sforceManagement_<%=cid %>.login(<%=username %>, <%=password %>, <%=endpoint %>, <%=commitLevel%>, <%=ceaseForError %>, <%=logFile %>);
try{
sforceManagement_<%=cid %>.login(<%=username %>, <%=password %>, <%=endpoint %>, <%=commitLevel%>, <%=ceaseForError %>, <%=logFile %>);
}catch(com.sforce.soap.partner.fault.LoginFault ex2){
Exception e = new Exception(ex2.getExceptionMessage());
throw new TalendException(e, currentComponent, globalMap);
}
Let me know if this is not the correct way.
Cheers

2019 GARNER MAGIC QUADRANT FOR DATA INTEGRATION TOOL

Talend named a Leader.

Get your copy

OPEN STUDIO FOR DATA INTEGRATION

Kickstart your first data integration and ETL projects.

Download now

What’s New for Talend Summer ’19

Watch the recorded webinar!

Watch Now

Best Practices for Using Context Variables with Talend – Part 4

Pick up some tips and tricks with Context Variables

Blog

How Media Organizations Achieved Success with Data Integration

Learn how media organizations have achieved success with Data Integration

Read

Definitive Guide to Data Quality

Create systems and workflow to manage clean data ingestion and data transformation.

Download