You are viewing a plain text version of this content. The canonical link for it is here.
Posted to users@directory.apache.org by Neha Rawat <nn...@gmail.com> on 2014/11/09 17:17:44 UTC
Getting a Sorted result by setting SortControl
Hi,
I am using apacheds 2.0.0_M17.
I am using javax.naming.ldap.SortControl to get sorted result for a simple
query. Here is some code.
String sortKey = "cn";
ctx.setRequestControls(new Control[] { new SortControl(sortKey,
Control.CRITICAL) });
NamingEnumeration enm =
ctx.search("dc=example,dc=com", "objectClass=*)", null);
I get this error when i execute it--
Exception in thread "main" javax.naming.CommunicationException: Request: 2
cancelled; remaining name ''
at com.sun.jndi.ldap.LdapRequest.getReplyBer(LdapRequest.java:105)
at com.sun.jndi.ldap.Connection.readReply(Connection.java:447)
at com.sun.jndi.ldap.LdapClient.getSearchReply(LdapClient.java:631)
at com.sun.jndi.ldap.LdapClient.search(LdapClient.java:554)
at com.sun.jndi.ldap.LdapCtx.doSearch(LdapCtx.java:1985)
at com.sun.jndi.ldap.LdapCtx.searchAux(LdapCtx.java:1847)
at com.sun.jndi.ldap.LdapCtx.getSchemaEntry(LdapCtx.java:1679)
at com.sun.jndi.ldap.LdapCtx.getSchemaTree(LdapCtx.java:1592)
at com.sun.jndi.ldap.LdapCtx.c_getSchema(LdapCtx.java:1539)
at
com.sun.jndi.toolkit.ctx.ComponentDirContext.p_getSchema(ComponentDirContext.java:433)
at
com.sun.jndi.toolkit.ctx.PartialCompositeDirContext.getSchema(PartialCompositeDirContext.java:420)
at
com.sun.jndi.toolkit.ctx.PartialCompositeDirContext.getSchema(PartialCompositeDirContext.java:409)
at
javax.naming.directory.InitialDirContext.getSchema(InitialDirContext.java:206)
at searchEntity.main(searchEntity.java:55)
at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
at
sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:57)
at
sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43)
at java.lang.reflect.Method.invoke(Method.java:606)
at com.intellij.rt.execution.application.AppMain.main(AppMain.java:120)
When I comment this line -- "ctx.setRequestControls(new Control[] { new
SortControl(sortKey, Control.CRITICAL) });", the query is successful and I
get correct results.
Could you help me understand how to use SortControl? Am I missing something
here?
Thanks
Thanks,
Neha
Re: Getting a Sorted result by setting SortControl
Posted by Emmanuel Lécharny <el...@gmail.com>.
Le 09/12/14 07:12, Neha Rawat a écrit :
> Hello,
> When are you guys planning to release M20 ADS? I am waiting for this
> Sorting fix.
Soon. We have a couple of other fixes to apply. Let's say in 2 week.
Re: Getting a Sorted result by setting SortControl
Posted by Neha Rawat <nn...@gmail.com>.
Hello,
When are you guys planning to release M20 ADS? I am waiting for this
Sorting fix.
Thanks,
Neha
On Mon, Dec 1, 2014 at 4:59 PM, Neha Rawat <nn...@gmail.com> wrote:
> Sorting is working fine with the SNAPSHOT which Emmanuel shared.
> Thanks.
>
> On Mon, Dec 1, 2014 at 3:02 PM, Emmanuel Lécharny <el...@gmail.com>
> wrote:
>
>> Le 01/12/14 08:20, Kiran Ayyagari a écrit :
>> > On Mon, Dec 1, 2014 at 2:49 PM, Neha Rawat <nn...@gmail.com>
>> wrote:
>> >
>> >> Hi,
>> >> Sure, Please let me know the path of the RPM. Thanks
>> >>
>> >> practically you don't need an RPM to test this, you can just build the
>> > trunk[1] and run the server from <checkout-root>/apacheds/service/
>> > folder by running apacheds.sh script
>> >
>> > otoh, you can build an RPM from this if you needed
>>
>> I'll push a rpm on people.apache.org/~elecharny soon (Im testing the
>> installers anyway, I'm generating thousands of installers those days ;-)
>>
>>
>
>
> --
> -
> Neha
>
--
-
Neha
Re: Getting a Sorted result by setting SortControl
Posted by Neha Rawat <nn...@gmail.com>.
Sorting is working fine with the SNAPSHOT which Emmanuel shared.
Thanks.
On Mon, Dec 1, 2014 at 3:02 PM, Emmanuel Lécharny <el...@gmail.com>
wrote:
> Le 01/12/14 08:20, Kiran Ayyagari a écrit :
> > On Mon, Dec 1, 2014 at 2:49 PM, Neha Rawat <nn...@gmail.com>
> wrote:
> >
> >> Hi,
> >> Sure, Please let me know the path of the RPM. Thanks
> >>
> >> practically you don't need an RPM to test this, you can just build the
> > trunk[1] and run the server from <checkout-root>/apacheds/service/
> > folder by running apacheds.sh script
> >
> > otoh, you can build an RPM from this if you needed
>
> I'll push a rpm on people.apache.org/~elecharny soon (Im testing the
> installers anyway, I'm generating thousands of installers those days ;-)
>
>
--
-
Neha
Re: Getting a Sorted result by setting SortControl
Posted by Emmanuel Lécharny <el...@gmail.com>.
Le 01/12/14 08:20, Kiran Ayyagari a écrit :
> On Mon, Dec 1, 2014 at 2:49 PM, Neha Rawat <nn...@gmail.com> wrote:
>
>> Hi,
>> Sure, Please let me know the path of the RPM. Thanks
>>
>> practically you don't need an RPM to test this, you can just build the
> trunk[1] and run the server from <checkout-root>/apacheds/service/
> folder by running apacheds.sh script
>
> otoh, you can build an RPM from this if you needed
I'll push a rpm on people.apache.org/~elecharny soon (Im testing the
installers anyway, I'm generating thousands of installers those days ;-)
Re: Getting a Sorted result by setting SortControl
Posted by Kiran Ayyagari <ka...@apache.org>.
On Mon, Dec 1, 2014 at 2:49 PM, Neha Rawat <nn...@gmail.com> wrote:
> Hi,
> Sure, Please let me know the path of the RPM. Thanks
>
> practically you don't need an RPM to test this, you can just build the
trunk[1] and run the server from <checkout-root>/apacheds/service/
folder by running apacheds.sh script
otoh, you can build an RPM from this if you needed
[1]
http://svn.apache.org/repos/asf/directory/apacheds/trunk-with-dependencies
> On Sat, Nov 29, 2014 at 7:49 PM, Kiran Ayyagari <ka...@apache.org>
> wrote:
>
> > On Mon, Nov 24, 2014 at 3:57 PM, Neha Rawat <nn...@gmail.com>
> wrote:
> >
> > > I have raised one :
> > > https://issues.apache.org/jira/browse/DIRSERVER-2025
> > >
> > > It would be great if I could get a release for this fix soon. Thanks.
> > >
> > > this is now fixed, can you test it after building the trunk?
> >
> > >
> > > On Mon, Nov 24, 2014 at 1:19 PM, Emmanuel Lécharny <
> elecharny@gmail.com>
> > > wrote:
> > >
> > > > Le 24/11/14 08:46, Kiran Ayyagari a écrit :
> > > > > On Mon, Nov 24, 2014 at 3:32 PM, Neha Rawat <nneharawatt@gmail.com
> >
> > > > wrote:
> > > > >
> > > > >> apacheds.log :----
> > > > >>
> > > > >> [12:53:30] WARN
> [org.apache.directory.mavibot.btree.SpaceReclaimer]
> > -
> > > > >> Failed to read the copied page map from /tmp/cpm.db
> > > > >> [12:53:30] WARN
> [org.apache.directory.mavibot.btree.SpaceReclaimer]
> > -
> > > > >> java.lang.NullPointerException
> > > > >>
> > > > > I will fix this issue tonight
> > > >
> > > > Thanks Kiran.
> > > >
> > > > If needed, we can cut a new release soon.
> > > >
> > > >
> > >
> > >
> > > --
> > > Love and Luck,
> > > Neha
> > >
> >
> >
> >
> > --
> > Kiran Ayyagari
> > http://keydap.com
> >
>
>
>
> --
> Love and Luck,
> Neha
>
--
Kiran Ayyagari
http://keydap.com
Re: Getting a Sorted result by setting SortControl
Posted by Neha Rawat <nn...@gmail.com>.
Hi,
Sure, Please let me know the path of the RPM. Thanks
On Sat, Nov 29, 2014 at 7:49 PM, Kiran Ayyagari <ka...@apache.org>
wrote:
> On Mon, Nov 24, 2014 at 3:57 PM, Neha Rawat <nn...@gmail.com> wrote:
>
> > I have raised one :
> > https://issues.apache.org/jira/browse/DIRSERVER-2025
> >
> > It would be great if I could get a release for this fix soon. Thanks.
> >
> > this is now fixed, can you test it after building the trunk?
>
> >
> > On Mon, Nov 24, 2014 at 1:19 PM, Emmanuel Lécharny <el...@gmail.com>
> > wrote:
> >
> > > Le 24/11/14 08:46, Kiran Ayyagari a écrit :
> > > > On Mon, Nov 24, 2014 at 3:32 PM, Neha Rawat <nn...@gmail.com>
> > > wrote:
> > > >
> > > >> apacheds.log :----
> > > >>
> > > >> [12:53:30] WARN [org.apache.directory.mavibot.btree.SpaceReclaimer]
> -
> > > >> Failed to read the copied page map from /tmp/cpm.db
> > > >> [12:53:30] WARN [org.apache.directory.mavibot.btree.SpaceReclaimer]
> -
> > > >> java.lang.NullPointerException
> > > >>
> > > > I will fix this issue tonight
> > >
> > > Thanks Kiran.
> > >
> > > If needed, we can cut a new release soon.
> > >
> > >
> >
> >
> > --
> > Love and Luck,
> > Neha
> >
>
>
>
> --
> Kiran Ayyagari
> http://keydap.com
>
--
Love and Luck,
Neha
Re: Getting a Sorted result by setting SortControl
Posted by Kiran Ayyagari <ka...@apache.org>.
On Mon, Nov 24, 2014 at 3:57 PM, Neha Rawat <nn...@gmail.com> wrote:
> I have raised one :
> https://issues.apache.org/jira/browse/DIRSERVER-2025
>
> It would be great if I could get a release for this fix soon. Thanks.
>
> this is now fixed, can you test it after building the trunk?
>
> On Mon, Nov 24, 2014 at 1:19 PM, Emmanuel Lécharny <el...@gmail.com>
> wrote:
>
> > Le 24/11/14 08:46, Kiran Ayyagari a écrit :
> > > On Mon, Nov 24, 2014 at 3:32 PM, Neha Rawat <nn...@gmail.com>
> > wrote:
> > >
> > >> apacheds.log :----
> > >>
> > >> [12:53:30] WARN [org.apache.directory.mavibot.btree.SpaceReclaimer] -
> > >> Failed to read the copied page map from /tmp/cpm.db
> > >> [12:53:30] WARN [org.apache.directory.mavibot.btree.SpaceReclaimer] -
> > >> java.lang.NullPointerException
> > >>
> > > I will fix this issue tonight
> >
> > Thanks Kiran.
> >
> > If needed, we can cut a new release soon.
> >
> >
>
>
> --
> Love and Luck,
> Neha
>
--
Kiran Ayyagari
http://keydap.com
Re: Getting a Sorted result by setting SortControl
Posted by Neha Rawat <nn...@gmail.com>.
I have raised one :
https://issues.apache.org/jira/browse/DIRSERVER-2025
It would be great if I could get a release for this fix soon. Thanks.
On Mon, Nov 24, 2014 at 1:19 PM, Emmanuel Lécharny <el...@gmail.com>
wrote:
> Le 24/11/14 08:46, Kiran Ayyagari a écrit :
> > On Mon, Nov 24, 2014 at 3:32 PM, Neha Rawat <nn...@gmail.com>
> wrote:
> >
> >> apacheds.log :----
> >>
> >> [12:53:30] WARN [org.apache.directory.mavibot.btree.SpaceReclaimer] -
> >> Failed to read the copied page map from /tmp/cpm.db
> >> [12:53:30] WARN [org.apache.directory.mavibot.btree.SpaceReclaimer] -
> >> java.lang.NullPointerException
> >>
> > I will fix this issue tonight
>
> Thanks Kiran.
>
> If needed, we can cut a new release soon.
>
>
--
Love and Luck,
Neha
Re: Getting a Sorted result by setting SortControl
Posted by Emmanuel Lécharny <el...@gmail.com>.
Le 24/11/14 08:46, Kiran Ayyagari a écrit :
> On Mon, Nov 24, 2014 at 3:32 PM, Neha Rawat <nn...@gmail.com> wrote:
>
>> apacheds.log :----
>>
>> [12:53:30] WARN [org.apache.directory.mavibot.btree.SpaceReclaimer] -
>> Failed to read the copied page map from /tmp/cpm.db
>> [12:53:30] WARN [org.apache.directory.mavibot.btree.SpaceReclaimer] -
>> java.lang.NullPointerException
>>
> I will fix this issue tonight
Thanks Kiran.
If needed, we can cut a new release soon.
Re: Getting a Sorted result by setting SortControl
Posted by Kiran Ayyagari <ka...@apache.org>.
On Mon, Nov 24, 2014 at 3:32 PM, Neha Rawat <nn...@gmail.com> wrote:
> apacheds.log :----
>
> [12:53:30] WARN [org.apache.directory.mavibot.btree.SpaceReclaimer] -
> Failed to read the copied page map from /tmp/cpm.db
> [12:53:30] WARN [org.apache.directory.mavibot.btree.SpaceReclaimer] -
> java.lang.NullPointerException
>
I will fix this issue tonight
can you file a bug report
> at
>
> org.apache.directory.mavibot.btree.RevisionName.getRevision(RevisionName.java:57)
> at
>
> org.apache.directory.mavibot.btree.RevisionName.hashCode(RevisionName.java:126)
> at
> java.util.concurrent.ConcurrentHashMap.put(ConcurrentHashMap.java:910)
> at
>
> java.util.concurrent.ConcurrentHashMap.readObject(ConcurrentHashMap.java:1315)
> at sun.reflect.GeneratedMethodAccessor6.invoke(Unknown Source)
> at
>
> sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43)
> at java.lang.reflect.Method.invoke(Method.java:616)
> at
> java.io.ObjectStreamClass.invokeReadObject(ObjectStreamClass.java:991)
> at
> java.io.ObjectInputStream.readSerialData(ObjectInputStream.java:1865)
> at
> java.io.ObjectInputStream.readOrdinaryObject(ObjectInputStream.java:1770)
> at
> java.io.ObjectInputStream.readObject0(ObjectInputStream.java:1346)
> at java.io.ObjectInputStream.readObject(ObjectInputStream.java:368)
> at
>
> org.apache.directory.mavibot.btree.SpaceReclaimer.readCopiedPageMap(SpaceReclaimer.java:135)
> at
>
> org.apache.directory.mavibot.btree.RecordManager.<init>(RecordManager.java:289)
> at
>
> org.apache.directory.mavibot.btree.RecordManager.<init>(RecordManager.java:229)
> at
>
> org.apache.directory.server.core.shared.DefaultCoreSession.sortResults(DefaultCoreSession.java:1343)
> at
>
> org.apache.directory.server.core.shared.DefaultCoreSession.search(DefaultCoreSession.java:1130)
> at
>
> org.apache.directory.server.ldap.handlers.request.SearchRequestHandler.doSimpleSearch(SearchRequestHandler.java:827)
> at
>
> org.apache.directory.server.ldap.handlers.request.SearchRequestHandler.handleIgnoringReferrals(SearchRequestHandler.java:1179)
> at
>
> org.apache.directory.server.ldap.handlers.request.SearchRequestHandler.handle(SearchRequestHandler.java:212)
> at
>
> org.apache.directory.server.ldap.handlers.request.SearchRequestHandler.handle(SearchRequestHandler.java:93)
> 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:854)
> at
>
> org.apache.mina.core.filterchain.DefaultIoFilterChain.callNextMessageReceived(DefaultIoFilterChain.java:542)
> at
>
> org.apache.mina.core.filterchain.DefaultIoFilterChain.access$1300(DefaultIoFilterChain.java:48)
> at
>
> org.apache.mina.core.filterchain.DefaultIoFilterChain$EntryImpl$1.messageReceived(DefaultIoFilterChain.java:943)
> 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:475)
> at
>
> org.apache.mina.filter.executor.UnorderedThreadPoolExecutor$Worker.run(UnorderedThreadPoolExecutor.java:429)
> at java.lang.Thread.run(Thread.java:679)
>
>
> On Mon, Nov 24, 2014 at 12:59 PM, Kiran Ayyagari <ka...@apache.org>
> wrote:
>
> > On Mon, Nov 24, 2014 at 3:04 PM, Neha Rawat <nn...@gmail.com>
> wrote:
> >
> > > Hello,
> > > I just downloaded Version ApacheDS 2.0.0-M19 and tried this.
> > > I could get it working when the number of entries in ADS is <=17. But
> > when
> > > I have entries more than 17, I get some exception. Is there any config
> > for
> > > this?
> > >
> > > can you give the details of the exception?
> >
> > > Is it fixed in this version? If yes, I will post the exception that i
> > get.
> > >
> > > Thanks.
> > >
> > >
> > >
> > > On Mon, Nov 10, 2014 at 3:19 PM, Emmanuel Lécharny <
> elecharny@gmail.com>
> > > wrote:
> > >
> > > > Le 10/11/14 10:29, Neha Rawat a écrit :
> > > > > Hi,
> > > > > I do not see ApacheDS 2.0.0-M18 available for download on
> > > > > http://directory.apache.org/apacheds/.
> > > > > When is it getting released?
> > > >
> > > > We are working on it. Let's say one week.
> > > >
> > > >
> > >
> > >
> > > --
> > > Love and Luck,
> > > Neha
> > >
> >
> >
> >
> > --
> > Kiran Ayyagari
> > http://keydap.com
> >
>
>
>
> --
> Love and Luck,
> Neha
>
--
Kiran Ayyagari
http://keydap.com
Re: Getting a Sorted result by setting SortControl
Posted by Neha Rawat <nn...@gmail.com>.
apacheds.log :----
[12:53:30] WARN [org.apache.directory.mavibot.btree.SpaceReclaimer] -
Failed to read the copied page map from /tmp/cpm.db
[12:53:30] WARN [org.apache.directory.mavibot.btree.SpaceReclaimer] -
java.lang.NullPointerException
at
org.apache.directory.mavibot.btree.RevisionName.getRevision(RevisionName.java:57)
at
org.apache.directory.mavibot.btree.RevisionName.hashCode(RevisionName.java:126)
at
java.util.concurrent.ConcurrentHashMap.put(ConcurrentHashMap.java:910)
at
java.util.concurrent.ConcurrentHashMap.readObject(ConcurrentHashMap.java:1315)
at sun.reflect.GeneratedMethodAccessor6.invoke(Unknown Source)
at
sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43)
at java.lang.reflect.Method.invoke(Method.java:616)
at
java.io.ObjectStreamClass.invokeReadObject(ObjectStreamClass.java:991)
at
java.io.ObjectInputStream.readSerialData(ObjectInputStream.java:1865)
at
java.io.ObjectInputStream.readOrdinaryObject(ObjectInputStream.java:1770)
at
java.io.ObjectInputStream.readObject0(ObjectInputStream.java:1346)
at java.io.ObjectInputStream.readObject(ObjectInputStream.java:368)
at
org.apache.directory.mavibot.btree.SpaceReclaimer.readCopiedPageMap(SpaceReclaimer.java:135)
at
org.apache.directory.mavibot.btree.RecordManager.<init>(RecordManager.java:289)
at
org.apache.directory.mavibot.btree.RecordManager.<init>(RecordManager.java:229)
at
org.apache.directory.server.core.shared.DefaultCoreSession.sortResults(DefaultCoreSession.java:1343)
at
org.apache.directory.server.core.shared.DefaultCoreSession.search(DefaultCoreSession.java:1130)
at
org.apache.directory.server.ldap.handlers.request.SearchRequestHandler.doSimpleSearch(SearchRequestHandler.java:827)
at
org.apache.directory.server.ldap.handlers.request.SearchRequestHandler.handleIgnoringReferrals(SearchRequestHandler.java:1179)
at
org.apache.directory.server.ldap.handlers.request.SearchRequestHandler.handle(SearchRequestHandler.java:212)
at
org.apache.directory.server.ldap.handlers.request.SearchRequestHandler.handle(SearchRequestHandler.java:93)
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:854)
at
org.apache.mina.core.filterchain.DefaultIoFilterChain.callNextMessageReceived(DefaultIoFilterChain.java:542)
at
org.apache.mina.core.filterchain.DefaultIoFilterChain.access$1300(DefaultIoFilterChain.java:48)
at
org.apache.mina.core.filterchain.DefaultIoFilterChain$EntryImpl$1.messageReceived(DefaultIoFilterChain.java:943)
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:475)
at
org.apache.mina.filter.executor.UnorderedThreadPoolExecutor$Worker.run(UnorderedThreadPoolExecutor.java:429)
at java.lang.Thread.run(Thread.java:679)
On Mon, Nov 24, 2014 at 12:59 PM, Kiran Ayyagari <ka...@apache.org>
wrote:
> On Mon, Nov 24, 2014 at 3:04 PM, Neha Rawat <nn...@gmail.com> wrote:
>
> > Hello,
> > I just downloaded Version ApacheDS 2.0.0-M19 and tried this.
> > I could get it working when the number of entries in ADS is <=17. But
> when
> > I have entries more than 17, I get some exception. Is there any config
> for
> > this?
> >
> > can you give the details of the exception?
>
> > Is it fixed in this version? If yes, I will post the exception that i
> get.
> >
> > Thanks.
> >
> >
> >
> > On Mon, Nov 10, 2014 at 3:19 PM, Emmanuel Lécharny <el...@gmail.com>
> > wrote:
> >
> > > Le 10/11/14 10:29, Neha Rawat a écrit :
> > > > Hi,
> > > > I do not see ApacheDS 2.0.0-M18 available for download on
> > > > http://directory.apache.org/apacheds/.
> > > > When is it getting released?
> > >
> > > We are working on it. Let's say one week.
> > >
> > >
> >
> >
> > --
> > Love and Luck,
> > Neha
> >
>
>
>
> --
> Kiran Ayyagari
> http://keydap.com
>
--
Love and Luck,
Neha
Re: Getting a Sorted result by setting SortControl
Posted by Kiran Ayyagari <ka...@apache.org>.
On Mon, Nov 24, 2014 at 3:04 PM, Neha Rawat <nn...@gmail.com> wrote:
> Hello,
> I just downloaded Version ApacheDS 2.0.0-M19 and tried this.
> I could get it working when the number of entries in ADS is <=17. But when
> I have entries more than 17, I get some exception. Is there any config for
> this?
>
> can you give the details of the exception?
> Is it fixed in this version? If yes, I will post the exception that i get.
>
> Thanks.
>
>
>
> On Mon, Nov 10, 2014 at 3:19 PM, Emmanuel Lécharny <el...@gmail.com>
> wrote:
>
> > Le 10/11/14 10:29, Neha Rawat a écrit :
> > > Hi,
> > > I do not see ApacheDS 2.0.0-M18 available for download on
> > > http://directory.apache.org/apacheds/.
> > > When is it getting released?
> >
> > We are working on it. Let's say one week.
> >
> >
>
>
> --
> Love and Luck,
> Neha
>
--
Kiran Ayyagari
http://keydap.com
Re: Getting a Sorted result by setting SortControl
Posted by Neha Rawat <nn...@gmail.com>.
Hello,
I just downloaded Version ApacheDS 2.0.0-M19 and tried this.
I could get it working when the number of entries in ADS is <=17. But when
I have entries more than 17, I get some exception. Is there any config for
this?
Is it fixed in this version? If yes, I will post the exception that i get.
Thanks.
On Mon, Nov 10, 2014 at 3:19 PM, Emmanuel Lécharny <el...@gmail.com>
wrote:
> Le 10/11/14 10:29, Neha Rawat a écrit :
> > Hi,
> > I do not see ApacheDS 2.0.0-M18 available for download on
> > http://directory.apache.org/apacheds/.
> > When is it getting released?
>
> We are working on it. Let's say one week.
>
>
--
Love and Luck,
Neha
Re: Getting a Sorted result by setting SortControl
Posted by Emmanuel Lécharny <el...@gmail.com>.
Le 10/11/14 10:29, Neha Rawat a écrit :
> Hi,
> I do not see ApacheDS 2.0.0-M18 available for download on
> http://directory.apache.org/apacheds/.
> When is it getting released?
We are working on it. Let's say one week.
Re: Getting a Sorted result by setting SortControl
Posted by Neha Rawat <nn...@gmail.com>.
Hi,
I do not see ApacheDS 2.0.0-M18 available for download on
http://directory.apache.org/apacheds/.
When is it getting released?
Thanks,
Neha
On Mon, Nov 10, 2014 at 2:42 PM, Kiran Ayyagari <ka...@apache.org>
wrote:
> Neha,
>
> sort control in M17 was broken, you need to use M18 to get your code
> work.
>
> On Mon, Nov 10, 2014 at 2:18 PM, Neha Rawat <nn...@gmail.com> wrote:
>
> > Ok, Thanks.
> >
> > -Neha
> >
> > On Mon, Nov 10, 2014 at 10:41 AM, Emmanuel Lécharny <elecharny@gmail.com
> >
> > wrote:
> >
> > > Le 10/11/14 05:52, Neha Rawat a écrit :
> > > > No,
> > > > skis[0] = new javax.naming.ldap.SortKey(sortKey,false,null); too
> > does
> > > > not work.
> > > >
> > > > I hope the other params are correct. I thought attrID is equivalent
> to
> > > > attribute name and passed "cn" as the 1st argument to SortKey.
> > >
> > > Ok, at this point, the best is to fill a JIRA for us to remember to fix
> > > this issue if we don't fin the time to do it in the next couple of
> days.
> > >
> > > The plan here is for us to write a test code using JNDI instead of the
> > > API, and to see if we have the same problem. If so, it will be easy to
> > > understand what's wrong.
> > >
> > > Thanks for the report and for your patience !
> > >
> > >
> >
> >
> > --
> > Love and Luck,
> > Neha
> >
>
>
>
> --
> Kiran Ayyagari
> http://keydap.com
>
--
Love and Luck,
Neha
Re: Getting a Sorted result by setting SortControl
Posted by Kiran Ayyagari <ka...@apache.org>.
Neha,
sort control in M17 was broken, you need to use M18 to get your code
work.
On Mon, Nov 10, 2014 at 2:18 PM, Neha Rawat <nn...@gmail.com> wrote:
> Ok, Thanks.
>
> -Neha
>
> On Mon, Nov 10, 2014 at 10:41 AM, Emmanuel Lécharny <el...@gmail.com>
> wrote:
>
> > Le 10/11/14 05:52, Neha Rawat a écrit :
> > > No,
> > > skis[0] = new javax.naming.ldap.SortKey(sortKey,false,null); too
> does
> > > not work.
> > >
> > > I hope the other params are correct. I thought attrID is equivalent to
> > > attribute name and passed "cn" as the 1st argument to SortKey.
> >
> > Ok, at this point, the best is to fill a JIRA for us to remember to fix
> > this issue if we don't fin the time to do it in the next couple of days.
> >
> > The plan here is for us to write a test code using JNDI instead of the
> > API, and to see if we have the same problem. If so, it will be easy to
> > understand what's wrong.
> >
> > Thanks for the report and for your patience !
> >
> >
>
>
> --
> Love and Luck,
> Neha
>
--
Kiran Ayyagari
http://keydap.com
Re: Getting a Sorted result by setting SortControl
Posted by Neha Rawat <nn...@gmail.com>.
Ok, Thanks.
-Neha
On Mon, Nov 10, 2014 at 10:41 AM, Emmanuel Lécharny <el...@gmail.com>
wrote:
> Le 10/11/14 05:52, Neha Rawat a écrit :
> > No,
> > skis[0] = new javax.naming.ldap.SortKey(sortKey,false,null); too does
> > not work.
> >
> > I hope the other params are correct. I thought attrID is equivalent to
> > attribute name and passed "cn" as the 1st argument to SortKey.
>
> Ok, at this point, the best is to fill a JIRA for us to remember to fix
> this issue if we don't fin the time to do it in the next couple of days.
>
> The plan here is for us to write a test code using JNDI instead of the
> API, and to see if we have the same problem. If so, it will be easy to
> understand what's wrong.
>
> Thanks for the report and for your patience !
>
>
--
Love and Luck,
Neha
Re: Getting a Sorted result by setting SortControl
Posted by Emmanuel Lécharny <el...@gmail.com>.
Le 10/11/14 05:52, Neha Rawat a écrit :
> No,
> skis[0] = new javax.naming.ldap.SortKey(sortKey,false,null); too does
> not work.
>
> I hope the other params are correct. I thought attrID is equivalent to
> attribute name and passed "cn" as the 1st argument to SortKey.
Ok, at this point, the best is to fill a JIRA for us to remember to fix
this issue if we don't fin the time to do it in the next couple of days.
The plan here is for us to write a test code using JNDI instead of the
API, and to see if we have the same problem. If so, it will be easy to
understand what's wrong.
Thanks for the report and for your patience !
Re: Getting a Sorted result by setting SortControl
Posted by Neha Rawat <nn...@gmail.com>.
No,
skis[0] = new javax.naming.ldap.SortKey(sortKey,false,null); too does
not work.
I hope the other params are correct. I thought attrID is equivalent to
attribute name and passed "cn" as the 1st argument to SortKey.
Thanks
Neha
On Mon, Nov 10, 2014 at 10:11 AM, Emmanuel Lécharny <el...@gmail.com>
wrote:
> Le 10/11/14 05:26, Neha Rawat a écrit :
> > With JNDI, I defined the sortKey like this --
> > String sortKey = "cn";
> > javax.naming.ldap.SortKey[] skis = new
> > javax.naming.ldap.SortKey[1];
> > skis[0] = new javax.naming.ldap.SortKey(sortKey,true,null);
> > SortControl sortControl = new SortControl(skis,
> > Control.CRITICAL);
> > ctx.setRequestControls(new Control[] { sortControl });
> >
> > But I get the same exception in this case too.
>
> I'm afraid JNDI is just sending a Control omitting the reverseOrder flag
> when it's set to false (this is teh default value, so you can omit it).
>
> Does it work when you set use this code ? :
>
> String sortKey = "cn";
> javax.naming.ldap.SortKey[] skis = new
> javax.naming.ldap.SortKey[1];
> skis[0] = new javax.naming.ldap.SortKey(sortKey,false,null);
> // This time, use the reverse order
> SortControl sortControl = new SortControl(skis,
> Control.CRITICAL);
> ctx.setRequestControls(new Control[] { sortControl });
>
>
> Thanks !
>
>
--
Love and Luck,
Neha
Re: Getting a Sorted result by setting SortControl
Posted by Emmanuel Lécharny <el...@gmail.com>.
Le 10/11/14 05:26, Neha Rawat a écrit :
> With JNDI, I defined the sortKey like this --
> String sortKey = "cn";
> javax.naming.ldap.SortKey[] skis = new
> javax.naming.ldap.SortKey[1];
> skis[0] = new javax.naming.ldap.SortKey(sortKey,true,null);
> SortControl sortControl = new SortControl(skis,
> Control.CRITICAL);
> ctx.setRequestControls(new Control[] { sortControl });
>
> But I get the same exception in this case too.
I'm afraid JNDI is just sending a Control omitting the reverseOrder flag
when it's set to false (this is teh default value, so you can omit it).
Does it work when you set use this code ? :
String sortKey = "cn";
javax.naming.ldap.SortKey[] skis = new
javax.naming.ldap.SortKey[1];
skis[0] = new javax.naming.ldap.SortKey(sortKey,false,null); // This time, use the reverse order
SortControl sortControl = new SortControl(skis,
Control.CRITICAL);
ctx.setRequestControls(new Control[] { sortControl });
Thanks !
Re: Getting a Sorted result by setting SortControl
Posted by Neha Rawat <nn...@gmail.com>.
With JNDI, I defined the sortKey like this --
String sortKey = "cn";
javax.naming.ldap.SortKey[] skis = new
javax.naming.ldap.SortKey[1];
skis[0] = new javax.naming.ldap.SortKey(sortKey,true,null);
SortControl sortControl = new SortControl(skis,
Control.CRITICAL);
ctx.setRequestControls(new Control[] { sortControl });
But I get the same exception in this case too.
Have not tried with LDAP API yet.
On Mon, Nov 10, 2014 at 12:58 AM, Emmanuel Lécharny <el...@gmail.com>
wrote:
> Le 09/11/14 19:38, Neha Rawat a écrit :
> > Thanks. Looking forward to the release.
> > Is there a workaround for this which I can use meanwhile?
> Yes : use the LDAP API, and always set the reverseOrder flag (to false
> in your case). With JNDI, it's a bit complicated, but it should wok if
> you define a SortKey where you specify the sort order (but that is ti be
> tested).
>
>
--
Love and Luck,
Neha
Re: Getting a Sorted result by setting SortControl
Posted by Emmanuel Lécharny <el...@gmail.com>.
Le 09/11/14 19:38, Neha Rawat a écrit :
> Thanks. Looking forward to the release.
> Is there a workaround for this which I can use meanwhile?
Yes : use the LDAP API, and always set the reverseOrder flag (to false
in your case). With JNDI, it's a bit complicated, but it should wok if
you define a SortKey where you specify the sort order (but that is ti be
tested).
Re: Getting a Sorted result by setting SortControl
Posted by Neha Rawat <nn...@gmail.com>.
Thanks. Looking forward to the release.
Is there a workaround for this which I can use meanwhile?
Thanks,
Neha
On Sun, Nov 9, 2014 at 10:32 PM, Emmanuel Lécharny <el...@gmail.com>
wrote:
> Le 09/11/14 17:52, Emmanuel Lécharny a écrit :
> > Le 09/11/14 17:17, Neha Rawat a écrit :
> >> Hi,
> >> I am using apacheds 2.0.0_M17.
> >> I am using javax.naming.ldap.SortControl to get sorted result for a
> simple
> >> query. Here is some code.
> >>
> >> String sortKey = "cn";
> >> ctx.setRequestControls(new Control[] { new SortControl(sortKey,
> >> Control.CRITICAL) });
> >> NamingEnumeration enm =
> >> ctx.search("dc=example,dc=com", "objectClass=*)", null);
> >>
> >>
> >>
> >>
> >> When I comment this line -- "ctx.setRequestControls(new Control[] { new
> >> SortControl(sortKey, Control.CRITICAL) });", the query is successful
> and I
> >> get correct results.
> >>
> >> Could you help me understand how to use SortControl? Am I missing
> something
> >> here?
> > You are doing nothing wrong, there is a bug in the Sort Control decoding
> > on the server (as a matter of fact, we discovered that 2 days ago and it
> > has been fixed on friday).
> >
> > We are goibg to cut a release as of today, which will be available in
> > the next few days. The binaries should be available for testing tomorrow
> > morning if everything goes well.
> >
> > Hope it helps.
> >
> FTR, the issue is https://issues.apache.org/jira/browse/DIRAPI-210
>
--
Love and Luck,
Neha
Re: Getting a Sorted result by setting SortControl
Posted by Emmanuel Lécharny <el...@gmail.com>.
Le 09/11/14 17:52, Emmanuel Lécharny a écrit :
> Le 09/11/14 17:17, Neha Rawat a écrit :
>> Hi,
>> I am using apacheds 2.0.0_M17.
>> I am using javax.naming.ldap.SortControl to get sorted result for a simple
>> query. Here is some code.
>>
>> String sortKey = "cn";
>> ctx.setRequestControls(new Control[] { new SortControl(sortKey,
>> Control.CRITICAL) });
>> NamingEnumeration enm =
>> ctx.search("dc=example,dc=com", "objectClass=*)", null);
>>
>>
>>
>>
>> When I comment this line -- "ctx.setRequestControls(new Control[] { new
>> SortControl(sortKey, Control.CRITICAL) });", the query is successful and I
>> get correct results.
>>
>> Could you help me understand how to use SortControl? Am I missing something
>> here?
> You are doing nothing wrong, there is a bug in the Sort Control decoding
> on the server (as a matter of fact, we discovered that 2 days ago and it
> has been fixed on friday).
>
> We are goibg to cut a release as of today, which will be available in
> the next few days. The binaries should be available for testing tomorrow
> morning if everything goes well.
>
> Hope it helps.
>
FTR, the issue is https://issues.apache.org/jira/browse/DIRAPI-210
Re: Getting a Sorted result by setting SortControl
Posted by Emmanuel Lécharny <el...@gmail.com>.
Le 09/11/14 17:17, Neha Rawat a écrit :
> Hi,
> I am using apacheds 2.0.0_M17.
> I am using javax.naming.ldap.SortControl to get sorted result for a simple
> query. Here is some code.
>
> String sortKey = "cn";
> ctx.setRequestControls(new Control[] { new SortControl(sortKey,
> Control.CRITICAL) });
> NamingEnumeration enm =
> ctx.search("dc=example,dc=com", "objectClass=*)", null);
>
>
>
>
> When I comment this line -- "ctx.setRequestControls(new Control[] { new
> SortControl(sortKey, Control.CRITICAL) });", the query is successful and I
> get correct results.
>
> Could you help me understand how to use SortControl? Am I missing something
> here?
You are doing nothing wrong, there is a bug in the Sort Control decoding
on the server (as a matter of fact, we discovered that 2 days ago and it
has been fixed on friday).
We are goibg to cut a release as of today, which will be available in
the next few days. The binaries should be available for testing tomorrow
morning if everything goes well.
Hope it helps.