title: Invalid property 'defaultCountLimit' of bean class [org.springframework.ldap.core.LdapTemplate]
body: <p>Im getting the following exception while trying to configure the LDAPTemplate on Spring - </p>
  
  <pre><code>org.springframework.beans.factory.BeanCreationException: Error creating bean with name 'ldapTemplate': Error setting property values; nested exception is org.springframework.beans.NotWritablePropertyException: Invalid property 'defaultCountLimit' of bean class [org.springframework.ldap.core.LdapTemplate]: Bean property 'defaultCountLimit' is not writable or has an invalid setter method. Does the parameter type of the setter match the return type of the getter?
  </code></pre>
  
  <p>My configuration is - </p>
  
  <pre><code>&lt;ldap:context-source 
          id="contextSource"
          url="myurl"
          base="mybase"
          username="myuser"
          password="mypassword"
          referral="follow"
  /&gt;
  
  &lt;ldap:ldap-template id="ldapTemplate" context-source-ref="contextSource" /&gt;
  </code></pre>
  
  <p>Ive checked the config and it is working fine when i dont work through the spring context -  </p>
  
  <pre><code>    LdapContextSource contextSource = new LdapContextSource();
      contextSource.setUrl("myurl");
      contextSource.setBase("mybase");
      contextSource.setUserDn("myuser");
      contextSource.setPassword("mypassword");
      contextSource.setReferral("follow");
      contextSource.afterPropertiesSet();
  
      LdapTemplate ldapTemplate = new LdapTemplate(contextSource);
      ldapTemplate.afterPropertiesSet();
  </code></pre>
  
  <p>I cannot see where the countlimit is being set to cause this issue. Ive also tried top set the count limit through ldap-template. </p>
  
  <p>Versions - </p>
  
  <pre><code>&lt;dependency&gt;
    &lt;groupId&gt;org.springframework.ldap&lt;/groupId&gt;
    &lt;artifactId&gt;spring-ldap-core&lt;/artifactId&gt;
  &lt;/dependency&gt;
  &lt;dependency&gt;
    &lt;groupId&gt;org.springframework.ldap&lt;/groupId&gt;
    &lt;artifactId&gt;spring-ldap&lt;/artifactId&gt;
    &lt;version&gt;1.3.1.RELEASE&lt;/version&gt;
    &lt;classifier&gt;all&lt;/classifier&gt;
  &lt;/dependency&gt;
  </code></pre>