title: org.springframework.beans.TypeMismatchException: Failed to convert property value of type [$Proxy133] to required type
body: <p>In the applicationContext.xml I have a bean <code>ems</code>:</p>
  
  <pre><code>&lt;bean id="ems" class="info.ems.EMSImpl" init-method="init"&gt;
      &lt;property name="dao" ref="dao" /&gt;
      &lt;property name="passwordEncoder" ref="passwordEncoder" /&gt;
      &lt;property name="localeList" value="${ems.locales}" /&gt;
      &lt;property name="releaseVersion" value="${ems.version}" /&gt;
      &lt;property name="releaseTimestamp" value="${ems.timestamp}" /&gt;
      &lt;property name="emsHome" value="${ems.home}" /&gt;
  &lt;/bean&gt;
  </code></pre>
  
  <p>Now in applicationContext-acegi.xml I am referencing that <code>ems</code> bean:</p>
  
  <pre><code>&lt;bean id="authenticationManager" class="info.ems.config.ProviderManagerFactoryBean"&gt;
      &lt;property name="emsImpl" ref="ems"/&gt;        
      &lt;property name="authenticationProvider" ref="authenticationProvider"/&gt;
  &lt;/bean&gt;
  
  &lt;bean id="authenticationProvider" class="org.acegisecurity.providers.dao.DaoAuthenticationProvider"&gt;
      &lt;property name="userDetailsService" ref="ems"/&gt;
      &lt;property name="passwordEncoder" ref="passwordEncoder"/&gt;
  &lt;/bean&gt;        
  </code></pre>
  
  <p>And the ProviderManagerFactoryBean.java:</p>
  
  <pre><code>public class ProviderManagerFactoryBean implements FactoryBean {
  
      private final Logger logger = LoggerFactory.getLogger(getClass());
  
      private EMSImpl emsImpl;
      private AuthenticationProvider authenticationProvider;
  
      public void setEmsImpl(EMSImpl emsImpl) {
          this.emsImpl = emsImpl;
      }
  
      public void setAuthenticationProvider(AuthenticationProvider authenticationProvider) {
          this.authenticationProvider = authenticationProvider;
      }
  
              //other code
  }
  </code></pre>
  
  <p>But I am getting this error:</p>
  
  <pre><code>19:08:56,726 INFO  [STDOUT] 2011-05-30 19:08:56,724 [ScannerThread] ERROR [org.springframework.web.context.ContextLoader] - Context initialization failed
  org.springframework.beans.factory.BeanCreationException: Error creating bean with name 'authenticationManager' defined in ServletContext resource [/WEB-INF/applicationContext-acegi.xml]: Error setting property values; nested exception is org.springframework.beans.PropertyBatchUpdateException; nested PropertyAccessExceptions (1) are:
  PropertyAccessException 1: org.springframework.beans.TypeMismatchException: Failed to convert property value of type [$Proxy133] to required type [info.ems.EMSImpl] for property 'emsImpl'; nested exception is java.lang.IllegalArgumentException: Cannot convert value of type [$Proxy133] to required type [info.ems.EMSImpl] for property 'emsImpl': no matching editors or conversion strategy found
  </code></pre>
  
  <p>The EMSImpl implements EMS.</p>
  
  <pre><code>@Service("emsImpl")
  @Transactional(readOnly = true)
  public class EMSImpl implements EMS {
       //other code
  }
  
  public interface EMS extends UserDetailsService {
       //other code
  }
  </code></pre>
  
  <p>How can I solve this?</p>
  
  <p>Thanks and regards. </p>