directory-api mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Thomas Cataldo <tcata...@gmail.com>
Subject Re: ldap search problems against openldap
Date Thu, 11 Mar 2010 20:48:44 GMT
On Thu, Mar 11, 2010 at 8:53 PM, Kiran Ayyagari <ayyagarikiran@gmail.com> wrote:
> hi Thomas,
>
>  Thank you for performing the tests to confirm the issue, I have
> created a JIRA issue [1], have fixed it locally and running tests at
> the moment
>  Will commit it as soon as the tests pass.
>
> [1] https://issues.apache.org/jira/browse/DIRSERVER-1476
>

Way better, but not there yet.

Using the following method:

	public String findUniqueDN(String filter, LdapConnection con)
			throws Exception {
		String dn = null;

		Cursor<SearchResponse> cursor = null;
		try {
			cursor = con.search(baseDn, filter, SearchScope.SUBTREE, "*");
			if (cursor.next()) {
				dn = getDN(cursor);
				if (cursor.next()) {
					logger.warn("several entries matched " + filter + " in "
							+ baseDn);
					dn = null;
				}
			} else {
				logger.warn("nothing found matching " + filter);
			}
		} catch (Throwable e) {
			logger.error("error searching for " + filter, e);
		} finally {
			cleanUp(cursor);
		}
		return dn;
	}

and a (uid=*) filter I can trigger the following output:

2010-03-11 21:44:24,000 Asn1Decoder WARN - The PDU has been fully
decoded but there are still bytes in the buffer.
2010-03-11 21:44:24,006 Asn1Decoder WARN - The PDU has been fully
decoded but there are still bytes in the buffer.
2010-03-11 21:44:24,007 Asn1Decoder WARN - The PDU has been fully
decoded but there are still bytes in the buffer.
2010-03-11 21:44:24,016 LDAPUtils WARN - several entries matched
(uid=*) in ou=users,dc=zz.com,dc=local
2010-03-11 21:44:24,018 LdapConnection ERROR - There is no future
asscoiated with operation message ID 2, perhaps the operation would
have been completed
2010-03-11 21:44:24,031 IoHandlerAdapter WARN - EXCEPTION, please
implement org.apache.directory.ldap.client.api.LdapConnection.exceptionCaught()
for proper handling:
java.lang.NullPointerException
	at org.apache.directory.ldap.client.api.LdapConnection.peekFromFutureMap(LdapConnection.java:291)
	at org.apache.directory.ldap.client.api.LdapConnection.messageReceived(LdapConnection.java:1582)
	at org.apache.mina.core.filterchain.DefaultIoFilterChain$TailFilter.messageReceived(DefaultIoFilterChain.java:713)
	at org.apache.mina.core.filterchain.DefaultIoFilterChain.callNextMessageReceived(DefaultIoFilterChain.java:434)
	at org.apache.mina.core.filterchain.DefaultIoFilterChain.access$1200(DefaultIoFilterChain.java:46)
	at org.apache.mina.core.filterchain.DefaultIoFilterChain$EntryImpl$1.messageReceived(DefaultIoFilterChain.java:793)
	at org.apache.mina.filter.codec.ProtocolCodecFilter$ProtocolDecoderOutputImpl.flush(ProtocolCodecFilter.java:375)
	at org.apache.mina.filter.codec.ProtocolCodecFilter.messageReceived(ProtocolCodecFilter.java:229)
	at org.apache.mina.core.filterchain.DefaultIoFilterChain.callNextMessageReceived(DefaultIoFilterChain.java:434)
	at org.apache.mina.core.filterchain.DefaultIoFilterChain.access$1200(DefaultIoFilterChain.java:46)
	at org.apache.mina.core.filterchain.DefaultIoFilterChain$EntryImpl$1.messageReceived(DefaultIoFilterChain.java:793)
	at org.apache.mina.core.filterchain.IoFilterAdapter.messageReceived(IoFilterAdapter.java:119)
	at org.apache.mina.core.filterchain.DefaultIoFilterChain.callNextMessageReceived(DefaultIoFilterChain.java:434)
	at org.apache.mina.core.filterchain.DefaultIoFilterChain.fireMessageReceived(DefaultIoFilterChain.java:426)
	at org.apache.mina.core.polling.AbstractPollingIoProcessor.read(AbstractPollingIoProcessor.java:638)
	at org.apache.mina.core.polling.AbstractPollingIoProcessor.process(AbstractPollingIoProcessor.java:598)
	at org.apache.mina.core.polling.AbstractPollingIoProcessor.process(AbstractPollingIoProcessor.java:587)
	at org.apache.mina.core.polling.AbstractPollingIoProcessor.access$400(AbstractPollingIoProcessor.java:61)
	at org.apache.mina.core.polling.AbstractPollingIoProcessor$Processor.run(AbstractPollingIoProcessor.java:969)
	at org.apache.mina.util.NamePreservingRunnable.run(NamePreservingRunnable.java:64)
	at java.util.concurrent.ThreadPoolExecutor$Worker.runTask(ThreadPoolExecutor.java:886)
	at java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:908)
	at java.lang.Thread.run(Thread.java:619)
2010-03-11 21:44:24,033 IoHandlerAdapter WARN - EXCEPTION, please
implement org.apache.directory.ldap.client.api.LdapConnection.exceptionCaught()
for proper handling:
java.lang.NullPointerException
	at org.apache.directory.ldap.client.api.LdapConnection.peekFromFutureMap(LdapConnection.java:291)
	at org.apache.directory.ldap.client.api.LdapConnection.messa

...

Regards,
Thomas.

Mime
View raw message