+ Start a Discussion
Jayant DasJayant Das 

java.lang.NullPointerException using CLI Data loader (v21.0 and later)



We have been facing an issue during CLI Data Load extract with Data Loader Version 21.0. The process that we are executing is to extract data from Salesforce and insert the data to a table in Oracle. The issue happens when a lookup field is being referenced in the SOQL query against which no data is returned.


After doing some research we saw that this issue does not happen if we use Data Loader v17.0 (also mentioned @ https://code.google.com/p/dataloadercliq/issues/detail?id=59). However would like to understand if this is a bug that has not been taken care in the recent versions of the data loader?


Any help/pointer on this is really appreciated.


SDL mapping:




<entry key="MySubject__r.Name"  value="java.lang.String"/>


Exception log:

2013-12-11 10:24:17,573 FATAL [main] process.ProcessRunner topLevelError (ProcessRunner.java:211) - Unable to run process accountReplicate
java.lang.RuntimeException: java.lang.NullPointerException
at com.salesforce.dataloader.process.ProcessRunner.run(ProcessRunner.java:136)
at com.salesforce.dataloader.process.ProcessRunner.run(ProcessRunner.java:74)
at com.salesforce.dataloader.process.ProcessRunner.main(ProcessRunner.java:226)
Caused by: java.lang.NullPointerException
at com.salesforce.dataloader.mapping.SOQLMapper.getReferenceField(SOQLMapper.java:222)
at com.salesforce.dataloader.mapping.SOQLMapper.evalSfdcField(SOQLMapper.java:191)
at com.salesforce.dataloader.mapping.SOQLMapper.evalSfdcField(SOQLMapper.java:185)
at com.salesforce.dataloader.mapping.SOQLMapper.normalizeSoql(SOQLMapper.java:169)
at com.salesforce.dataloader.mapping.SOQLMapper.addSoqlFieldMapping(SOQLMapper.java:165)
at com.salesforce.dataloader.mapping.SOQLMapper.putPropertyEntry(SOQLMapper.java:98)
at com.salesforce.dataloader.mapping.Mapper.putPropertyFileMappings(Mapper.java:120)
at com.salesforce.dataloader.mapping.Mapper.putPropertyFileMappings(Mapper.java:115)
at com.salesforce.dataloader.mapping.Mapper.<init>(Mapper.java:76)
at com.salesforce.dataloader.mapping.SOQLMapper.<init>(SOQLMapper.java:57)
at com.salesforce.dataloader.controller.Controller.createMapper(Controller.java:179)
at com.salesforce.dataloader.process.ProcessRunner.run(ProcessRunner.java:120)
... 2 more





Hello Jayant,


I do not see anywhere if this has been reported. This App's provider is Salesforce labs, so please post this on : https://success.salesforce.com/answers


Here you will be clarified about this issue in this app.

Jayant DasJayant Das

Hi Vinita,


I did check https://success.salesforce.com/answers but did not find an option to directly post a question. Is it through submitting a case?


Hi Jayant,


There is no specific section for this, you can post it in "Additional Products" section.


URL: https://success.salesforce.com/answers#!/feedtype=POPULAR&dc=Additional_Products&criteria=BESTANSWERS


You can not post question deirectly, you need to login first. At top right you will see a login button, use salesforce login credentials.



Jayant DasJayant Das

This is similar to the issue mentioned here - http://boards.developerforce.com/t5/General-Development/Data-Loader-Error-getting-value-for-SQL-parameter/td-p/40717/page/2 where this fails if the value for the related sdl entry is not present in SFDC

Jayant DasJayant Das
To update, if anyone comes across this link. We opened a case to Salesforce and they got back mentioning that their support is limited only to the extraction to CSV files. They do not support the process of extraction (not in any csv) and loading the records  to any db in a single process. This however seemed to be a bit disappointing as the data loader code and the concept of process-conf, database-conf, etc. are part of data loader documentation. Ultimately, we ended up using the data loader version 20.0 which did not have this issue but it lacked the feature of extracting deleted records.