james-server-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From "Hebus Troy (JIRA)" <server-...@james.apache.org>
Subject [jira] Commented: (JAMES-1204) org.apache.james.user.ldap.ReadOnlyUsersLDAPRepository throws IllegalArgumentException if no "restriction" was configured
Date Thu, 17 Mar 2011 10:08:29 GMT

    [ https://issues.apache.org/jira/browse/JAMES-1204?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=13007857#comment-13007857
] 

Hebus Troy commented on JAMES-1204:
-----------------------------------

With this patch the restriction feature don't work

I have modified this 

        //if (configuration.containsKey("restriction")) {
        if (configuration.containsKey("restriction[@memberAttribute]")) {

but after they aren't error handling on ldapsearch

my log :

INFO  05:57:30,317 | james.usersrepository | RLA Configuration: org.apache.commons.configuration.SubnodeConfiguration@2ec7ecd5
ERROR 05:57:30,318 | james.usersrepository | it value :
ERROR 05:57:30,318 | james.usersrepository | it value : restriction.group
ERROR 05:57:30,318 | james.usersrepository | it value : restriction[@memberAttribute]
ERROR 05:57:30,318 | james.usersrepository | it value : [@class]
ERROR 05:57:30,318 | james.usersrepository | it value : [@credentials]
ERROR 05:57:30,318 | james.usersrepository | it value : [@ldapHost]
ERROR 05:57:30,318 | james.usersrepository | it value : [@name]
ERROR 05:57:30,319 | james.usersrepository | it value : [@principal]
ERROR 05:57:30,319 | james.usersrepository | it value : [@userBase]
ERROR 05:57:30,319 | james.usersrepository | it value : [@userIdAttribute]
ERROR 05:57:30,319 | james.usersrepository | it value : [@userObjectClass]
INFO  05:57:30,319 | james.usersrepository | If restrictionConfig contains:  restriction
INFO  05:57:30,375 | james.usersrepository | Bean  LocalUsers started.
ERROR 05:58:23,458 | james.usersrepository | Unable to retrieve user from ldap
javax.naming.NameNotFoundException: [LDAP: error code 32 - No Such Object]; remaining name
'cn=PermanentStaff,ou=Groups,o=myorg.co.uk,ou=system'
    at com.sun.jndi.ldap.LdapCtx.mapErrorCode(LdapCtx.java:3066)
    at com.sun.jndi.ldap.LdapCtx.processReturnCode(LdapCtx.java:2987)
    at com.sun.jndi.ldap.LdapCtx.processReturnCode(LdapCtx.java:2794)
    at com.sun.jndi.ldap.LdapCtx.c_getAttributes(LdapCtx.java:1309)
    at com.sun.jndi.toolkit.ctx.ComponentDirContext.p_getAttributes(ComponentDirContext.java:213)
    at com.sun.jndi.toolkit.ctx.PartialCompositeDirContext.getAttributes(PartialCompositeDirContext.java:121)
    at com.sun.jndi.toolkit.ctx.PartialCompositeDirContext.getAttributes(PartialCompositeDirContext.java:109)
    at javax.naming.directory.InitialDirContext.getAttributes(InitialDirContext.java:123)
    at javax.naming.directory.InitialDirContext.getAttributes(InitialDirContext.java:118)
    at org.apache.james.user.ldap.ReadOnlyLDAPGroupRestriction.getGroupMembershipLists(ReadOnlyLDAPGroupRestriction.java:145)
    at org.apache.james.user.ldap.ReadOnlyUsersLDAPRepository.getValidUsers(ReadOnlyUsersLDAPRepository.java:547)
    at org.apache.james.user.ldap.ReadOnlyUsersLDAPRepository.getUserByName(ReadOnlyUsersLDAPRepository.java:483)
    at org.apache.james.user.ldap.ReadOnlyUsersLDAPRepository.test(ReadOnlyUsersLDAPRepository.java:580)
    at org.apache.james.user.lib.LocalUsersRepository.test(LocalUsersRepository.java:127)
    at org.apache.james.adapter.mailbox.store.UserRepositoryAuthenticator.isAuthentic(UserRepositoryAuthenticator.java:45)
   at org.apache.james.mailbox.store.StoreMailboxManager.login(StoreMailboxManager.java:148)
    at org.apache.james.mailbox.store.StoreMailboxManager.login(StoreMailboxManager.java:156)
    at org.apache.james.imap.processor.LoginProcessor.doProcess(LoginProcessor.java:68)
    at org.apache.james.imap.processor.AbstractMailboxProcessor.doProcess(AbstractMailboxProcessor.java:94)
    at org.apache.james.imap.processor.AbstractMailboxProcessor.process(AbstractMailboxProcessor.java:80)
    at org.apache.james.imap.processor.AbstractMailboxProcessor.doProcess(AbstractMailboxProcessor.java:73)
    at org.apache.james.imap.processor.base.AbstractChainedProcessor.process(AbstractChainedProcessor.java:44)
    at org.apache.james.imap.processor.base.AbstractChainedProcessor.process(AbstractChainedProcessor.java:46)
    at org.apache.james.imap.processor.base.AbstractChainedProcessor.process(AbstractChainedProcessor.java:46)
    at org.apache.james.imap.processor.base.AbstractChainedProcessor.process(AbstractChainedProcessor.java:46)




> org.apache.james.user.ldap.ReadOnlyUsersLDAPRepository throws IllegalArgumentException
if no "restriction" was configured
> -------------------------------------------------------------------------------------------------------------------------
>
>                 Key: JAMES-1204
>                 URL: https://issues.apache.org/jira/browse/JAMES-1204
>             Project: JAMES Server
>          Issue Type: Bug
>          Components: UsersStore & UsersRepository
>    Affects Versions: 3.0-M1
>            Reporter: Norman Maurer
>            Assignee: Norman Maurer
>             Fix For: 3.0-M3
>
>
> 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

--
This message is automatically generated by JIRA.
For more information on JIRA, see: http://www.atlassian.com/software/jira

---------------------------------------------------------------------
To unsubscribe, e-mail: server-dev-unsubscribe@james.apache.org
For additional commands, e-mail: server-dev-help@james.apache.org


Mime
View raw message