title: Passing jobParameters to bean in Spring Batch
body: <p>I read a problem from the link <a href="https://stackoverflow.com/q/15784984/814074"> https://stackoverflow.com/q/15784984/814074</a> and tried the solution given in above link.
  However, I got the following error while running the code:</p>
  
  <pre><code>Error creating bean with name 'JobArgs' defined in class path resource [pipelineJob.xml]: 
  Initialization of bean failed; nested exception is org.springframework.beans.ConversionNotSupportedException: Failed to convert property value of type '$Proxy2 implementing java.io.Serializable,org.springframework.aop.scope.ScopedObject,org.springframework.aop.framework.AopInfrastructureBean,org.springframework.aop.SpringProxy,org.springframework.aop.framework.Advised' to required type 'com.test.genepanel.job.JobArguments' for property 'jobArguements'; nested exception is java.lang.IllegalStateException:
  Cannot convert value of type [$Proxy2 implementing java.io.Serializable,org.springframework.aop.scope.ScopedObject,org.springframework.aop.framework.AopInfrastructureBean,org.springframework.aop.SpringProxy,org.springframework.aop.framework.Advised] to required type [com.test.genepanel.job.JobArguments] for property 'jobArguements': no matching editors or conversion strategy found
  </code></pre>
  
  <p>The xml contains</p>
  
  <pre><code>   &lt;?xml version="1.0" encoding="UTF-8"?&gt;
  &lt;beans xmlns="http://www.springframework.org/schema/beans"
      xmlns:batch="http://www.springframework.org/schema/batch"
       xmlns:aop="http://www.springframework.org/schema/aop"
      xmlns:tx="http://www.springframework.org/schema/tx" xmlns:p="http://www.springframework.org/schema/p"
      xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
      xmlns:util="http://www.springframework.org/schema/util"
      xsi:schemaLocation="http://www.springframework.org/schema/beans
              http://www.springframework.org/schema/beans/spring-beans-3.0.xsd
              http://www.springframework.org/schema/batch
              http://www.springframework.org/schema/batch/spring-batch-2.1.xsd
              http://www.springframework.org/schema/aop
              http://www.springframework.org/schema/aop/spring-aop-3.0.xsd
              http://www.springframework.org/schema/util
              http://www.springframework.org/schema/util/spring-util-2.5.xsd"&gt;
  
      &lt;batch:job id="pipelineJob"&gt;
          &lt;batch:step id="initializationStep" next="CleanUPStep"&gt;
              &lt;batch:tasklet ref="initializationStepTasklet" /&gt;
          &lt;/batch:step&gt;
          &lt;batch:step id="CleanUPStep"&gt;
              &lt;batch:tasklet ref="cleanupTaskLet" /&gt;
          &lt;/batch:step&gt;
      &lt;/batch:job&gt;
  
  
  
      &lt;bean id="basicStep" class="com.test.mutation.steps.BasicStep" abstract="true"&gt;
          &lt;property name="testJobArgs" ref="JobArgs"/&gt;
      &lt;/bean&gt;
  
      &lt;bean id="JobArgs" class="com.test.mutation.application.TestJobArguements"&gt;
          &lt;property name="jobArguements" ref="jobArg"&gt; 
          &lt;/property&gt;
      &lt;/bean&gt;
  
      &lt;bean id="jobArg" class="com.test.genepanel.job.JobArguments" scope="step"&gt;
          &lt;constructor-arg value="#{jobParameters['jobOutputDir']}"/&gt;
      &lt;/bean&gt;
  
      &lt;bean id="emptyTaskLet" class="com.test.mutation.steps.EmptyStep" scope="step" parent="basicStep" /&gt;
  
      &lt;bean id="cleanupTaskLet" class="com.test.mutation.steps.CleanUpStep" scope="step" parent="basicStep"&gt;
      &lt;/bean&gt;
  
      &lt;bean id="initializationStepTasklet" class="com.test.mutation.steps.InitializationStep"  scope ="step" parent="basicStep"&gt;
      &lt;/bean&gt; 
  &lt;/beans&gt;
  </code></pre>
  
  <p>Am I missing anything?</p>