title: spring batch AsynchJob Launcher ,Error in setting job repo
body: <p>Hi below is my configuration for creating asynchlob launcher
         </p>
  
  <pre><code>&lt;bean id="jobLauncher"
      class="org.springframework.batch.core.launch.support.SimpleJobLauncher"&gt;
      &lt;property name="jobRepository" ref="&amp;amp;jobRepository" /&gt;
      &lt;property name="taskExecutor" ref="taskExecutor" /&gt;
  &lt;/bean&gt; 
  
   &lt;bean id="taskExecutor" class="org.springframework.core.task.SimpleAsyncTaskExecutor" /&gt;
  
  &lt;bean id="jobRepository" class="org.springframework.batch.core.repository.support.MapJobRepositoryFactoryBean" /&gt;
  </code></pre>
  
  <p>i'm getting below error</p>
  
  <pre><code>Error creating bean with name 'batchJobLauncher': Injection of autowired dependencies failed; nested exception is org.springframework.beans.factory.BeanCreationException: Could not autowire field: private org.springframework.batch.core.launch.support.SimpleJobLauncher com.batch.launcher.BatchJobLauncher.asyncJobLauncher; nested exception is org.springframework.beans.factory.BeanCreationException: Error creating bean with name 'jobLauncher' defined in ServletContext resource [/WEB-INF/BatchConfig.xml]: Initialization of bean failed; nested exception is org.springframework.beans.ConversionNotSupportedException: Failed to convert property value of type 'org.springframework.batch.core.repository.support.MapJobRepositoryFactoryBean' to required type 'org.springframework.batch.core.repository.JobRepository' for property 'jobRepository'; nested exception is java.lang.IllegalStateException: Cannot convert value of type [org.springframework.batch.core.repository.support.MapJobRepositoryFactoryBean] to required type [org.springframework.batch.core.repository.JobRepository] for property 'jobRepository': no matching editors or conversion strategy found
  .....
  caused by: org.springframework.beans.ConversionNotSupportedException: Failed to convert property value of type 'org.springframework.batch.core.repository.support.MapJobRepositoryFactoryBean' to required type 'org.springframework.batch.core.repository.JobRepository' for property 'jobRepository'; nested exception is java.lang.IllegalStateException: Cannot convert value of type [org.springframework.batch.core.repository.support.MapJobRepositoryFactoryBean] to required type [org.springframework.batch.core.repository.JobRepository] for property 'jobRepository': no matching editors or conversion strategy found
  at org.springframework.beans.BeanWrapperImpl.convertIfNecessary(BeanWrapperImpl.java:476) [spring-beans-4.1.6.RELEASE.jar:4.1.6.RELEASE]
  at org.springframework.beans.BeanWrapperImpl.convertForProperty(BeanWrapperImpl.java:512) [spring-beans-4.1.6.RELEASE.jar:4.1.6.RELEASE]
  at org.springframework.beans.BeanWrapperImpl.convertForProperty(BeanWrapperImpl.java:506) [spring-beans-4.1.6.RELEASE.jar:4.1.6.RELEASE]
  at org.springframework.beans.factory.support.AbstractAutowireCapableBeanFactory.convertForProperty(AbstractAutowireCapableBeanFactory.java:1523) [spring-beans-4.1.6.RELEASE.jar:4.1.6.RELEASE]
  at org.springframework.beans.factory.support.AbstractAutowireCapableBeanFactory.applyPropertyValues(AbstractAutowireCapableBeanFactory.java:1482) [spring-beans-4.1.6.RELEASE.jar:4.1.6.RELEASE]
  at org.springframework.beans.factory.support.AbstractAutowireCapableBeanFactory.populateBean(AbstractAutowireCapableBeanFactory.java:1222) [spring-beans-4.1.6.RELEASE.jar:4.1.6.RELEASE]
  at org.springframework.beans.factory.support.AbstractAutowireCapableBeanFactory.doCreateBean(AbstractAutowireCapableBeanFactory.java:537) [spring-beans-4.1.6.RELEASE.jar:4.1.6.RELEASE]
  ... 54 more
  Caused by: java.lang.IllegalStateException: Cannot convert value of type [org.springframework.batch.core.repository.support.MapJobRepositoryFactoryBean] to required type [org.springframework.batch.core.repository.JobRepository] for property 'jobRepository': no matching editors or conversion strategy found
  at org.springframework.beans.TypeConverterDelegate.convertIfNecessary(TypeConverterDelegate.java:287) [spring-beans-4.1.6.RELEASE.jar:4.1.6.RELEASE]
  at org.springframework.beans.BeanWrapperImpl.convertIfNecessary(BeanWrapperImpl.java:461) [spring-beans-4.1.6.RELEASE.jar:4.1.6.RELEASE]
  ... 60 more
  </code></pre>
  
  <p>i tried without &amp; also.</p>
  
  <p>error like this</p>
  
  <pre><code>13:58:59,346 WARN  [org.springframework.web.context.support.XmlWebApplicationContext] (ServerService Thread Pool -- 58) Exception encountered during context initialization - cancelling refresh attempt: org.springframework.beans.factory.BeanCreationException: Error creating bean with name 'jobBuilders' defined in class path resource [org/springframework/batch/core/configuration/annotation/SimpleBatchConfiguration.class]: Bean instantiation via factory method failed; nested exception is org.springframework.beans.BeanInstantiationException: Failed to instantiate [org.springframework.batch.core.configuration.annotation.JobBuilderFactory]: Factory method 'jobBuilders' threw exception; nested exception is java.lang.ClassCastException: org.springframework.batch.core.repository.support.MapJobRepositoryFactoryBean$$EnhancerBySpringCGLIB$$99e29281 cannot be cast to org.springframework.batch.core.repository.JobRepository
  at org.springframework.beans.factory.support.ConstructorResolver.instantiateUsingFactoryMethod(ConstructorResolver.java:599) [spring-beans-4.1.6.RELEASE.jar:4.1.6.RELEASE]
  at org.springframework.beans.factory.support.AbstractAutowireCapableBeanFactory.instantiateUsingFactoryMethod(AbstractAutowireCapableBeanFactory.java:1119) 
  </code></pre>