title: facing error Object "java.lang.String" not of correct type in mule esb
body: <p>I am trying to download ftp file on my local drive. I amfacing following error</p>
  
  <pre><code>Message               : Object "java.lang.String" not of correct type. It must be of type "{interface java.lang.Iterable,interface java.util.Iterator,interface org.mule.routing.MessageSequence,interface java.util.Collection}" (java.lang.IllegalArgumentException)
  Code                  : MULE_ERROR--2
  </code></pre>
  
  <p>I used batch processing. below is my flow.</p>
  
  <p>Batch Processing Input flow http(One way) then in Processing record phase i used java component which is bind with my class. I wrote one function which will download my file from ftp server. My method is return void with no argument</p>
  
  <pre><code>     &lt;batch:job name="filetosalesBatch1"&gt;
              &lt;batch:input&gt;
                  &lt;http:inbound-endpoint exchange-pattern="one-way" host="localhost" port="8088" doc:name="HTTP" path="test"/&gt;
  &lt;component doc:name="Java" class="com.ReadFile"&gt;
                  &lt;no-arguments-entry-point-resolver&gt;
                      &lt;include-entry-point method="ftpDownloadFile"/&gt;
                  &lt;/no-arguments-entry-point-resolver&gt;
                  &lt;/component&gt;
              &lt;/batch:input&gt;
              &lt;batch:process-records&gt;
                  &lt;batch:step name="Batch_Step"&gt;
                      &lt;logger level="INFO" doc:name="Logger"/&gt;
  
                  &lt;/batch:step&gt;
              &lt;/batch:process-records&gt;
              &lt;batch:on-complete&gt;
                  &lt;logger level="INFO" doc:name="Logger"/&gt;
              &lt;/batch:on-complete&gt;
          &lt;/batch:job&gt; 
  </code></pre>
  
  <p>below is my method</p>
  
  <pre><code>public void ftpDownloadFile()
  {
    // logic for downloading file
  }
  </code></pre>
  
  <p>When I eun my mule application got following error</p>
  
  <pre><code>Message               : Object "java.lang.String" not of correct type. It must be of type "{interface java.lang.Iterable,interface java.util.Iterator,interface org.mule.routing.MessageSequence,interface java.util.Collection}" (java.lang.IllegalArgumentException)
  </code></pre>
  
  <p>How to solve this error please help me</p>
  
  <p>Thanks</p>