function readOnly(count){ }
Starting November 20, the site will be set to read-only. On December 4, 2023,
forum discussions will move to the Trailblazer Community.
+ Start a Discussion
sforcenewbiesforcenewbie 

command line dataloader throws null pointer exception at arbitrary points during upser

Hello,

 

Command Line Data Loader throws a Null Pointer exception at arbitrary points of file processing. We are trying to upsert account records and have about 200,000 records in a mysql database. We are using the command line dataloader to query our mysql DB and then push/upsert data into Salesforce. We have set the bulk api to false.

 

java.lang.NullPointerException at com.salesforce.dataloader.dyna.SObjectReference.addReferenceToSObject(SObjectReference.java:67) at com.salesforce.dataloader.dyna.SforceDynaBean.getSObject(SforceDynaBean.java:290) at com.salesforce.dataloader.dyna.SforceDynaBean.getSObjectArray(SforceDynaBean.java:258) at com.salesforce.dataloader.client.PartnerClient.loadUpserts(PartnerClient.java:172) at com.salesforce.dataloader.action.visitor.UpsertVisitor.executeClientAction(UpsertVisitor.java:53) at com.salesforce.dataloader.action.visitor.PartnerLoadVisitor.loadBatch(PartnerLoadVisitor.java:73) at com.salesforce.dataloader.action.visitor.DAOLoadVisitor.visit(DAOLoadVisitor.java:131) at com.salesforce.dataloader.action.AbstractLoadAction.visitRowList(AbstractLoadAction.java:202) at com.salesforce.dataloader.action.AbstractLoadAction.execute(AbstractLoadAction.java:148) at com.salesforce.dataloader.controller.Controller.executeAction(Controller.java:122) at com.salesforce.dataloader.process.ProcessRunner.run(ProcessRunner.java:126) at com.salesforce.dataloader.process.ProcessRunner.main(ProcessRunner.java:229)2010-10-01 19:06:26,034 FATAL [queryaccountProcess] action.AbstractLoadAction execute (AbstractLoadAction.java:172) - Exception occured durin

 

Can anyone throw some light on how to resolve this issue?

dkadordkador

What version of the DataLoader are you using?

sforcenewbiesforcenewbie

I am using Ver 19.

 

This error is truly random and with several tries it fails at different points. We are dealing with around 400K records on average and were forced to split our batch into 50K records.

 

This reduced the frequency of the error but it still pops up around 37K records. If we re-run the process it gets done so the behaviour does not seem to be specific to my data.

 

For eg my I have LIMIT say 0, 50000 in my mysql query. The same results say throws the error around 37K first time during upsert. If I rerun the batch 9 times out of 10 it gets done without errors.

 

 

dkadordkador

If your org has been upgraded to winter 11, please download the latest version of DataLoader and try that.  We believe we've fixed this issue in the latest version.

LeadClic DeveloperLeadClic Developer

I was getting the same problem, no matter what if I use SQLServer2008 or CSV as source, Dataloader 18 or Dataloader 20, Cable or Wifi... the erro appeared here and then more or less at the same point with small record differences...

 

Finally I found a solution that worked for me! The problem seem to be related to the screen buffer of the command line in windows (I'm using Windows7). My process throw plenty of errors due an upsert with many external object references not working frequently... the solution is as easy as throwing the execution to a file instead of the screen, for example:

 

echo ************* Let's ROLL! **************

java.exe -cp c:\DataLoader\DataLoader.jar;C:\DataLoader\sqljdbc_3.0\enu\sqljdbc4.jar -Dsalesforce.config.dir=c:\DataLoader\conf com.salesforce.dataloader.process.ProcessRunner process.name=TESTProcess >> result.txt

 

As simple as that... but after several tries and millions of rows procesed... that seems to be the problem and the solution for me.

 

While procesing, if you need to know the state you can open the result.txt file at any time to see how is it going, and the last modified date/time of the file will tell you too how is it going.

 

Hope that helps :)