directory-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From "Charles Moulliard (JIRA)" <j...@apache.org>
Subject [jira] [Commented] (DIRSERVER-2110) org.apache.directory.shared.ldap.codec.BasicControlDecorator cannot be cast to org.apache.directory.shared.ldap.model.message.controls.PersistentSearch
Date Tue, 05 Jan 2016 18:46:39 GMT

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

Charles Moulliard commented on DIRSERVER-2110:
----------------------------------------------

Here is the project : https://github.com/cmoulliard/ldap-activemq-testing

It can be launched within a terminal using the maven goal "mvn camel:run" and the error is
reported by the class "org.apache.activemq.security.SimpleCachedLDAPAuthorizationMap" which
is packaged into activemq-broker jar file --> "https://gist.github.com/cmoulliard/d315e6c9f3429fe98a2e#file-simplecachedldapauthorizationmap-java-L925"



> org.apache.directory.shared.ldap.codec.BasicControlDecorator cannot be cast to org.apache.directory.shared.ldap.model.message.controls.PersistentSearch
> -------------------------------------------------------------------------------------------------------------------------------------------------------
>
>                 Key: DIRSERVER-2110
>                 URL: https://issues.apache.org/jira/browse/DIRSERVER-2110
>             Project: Directory ApacheDS
>          Issue Type: Bug
>    Affects Versions: 2.0.0-M6
>            Reporter: Charles Moulliard
>
> I have created a standalone Apache DS Server (version 2.0.0-m6) which is working fine
> https://gist.github.com/cmoulliard/fbbdb7521104f3f23c27
> but when a LDAP client (developed inside a class of Apache ActiveMQ project - ) is doing
some requests on the DirContext I get such class cast exception
> {code}
> Query code 
>    protected void query() throws Exception {
>         DirContext currentContext = open();
>         final SearchControls constraints = new SearchControls();
>         constraints.setSearchScope(SearchControls.SUBTREE_SCOPE);
>         DefaultAuthorizationMap newMap = new DefaultAuthorizationMap();
>         for (PermissionType permissionType : PermissionType.values()) {
>             try {
>                 processQueryResults(newMap,
>                     currentContext.search(queueSearchBase, getFilterForPermissionType(permissionType),
>                     constraints), DestinationType.QUEUE, permissionType);
>             } catch (Exception e) {
>                 LOG.error("Policy not applied!.  Error processing policy under '{}' with
filter '{}'", new Object[]{ queueSearchBase, getFilterForPermissionType(permissionType) },
e);
>             }
>         }
> {code}
> Error
> {code}
> Thread-15 ERROR [org.apache.activemq.security.SimpleCachedLDAPAuthorizationMap] - Caught
unexpected exception.
> javax.naming.NamingException: [LDAP: error code 80 - OTHER: failed for MessageType :
SEARCH_REQUEST
> Message ID : 11
>     SearchRequest
>         baseDn : 'ou=Temp,ou=Destination,ou=ActiveMQ,ou=system'
>         filter : '(cn=read)'
>         scope : whole subtree
>         typesOnly : false
>         Size Limit : no limit
>         Time Limit : no limit
>         Deref Aliases : deref Always
>         attributes : 
> org.apache.directory.shared.ldap.model.message.SearchRequestImpl@291cd875    OpaqueControl
Control
>         Type OID    : '2.16.840.1.113730.3.4.3'
>         Criticality : 'true'
> '
>     OpaqueControl Control
>         Type OID    : '2.16.840.1.113730.3.4.2'
>         Criticality : 'false'
> '
> : org.apache.directory.shared.ldap.codec.BasicControlDecorator cannot be cast to org.apache.directory.shared.ldap.model.message.controls.PersistentSearch];
remaining name 'ou=Temp,ou=Destination,ou=ActiveMQ,ou=system'
>         at com.sun.jndi.ldap.LdapCtx.mapErrorCode(LdapCtx.java:3179)
>         at com.sun.jndi.ldap.LdapCtx.processReturnCode(LdapCtx.java:3081)
>         at com.sun.jndi.ldap.LdapCtx.processReturnCode(LdapCtx.java:2888)
>         at com.sun.jndi.ldap.AbstractLdapNamingEnumeration.getNextBatch(AbstractLdapNamingEnumeration.java:148)
>         at com.sun.jndi.ldap.AbstractLdapNamingEnumeration.hasMoreImpl(AbstractLdapNamingEnumeration.java:217)
>         at com.sun.jndi.ldap.AbstractLdapNamingEnumeration.hasMore(AbstractLdapNamingEnumeration.java:189)
>         at com.sun.jndi.ldap.NamingEventNotifier.run(NamingEventNotifier.java:135)
>         at java.lang.Thread.run(Thread.java:745)
> {code}



--
This message was sent by Atlassian JIRA
(v6.3.4#6332)

Mime
View raw message