title: Error Instantiating bean for org.springframework.beans.propertyeditors.StringTrimmerEditor
body: <p>Here how my applicationContext.xml looks like:</p>
  
  <pre><code>&lt;beans xmlns="http://www.springframework.org/schema/beans"
         xmlns:sec="http://www.springframework.org/schema/security"
         xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
         xmlns:aop="http://www.springframework.org/schema/aop"
         xmlns:context="http://www.springframework.org/schema/context"
         xmlns:p="http://www.springframework.org/schema/p"
         xmlns:tx="http://www.springframework.org/schema/tx"
         xmlns:mvc="http://www.springframework.org/schema/mvc"
         xsi:schemaLocation="http://www.springframework.org/schema/beans http://www.springframework.org/schema/beans/spring-beans-4.0.xsd
          http://www.springframework.org/schema/aop http://www.springframework.org/schema/aop/spring-aop-4.0.xsd
          http://www.springframework.org/schema/context http://www.springframework.org/schema/context/spring-context-4.0.xsd
          http://www.springframework.org/schema/tx http://www.springframework.org/schema/tx/spring-tx-4.0.xsd
          http://www.springframework.org/schema/mvc http://www.springframework.org/schema/mvc/spring-mvc-4.0.xsd
          http://www.springframework.org/schema/security http://www.springframework.org/schema/security/spring-security-3.2.xsd"&gt;
  </code></pre>
  
  <p>.....
  .....</p>
  
  <p>
          
      </p>
  
  <pre><code>&lt;bean id="customEditorConfigurer" class="org.springframework.beans.factory.config.CustomEditorConfigurer"&gt;
     &lt;property name="customEditors"&gt;
          &lt;map&gt;
             &lt;entry key="java.lang.String"&gt;
                  &lt;ref bean="stringTrimmerEditor"/&gt;
              &lt;/entry&gt;
          &lt;/map&gt;
      &lt;/property&gt;
   &lt;/bean&gt;
  </code></pre>
  
  <p>I am getting this error:</p>
  
  <blockquote>
    <p>org.springframework.beans.factory.BeanCreationException: Error
    creating bean with name 'customEditorConfigurer' defined in
    ServletContext resource [/WEB-INF/spring-servlet.xml]: Initialization
    of bean failed; nested exception is
    org.springframework.beans.TypeMismatchException: Failed to convert
    property value of type 'java.util.LinkedHashMap' to required type
    'java.util.Map' for property 'customEditors'; nested exception is
    java.lang.IllegalArgumentException: Cannot convert value of type
    [org.springframework.beans.propertyeditors.StringTrimmerEditor] to
    required type [java.lang.Class] for property
    'customEditors[java.lang.String]': PropertyEditor
    [org.springframework.beans.propertyeditors.ClassEditor] returned
    inappropriate value of type
    [org.springframework.beans.propertyeditors.StringTrimmerEditor]</p>
  </blockquote>