3

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.

8
  • 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. Sep 30, 2013 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, 2013 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, 2013 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. Oct 1, 2013 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, 2013 at 11:04

0

You must log in to answer this question.

Browse other questions tagged .