Skip to main content
Announcements
SYSTEM MAINTENANCE: Thurs., Sept. 19, 1 AM ET, Platform will be unavailable for approx. 60 minutes.
cancel
Showing results for 
Search instead for 
Did you mean: 
Anonymous
Not applicable

How to run jobs in parallel using tparallelize component?

Hi,
I am using a java routine in my project which download the data of the object from Sales Force, and load that data into sql server tables one by one each table . 
I want to do this process parallel so that 2 tables load at a time using tParallelize component . My design as follows-
 


My java Routine is called inside the tRunJob components at a time after setting the parameters correctly in context using "Set Context " as shown above.

I get following error during execution -

[ERROR] 2017-03-14 04:43:12,286: {routines.GenerateSFData} - Download Data -  [AsyncApiException  exceptionCode='InvalidSessionId'
 exceptionMessage='Invalid session id'
]

Closing job..l
[AsyncApiException  exceptionCode='InvalidSessionId'
 exceptionMessage='Invalid session id'
]

at com.sforce.async.BulkConnection.parseAndThrowException(BulkConnection.java:180)
at com.sforce.async.BulkConnection.doHttpGet(BulkConnection.java:744)
at com.sforce.async.BulkConnection.getBatchResultStream(BulkConnection.java:609)
at com.sforce.async.BulkConnection.getQueryResultList(BulkConnection.java:639)
at com.sforce.async.BulkConnection.getQueryResultList(BulkConnection.java:635)
at routines.GenerateSFData.downloadCSVFiles(GenerateSFData.java:588)
at routines.GenerateSFData.retrieveData(GenerateSFData.java:348)
at avasf.ava_sf2db_0_1.Ava_SF2DB.tJava_4Process(Ava_SF2DB.java:6887)
at avasf.ava_sf2db_0_1.Ava_SF2DB.tFileList_1Process(Ava_SF2DB.java:4806)
at avasf.ava_sf2db_0_1.Ava_SF2DB.tFileList_6Process(Ava_SF2DB.java:12956)
at avasf.ava_sf2db_0_1.Ava_SF2DB.tJava_1Process(Ava_SF2DB.java:12599)
at avasf.ava_sf2db_0_1.Ava_SF2DB.tMSSqlInput_3Process(Ava_SF2DB.java:12448)
at avasf.ava_sf2db_0_1.Ava_SF2DB.tSetGlobalVar_1Process(Ava_SF2DB.java:11989)
at avasf.ava_sf2db_0_1.Ava_SF2DB.runJobInTOS(Ava_SF2DB.java:22973)
at avasf.ava_sf2db_0_1.Ava_SF2DB.runJob(Ava_SF2DB.java:22287)
at avasf.avasf_mainjob_copy_0_1.AvaSF_MainJob_Copy.tRunJob_1Process(AvaSF_MainJob_Copy.java:5913)
at avasf.avasf_mainjob_copy_0_1.AvaSF_MainJob_Copy$3.run(AvaSF_MainJob_Copy.java:4888)
[ERROR] 2017-03-14 04:43:12,489: {routines.GenerateSFData} - Exception while closing the job - closeJob method -  [AsyncApiException  exceptionCode='InvalidSessionId'
 exceptionMessage='Invalid session id'
]

Labels (2)
2 Replies
TRF
Champion II
Champion II

Hi,
exceptionCode='InvalidSessionId' means you're not connected to Salesforce.
Regards,
TRF
Anonymous
Not applicable
Author

Thanks TRF for you reply,
I have resolved connection issue as one of the object starts executing but when it ends my routine call is also closed so gives -
[size=1][font=Verdana, Helvetica, Arial, sans-serif][ERROR] 2017-03-14 04:43:12,489: {routines.GenerateSFData} - Exception while closing the job - closeJob method -  [AsyncApiException  exceptionCode='InvalidSessionId'[/font][/size]
I want to do this process parallel so that 2 tables load at a time using tParallelize component, can u to solve this issue?

Thanks,
Vaibhav