Uploaded image for project: 'James Server'
  1. James Server
  2. JAMES-1204

org.apache.james.user.ldap.ReadOnlyUsersLDAPRepository throws IllegalArgumentException if no "restriction" was configured

    XMLWordPrintableJSON

Details

    Description

      If you use the following configuration you will see a IllegalArgumentException:

      <usersrepository>
      <!-- Read-Only LDAP based UsersRepository -->
      <repository name="LocalUsers" class="org.apache.james.user.ldap.ReadOnlyUsersLDAPRepository" ldapHost="ldap://obm3.kvm.rla:389"
      principal="" credentials="" userBase="dc=local" userIdAttribute="mailBox"/>;
      </usersrepository>

      It will look like:
      jvm 1 | Caused by: java.lang.IllegalArgumentException: Passed in key must select exactly one node: restriction
      jvm 1 | at org.apache.commons.configuration.HierarchicalConfiguration.configurationAt(HierarchicalConfiguration.java:576)
      jvm 1 | at org.apache.commons.configuration.HierarchicalConfiguration.configurationAt(HierarchicalConfiguration.java:596)
      jvm 1 | at org.apache.james.user.ldap.ReadOnlyUsersLDAPRepository.configure(ReadOnlyUsersLDAPRepository.java:236)
      jvm 1 | at org.apache.james.container.spring.SpringInstanceFactory.newInstance(SpringInstanceFactory.java:67)
      jvm 1 | at org.apache.james.user.lib.JamesUsersStore.init(JamesUsersStore.java:86)
      jvm 1 | at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
      jvm 1 | at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:39)
      jvm 1 | at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:25)
      jvm 1 | at java.lang.reflect.Method.invoke(Method.java:597)
      jvm 1 | at org.springframework.beans.factory.annotation.InitDestroyAnnotationBeanPostProcessor$LifecycleElement.invoke(InitDestroyAnnotationBeanPostProcessor.java:340)
      jvm 1 | at org.springframework.beans.factory.annotation.InitDestroyAnnotationBeanPostProcessor$LifecycleMetadata.invokeInitMethods(InitDestroyAnnotationBeanPostProcessor.java:293)
      jvm 1 | at org.springframework.beans.factory.annotation.InitDestroyAnnotationBeanPostProcessor.postProcessBeforeInitialization(InitDestroyAnnotationBeanPostProcessor.java:130)
      jvm 1 | ... 84 more

      Attachments

        Activity

          People

            norman Norman Maurer
            norman Norman Maurer
            Votes:
            0 Vote for this issue
            Watchers:
            0 Start watching this issue

            Dates

              Created:
              Updated:
              Resolved: