Take the 2-minute tour ×
Salesforce Stack Exchange is a question and answer site for Salesforce administrators, implementation experts, developers and anybody in-between. It's 100% free, no registration required.

i tried implementing an example of bulk api provided at link : http://code.google.com/p/sfdc-bulkapi-demo/source/browse/trunk/demo/src/com/jeffdouglas/BulkLoader.java

At run time, i am getting following error :

java.lang.IllegalArgumentException: input stream can not be null

How can i solve it, Please help.

share|improve this question
 
Which line in the sample is throwing that exception? As a wild guess I'd say it can't find the CSV file defined in csvFileName. –  Daniel Ballinger Sep 30 '13 at 19:41
 
Code is properly executed upto line: System.out.println("Awaiting results..." + incomplete.size()); AFter this it throws error, so i feel error is in line: BatchInfo[] statusList = connection.getBatchInfoList(job.getId()) .getBatchInfo(); Also, csvFileName variable is pointing to a Valid CSV file on my system –  Peace Oct 1 '13 at 4:42
1  
The stack trace should point to the exact line of code throwing the exception. Can you post the stack trace? –  metadaddy Oct 1 '13 at 6:43
 
@Peace, can you add the resulting stacktrace to the question? Being line 222 it would appear the exception is occurring in the RestConnection. –  Daniel Ballinger Oct 1 '13 at 6:48
 
input stream can not be null java.lang.IllegalArgumentException: input stream can not be null at com.sforce.ws.parser.MXParser.setInput(MXParser.java:522) at com.sforce.ws.parser.XmlInputStream.setInput(XmlInputStream.java:64) at com.sforce.async.RestConnection.parseAndThrowException(RestConnection.java:112) at com.sforce.async.RestConnection.doHttpGet(RestConnection.java:283) at com.sforce.async.RestConnection.getBatchInfoList(RestConnection.java:190) at com.jeffdouglas.BulkLoader.awaitCompletion(BulkLoader.java:222) at com.jeffdouglas.BulkLoader.runJob(BulkLoader.java:159) –  Peace Oct 1 '13 at 11:04
show 2 more comments

Know someone who can answer? Share a link to this question via email, Google+, Twitter, or Facebook.

Your Answer

 
discard

By posting your answer, you agree to the privacy policy and terms of service.

Browse other questions tagged or ask your own question.