Uploaded image for project: 'Directory ApacheDS'
  1. Directory ApacheDS
  2. DIRSERVER-1917

Class Cast Exception when doing paged search

    XMLWordPrintableJSON

    Details

    • Type: Bug
    • Status: Resolved
    • Priority: Minor
    • Resolution: Fixed
    • Affects Version/s: 2.0.0-M15
    • Fix Version/s: 2.0.0-M16
    • Component/s: ldap
    • Environment:
      apacheDS embedded in jetty running on gentoo linux or mac osx, queried with ldapsearch command line tool.

      Description

      When I do a paged query, such as this:
      ldapsearch -x -H ldap://localhost:11389 -b ou=fulltext,dc=crown,dc=de -Duid=ulrich.eisenberg,ou=users,dc=crown,dc=de -W -z 10 -E pr=9

      a ClassCastException happens:
      15:35:34,273 DEBUG org.apache.directory.server.ldap.handlers.request.SearchRequestHandler:1667 - OTHER: failed for MessageType : SEARCH_REQUEST
      Message ID : 2
      SearchRequest
      baseDn : 'ou=fulltext,dc=crown,dc=de'
      filter : '(objectclass=*)'
      scope : whole subtree
      typesOnly : false
      Size Limit : 10
      Time Limit : no limit
      Deref Aliases : never Deref Aliases
      attributes :
      org.apache.directory.api.ldap.model.message.SearchRequestImpl@cc5fea49 OpaqueControl Control
      Type OID : '1.2.840.113556.1.4.319'
      Criticality : 'false'
      '
      : org.apache.directory.api.ldap.codec.BasicControlDecorator cannot be cast to org.apache.directory.api.ldap.codec.controls.search.pagedSearch.PagedResultsDecorator
      java.lang.ClassCastException: org.apache.directory.api.ldap.codec.BasicControlDecorator cannot be cast to org.apache.directory.api.ldap.codec.controls.search.pagedSearch.PagedResultsDecorator
      at org.apache.directory.server.ldap.handlers.request.SearchRequestHandler.doSimpleSearch(SearchRequestHandler.java:809)
      at org.apache.directory.server.ldap.handlers.request.SearchRequestHandler.handleIgnoringReferrals(SearchRequestHandler.java:1153)
      at org.apache.directory.server.ldap.handlers.request.SearchRequestHandler.handleWithReferrals(SearchRequestHandler.java:1242)
      at org.apache.directory.server.ldap.handlers.request.SearchRequestHandler.handle(SearchRequestHandler.java:217)
      at org.apache.directory.server.ldap.handlers.request.SearchRequestHandler.handle(SearchRequestHandler.java:92)
      at org.apache.directory.server.ldap.handlers.LdapRequestHandler.handleMessage(LdapRequestHandler.java:207)
      at org.apache.directory.server.ldap.handlers.LdapRequestHandler.handleMessage(LdapRequestHandler.java:56)
      at org.apache.mina.handler.demux.DemuxingIoHandler.messageReceived(DemuxingIoHandler.java:221)
      at org.apache.directory.server.ldap.LdapProtocolHandler.messageReceived(LdapProtocolHandler.java:217)
      at org.apache.mina.core.filterchain.DefaultIoFilterChain$TailFilter.messageReceived(DefaultIoFilterChain.java:690)
      at org.apache.mina.core.filterchain.DefaultIoFilterChain.callNextMessageReceived(DefaultIoFilterChain.java:417)
      at org.apache.mina.core.filterchain.DefaultIoFilterChain.access$1200(DefaultIoFilterChain.java:47)
      at org.apache.mina.core.filterchain.DefaultIoFilterChain$EntryImpl$1.messageReceived(DefaultIoFilterChain.java:765)
      at org.apache.mina.core.filterchain.IoFilterEvent.fire(IoFilterEvent.java:74)
      at org.apache.mina.core.session.IoEvent.run(IoEvent.java:63)
      at org.apache.mina.filter.executor.UnorderedThreadPoolExecutor$Worker.runTask(UnorderedThreadPoolExecutor.java:474)
      at org.apache.mina.filter.executor.UnorderedThreadPoolExecutor$Worker.run(UnorderedThreadPoolExecutor.java:428)
      at java.lang.Thread.run(Thread.java:722)

      The query works fine without the -E pr=9 parameter and returns about 80 results.

        Attachments

          Activity

            People

            • Assignee:
              akiran Kiran Ayyagari
              Reporter:
              uschlumpf Ute Schröder
            • Votes:
              0 Vote for this issue
              Watchers:
              2 Start watching this issue

              Dates

              • Created:
                Updated:
                Resolved: