Issue 306 - Searching with Netscape LDAP JDK
Summary: Searching with Netscape LDAP JDK
Status: VERIFIED FIXED
Alias: None
Product: OpenLDAP
Classification: Unclassified
Component: slapd (show other issues)
Version: unspecified
Hardware: All All
: --- normal
Target Milestone: ---
Assignee: OpenLDAP project
URL:
Keywords:
Depends on:
Blocks:
 
Reported: 1999-09-26 13:22 UTC by Jon Barnett
Modified: 2014-08-01 21:06 UTC (History)
0 users

See Also:


Attachments

Note You need to log in before you can comment on or make changes to this issue.
Description Jon Barnett 1999-09-26 13:22:29 UTC
System: Linux 2.2.12
glibc: 2.1.2
gcc: egcs-2.90.29 980515 (egcs-1.0.3 release)
openLDAP: 1.2.7

I have just updated my openldap installation from 1.2 to 1.2.7.  In doing so, 
it appears that the search function operates a little differently in my Java 
program.  I have included a fragment of it below.  The search uses the jars 
provided in the Netscape LDAP jdk (ldapfilt.jar and ldapjdk.jar).

Against the old openLDAP install (1.2), the search worked as expected, pulling 
"Barbara Jensen" and "Bjorn Jensen" out of the test database.  However, no 
common names are retrieved during a search against the new installation. In 
order to achieve the same results, I have to modify the search criteria.  The 
search works if I change the string to:
String searchFilter = "(sn=Jensen*)";

Is this a bug or is there something wrong with the original Java program?

Thanks,

Jon Barnett

---------------------------------------------
String baseDN = "o=University of Michigan, c=US";
String searchFilter = "(sn=Jensen)";
String getAttributes[] = { "cn" };
int searchScope = LDAPv2.SCOPE_SUB;
println("Starting LDAP");
LDAPConnection ld = new LDAPConnection();
try
{
	println("Connecting to server");
	ld.connect("athena.hsys.com.au",LDAPv2.DEFAULT_PORT);
	println("Authenticating (not)...");
	ld.authenticate(null,null);
	println("Searching ...");
	LDAPSearchResults results = ld.search(baseDN, searchScope, searchFilter, 
getAttributes, false);
	println("Printing list ...");
	while (results.hasMoreElements())
	{
		LDAPEntry findEntry = null;
		try
		{
			findEntry = results.next();
			LDAPAttribute attribute = findEntry.getAttribute("cn");
			Enumeration enumValues = attribute.getStringValues();
			String commonName = (String)enumValues.nextElement();
			println("Common name: " + commonName);
		}
		catch (LDAPReferralException e)
		{
			println("Failed ...");
		}
	}
	println("Disconnecting");
	ld.disconnect();
}
catch (LDAPException e)
{
	println("Failed ...");
}
println("Completed");
---------------------------------------------

Comment 1 Kurt Zeilenga 1999-09-27 16:57:41 UTC
Please reproduce using ldapsearch(1) and a freshly build datatabase.
Comment 2 Jon Barnett 1999-09-29 11:24:28 UTC
On Tuesday, 28 September 1999 2:58, Kurt Zeilenga 
[SMTP:openldap-its@OpenLDAP.org] wrote:
> Please reproduce using ldapsearch(1) and a freshly build datatabase.

Thanks.  I ran ldapsearch and that failed as well.  I then checked the /var/tmp 
directory where the DB was stored.  It seems like only half the files had been 
touched in the rebuild of the DB.  I removed all the files and rebuilt the 
database.  This cleared the error.  Please close the fault report and sorry for 
the inconvenience.

Jon.
Comment 3 Jon Barnett 1999-09-29 11:26:55 UTC
On Tuesday, 28 September 1999 2:58, Kurt Zeilenga 
[SMTP:openldap-its@OpenLDAP.org] wrote:
> Please reproduce using ldapsearch(1) and a freshly build datatabase.

Thanks.  I ran ldapsearch and that failed as well.  I then checked the /var/tmp 
directory where the DB was stored.  It seems like only half the files had been 
touched in the rebuild of the DB.  I removed all the files and rebuilt the 
database.  This cleared the error.  Please close the fault report and sorry for 
the inconvenience.

Jon.


>From owner-freebsd-questions@FreeBSD.ORG  Wed Sep 29 12:35:24 1999
Return-Path: <owner-freebsd-questions@FreeBSD.ORG>
Delivered-To: paul@originative.co.uk
Received: from hub.freebsd.org (hub.FreeBSD.ORG [204.216.27.18])
	by mail.originative.co.uk (Postfix) with ESMTP id 7DD377C57
	for <paul@originative.co.uk>; Wed, 29 Sep 1999 12:35:23 +0100 (BST)
Received: by hub.freebsd.org (Postfix, from userid 538)
	id 4BC781554F; Wed, 29 Sep 1999 03:45:59 -0700 (PDT)
Received: from localhost (localhost [127.0.0.1])
	by hub.freebsd.org (Postfix) with SMTP
	id 2E6D11CD472; Wed, 29 Sep 1999 03:45:59 -0700 (PDT)
	(envelope-from owner-freebsd-questions)
Received: by hub.freebsd.org (bulk_mailer v1.12); Wed, 29 Sep 1999 03:45:59 -0700
Delivered-To: freebsd-questions@freebsd.org
Received: from axl.noc.iafrica.com (axl.noc.iafrica.com [196.31.1.175])
	by hub.freebsd.org (Postfix) with ESMTP id 5450B1555F
	for <freebsd-questions@freebsd.org>; Wed, 29 Sep 1999 03:45:53 -0700 (PDT)
	(envelope-from sheldonh@axl.noc.iafrica.com)
Received: from sheldonh (helo=axl.noc.iafrica.com)
	by axl.noc.iafrica.com with local-esmtp (Exim 3.02 #1)
	id 11WHEt-0000Mo-00; Wed, 29 Sep 1999 12:45:35 +0200
From: Sheldon Hearn <sheldonh@uunet.co.za>
To: "Steve" <steve@piperscreek.com>
Cc: "freebsdquestions" <freebsd-questions@FreeBSD.ORG>
Subject: Re: loader.conf syntax question version 3.2 
In-reply-to: Your message of "Tue, 28 Sep 1999 22:16:40 EST."
             <004301bf0a29$102bb520$4d1d5bcf@steve> 
Date: Wed, 29 Sep 1999 12:45:34 +0200
Message-ID: <1413.938601934@axl.noc.iafrica.com>
Sender: owner-freebsd-questions@FreeBSD.ORG
X-Loop: FreeBSD.ORG
Precedence: bulk



On Tue, 28 Sep 1999 22:16:40 EST, "Steve" wrote:

> root_disk_unit=2
> boot /kernel

Instead of that, try adding this to /boot/loader.conf:

root_disk_unit="2"

Ciao,
Sheldon.


To Unsubscribe: send mail to majordomo@FreeBSD.org
with "unsubscribe freebsd-questions" in the body of the message

Comment 4 Jon Barnett 1999-09-29 11:26:55 UTC
On Tuesday, 28 September 1999 2:58, Kurt Zeilenga 
[SMTP:openldap-its@OpenLDAP.org] wrote:
> Please reproduce using ldapsearch(1) and a freshly build datatabase.

Thanks.  I ran ldapsearch and that failed as well.  I then checked the /var/tmp 
directory where the DB was stored.  It seems like only half the files had been 
touched in the rebuild of the DB.  I removed all the files and rebuilt the 
database.  This cleared the error.  Please close the fault report and sorry for 
the inconvenience.

Jon.


>From owner-freebsd-questions@FreeBSD.ORG  Wed Sep 29 12:35:24 1999
Return-Path: <owner-freebsd-questions@FreeBSD.ORG>
Delivered-To: paul@originative.co.uk
Received: from hub.freebsd.org (hub.FreeBSD.ORG [204.216.27.18])
	by mail.originative.co.uk (Postfix) with ESMTP id 7DD377C57
	for <paul@originative.co.uk>; Wed, 29 Sep 1999 12:35:23 +0100 (BST)
Received: by hub.freebsd.org (Postfix, from userid 538)
	id 4BC781554F; Wed, 29 Sep 1999 03:45:59 -0700 (PDT)
Received: from localhost (localhost [127.0.0.1])
	by hub.freebsd.org (Postfix) with SMTP
	id 2E6D11CD472; Wed, 29 Sep 1999 03:45:59 -0700 (PDT)
	(envelope-from owner-freebsd-questions)
Received: by hub.freebsd.org (bulk_mailer v1.12); Wed, 29 Sep 1999 03:45:59 -0700
Delivered-To: freebsd-questions@freebsd.org
Received: from axl.noc.iafrica.com (axl.noc.iafrica.com [196.31.1.175])
	by hub.freebsd.org (Postfix) with ESMTP id 5450B1555F
	for <freebsd-questions@freebsd.org>; Wed, 29 Sep 1999 03:45:53 -0700 (PDT)
	(envelope-from sheldonh@axl.noc.iafrica.com)
Received: from sheldonh (helo=axl.noc.iafrica.com)
	by axl.noc.iafrica.com with local-esmtp (Exim 3.02 #1)
	id 11WHEt-0000Mo-00; Wed, 29 Sep 1999 12:45:35 +0200
From: Sheldon Hearn <sheldonh@uunet.co.za>
To: "Steve" <steve@piperscreek.com>
Cc: "freebsdquestions" <freebsd-questions@FreeBSD.ORG>
Subject: Re: loader.conf syntax question version 3.2 
In-reply-to: Your message of "Tue, 28 Sep 1999 22:16:40 EST."
             <004301bf0a29$102bb520$4d1d5bcf@steve> 
Date: Wed, 29 Sep 1999 12:45:34 +0200
Message-ID: <1413.938601934@axl.noc.iafrica.com>
Sender: owner-freebsd-questions@FreeBSD.ORG
X-Loop: FreeBSD.ORG
Precedence: bulk



On Tue, 28 Sep 1999 22:16:40 EST, "Steve" wrote:

> root_disk_unit=2
> boot /kernel

Instead of that, try adding this to /boot/loader.conf:

root_disk_unit="2"

Ciao,
Sheldon.


To Unsubscribe: send mail to majordomo@FreeBSD.org
with "unsubscribe freebsd-questions" in the body of the message

Comment 5 Jon Barnett 1999-09-29 11:26:55 UTC
On Tuesday, 28 September 1999 2:58, Kurt Zeilenga 
[SMTP:openldap-its@OpenLDAP.org] wrote:
> Please reproduce using ldapsearch(1) and a freshly build datatabase.

Thanks.  I ran ldapsearch and that failed as well.  I then checked the /var/tmp 
directory where the DB was stored.  It seems like only half the files had been 
touched in the rebuild of the DB.  I removed all the files and rebuilt the 
database.  This cleared the error.  Please close the fault report and sorry for 
the inconvenience.

Jon.


>From owner-freebsd-questions@FreeBSD.ORG  Wed Sep 29 12:35:24 1999
Return-Path: <owner-freebsd-questions@FreeBSD.ORG>
Delivered-To: paul@originative.co.uk
Received: from hub.freebsd.org (hub.FreeBSD.ORG [204.216.27.18])
	by mail.originative.co.uk (Postfix) with ESMTP id 7DD377C57
	for <paul@originative.co.uk>; Wed, 29 Sep 1999 12:35:23 +0100 (BST)
Received: by hub.freebsd.org (Postfix, from userid 538)
	id 4BC781554F; Wed, 29 Sep 1999 03:45:59 -0700 (PDT)
Received: from localhost (localhost [127.0.0.1])
	by hub.freebsd.org (Postfix) with SMTP
	id 2E6D11CD472; Wed, 29 Sep 1999 03:45:59 -0700 (PDT)
	(envelope-from owner-freebsd-questions)
Received: by hub.freebsd.org (bulk_mailer v1.12); Wed, 29 Sep 1999 03:45:59 -0700
Delivered-To: freebsd-questions@freebsd.org
Received: from axl.noc.iafrica.com (axl.noc.iafrica.com [196.31.1.175])
	by hub.freebsd.org (Postfix) with ESMTP id 5450B1555F
	for <freebsd-questions@freebsd.org>; Wed, 29 Sep 1999 03:45:53 -0700 (PDT)
	(envelope-from sheldonh@axl.noc.iafrica.com)
Received: from sheldonh (helo=axl.noc.iafrica.com)
	by axl.noc.iafrica.com with local-esmtp (Exim 3.02 #1)
	id 11WHEt-0000Mo-00; Wed, 29 Sep 1999 12:45:35 +0200
From: Sheldon Hearn <sheldonh@uunet.co.za>
To: "Steve" <steve@piperscreek.com>
Cc: "freebsdquestions" <freebsd-questions@FreeBSD.ORG>
Subject: Re: loader.conf syntax question version 3.2 
In-reply-to: Your message of "Tue, 28 Sep 1999 22:16:40 EST."
             <004301bf0a29$102bb520$4d1d5bcf@steve> 
Date: Wed, 29 Sep 1999 12:45:34 +0200
Message-ID: <1413.938601934@axl.noc.iafrica.com>
Sender: owner-freebsd-questions@FreeBSD.ORG
X-Loop: FreeBSD.ORG
Precedence: bulk



On Tue, 28 Sep 1999 22:16:40 EST, "Steve" wrote:

> root_disk_unit=2
> boot /kernel

Instead of that, try adding this to /boot/loader.conf:

root_disk_unit="2"

Ciao,
Sheldon.


To Unsubscribe: send mail to majordomo@FreeBSD.org
with "unsubscribe freebsd-questions" in the body of the message

Comment 6 Jon Barnett 1999-09-29 11:26:55 UTC
On Tuesday, 28 September 1999 2:58, Kurt Zeilenga 
[SMTP:openldap-its@OpenLDAP.org] wrote:
> Please reproduce using ldapsearch(1) and a freshly build datatabase.

Thanks.  I ran ldapsearch and that failed as well.  I then checked the /var/tmp 
directory where the DB was stored.  It seems like only half the files had been 
touched in the rebuild of the DB.  I removed all the files and rebuilt the 
database.  This cleared the error.  Please close the fault report and sorry for 
the inconvenience.

Jon.


>From owner-freebsd-questions@FreeBSD.ORG  Wed Sep 29 12:35:24 1999
Return-Path: <owner-freebsd-questions@FreeBSD.ORG>
Delivered-To: paul@originative.co.uk
Received: from hub.freebsd.org (hub.FreeBSD.ORG [204.216.27.18])
	by mail.originative.co.uk (Postfix) with ESMTP id 7DD377C57
	for <paul@originative.co.uk>; Wed, 29 Sep 1999 12:35:23 +0100 (BST)
Received: by hub.freebsd.org (Postfix, from userid 538)
	id 4BC781554F; Wed, 29 Sep 1999 03:45:59 -0700 (PDT)
Received: from localhost (localhost [127.0.0.1])
	by hub.freebsd.org (Postfix) with SMTP
	id 2E6D11CD472; Wed, 29 Sep 1999 03:45:59 -0700 (PDT)
	(envelope-from owner-freebsd-questions)
Received: by hub.freebsd.org (bulk_mailer v1.12); Wed, 29 Sep 1999 03:45:59 -0700
Delivered-To: freebsd-questions@freebsd.org
Received: from axl.noc.iafrica.com (axl.noc.iafrica.com [196.31.1.175])
	by hub.freebsd.org (Postfix) with ESMTP id 5450B1555F
	for <freebsd-questions@freebsd.org>; Wed, 29 Sep 1999 03:45:53 -0700 (PDT)
	(envelope-from sheldonh@axl.noc.iafrica.com)
Received: from sheldonh (helo=axl.noc.iafrica.com)
	by axl.noc.iafrica.com with local-esmtp (Exim 3.02 #1)
	id 11WHEt-0000Mo-00; Wed, 29 Sep 1999 12:45:35 +0200
From: Sheldon Hearn <sheldonh@uunet.co.za>
To: "Steve" <steve@piperscreek.com>
Cc: "freebsdquestions" <freebsd-questions@FreeBSD.ORG>
Subject: Re: loader.conf syntax question version 3.2 
In-reply-to: Your message of "Tue, 28 Sep 1999 22:16:40 EST."
             <004301bf0a29$102bb520$4d1d5bcf@steve> 
Date: Wed, 29 Sep 1999 12:45:34 +0200
Message-ID: <1413.938601934@axl.noc.iafrica.com>
Sender: owner-freebsd-questions@FreeBSD.ORG
X-Loop: FreeBSD.ORG
Precedence: bulk



On Tue, 28 Sep 1999 22:16:40 EST, "Steve" wrote:

> root_disk_unit=2
> boot /kernel

Instead of that, try adding this to /boot/loader.conf:

root_disk_unit="2"

Ciao,
Sheldon.


To Unsubscribe: send mail to majordomo@FreeBSD.org
with "unsubscribe freebsd-questions" in the body of the message

Comment 7 Jon Barnett 1999-09-29 11:26:55 UTC
On Tuesday, 28 September 1999 2:58, Kurt Zeilenga 
[SMTP:openldap-its@OpenLDAP.org] wrote:
> Please reproduce using ldapsearch(1) and a freshly build datatabase.

Thanks.  I ran ldapsearch and that failed as well.  I then checked the /var/tmp 
directory where the DB was stored.  It seems like only half the files had been 
touched in the rebuild of the DB.  I removed all the files and rebuilt the 
database.  This cleared the error.  Please close the fault report and sorry for 
the inconvenience.

Jon.


>From owner-freebsd-questions@FreeBSD.ORG  Wed Sep 29 12:35:24 1999
Return-Path: <owner-freebsd-questions@FreeBSD.ORG>
Delivered-To: paul@originative.co.uk
Received: from hub.freebsd.org (hub.FreeBSD.ORG [204.216.27.18])
	by mail.originative.co.uk (Postfix) with ESMTP id 7DD377C57
	for <paul@originative.co.uk>; Wed, 29 Sep 1999 12:35:23 +0100 (BST)
Received: by hub.freebsd.org (Postfix, from userid 538)
	id 4BC781554F; Wed, 29 Sep 1999 03:45:59 -0700 (PDT)
Received: from localhost (localhost [127.0.0.1])
	by hub.freebsd.org (Postfix) with SMTP
	id 2E6D11CD472; Wed, 29 Sep 1999 03:45:59 -0700 (PDT)
	(envelope-from owner-freebsd-questions)
Received: by hub.freebsd.org (bulk_mailer v1.12); Wed, 29 Sep 1999 03:45:59 -0700
Delivered-To: freebsd-questions@freebsd.org
Received: from axl.noc.iafrica.com (axl.noc.iafrica.com [196.31.1.175])
	by hub.freebsd.org (Postfix) with ESMTP id 5450B1555F
	for <freebsd-questions@freebsd.org>; Wed, 29 Sep 1999 03:45:53 -0700 (PDT)
	(envelope-from sheldonh@axl.noc.iafrica.com)
Received: from sheldonh (helo=axl.noc.iafrica.com)
	by axl.noc.iafrica.com with local-esmtp (Exim 3.02 #1)
	id 11WHEt-0000Mo-00; Wed, 29 Sep 1999 12:45:35 +0200
From: Sheldon Hearn <sheldonh@uunet.co.za>
To: "Steve" <steve@piperscreek.com>
Cc: "freebsdquestions" <freebsd-questions@FreeBSD.ORG>
Subject: Re: loader.conf syntax question version 3.2 
In-reply-to: Your message of "Tue, 28 Sep 1999 22:16:40 EST."
             <004301bf0a29$102bb520$4d1d5bcf@steve> 
Date: Wed, 29 Sep 1999 12:45:34 +0200
Message-ID: <1413.938601934@axl.noc.iafrica.com>
Sender: owner-freebsd-questions@FreeBSD.ORG
X-Loop: FreeBSD.ORG
Precedence: bulk



On Tue, 28 Sep 1999 22:16:40 EST, "Steve" wrote:

> root_disk_unit=2
> boot /kernel

Instead of that, try adding this to /boot/loader.conf:

root_disk_unit="2"

Ciao,
Sheldon.


To Unsubscribe: send mail to majordomo@FreeBSD.org
with "unsubscribe freebsd-questions" in the body of the message

Comment 8 Kurt Zeilenga 1999-09-29 15:13:52 UTC
changed notes
changed state Open to Closed
Comment 9 paul@originative.co.uk 1999-09-29 22:27:30 UTC
Apologies for a couple of these junk messages.

Had a bit of a screwup testing a formail script :-(

> -----Original Message-----
> From: jbarnett@pobox.com [mailto:jbarnett@pobox.com]
> Sent: 29 September 1999 23:20
> To: openldap-its@OpenLDAP.org
> Subject: RE: Searching with Netscape LDAP JDK (ITS#306)
> 
> 
> On Tuesday, 28 September 1999 2:58, Kurt Zeilenga 
> [SMTP:openldap-its@OpenLDAP.org] wrote:
> > Please reproduce using ldapsearch(1) and a freshly build datatabase.
> 
> Thanks.  I ran ldapsearch and that failed as well.  I then 
> checked the /var/tmp 
> directory where the DB was stored.  It seems like only half 
> the files had been 
> touched in the rebuild of the DB.  I removed all the files 
> and rebuilt the 
> database.  This cleared the error.  Please close the fault 
> report and sorry for 
> the inconvenience.
> 
> Jon.
> 
> 
> >From owner-freebsd-questions@FreeBSD.ORG  Wed Sep 29 12:35:24 1999
> Return-Path: <owner-freebsd-questions@FreeBSD.ORG>
> Delivered-To: paul@originative.co.uk
> Received: from hub.freebsd.org (hub.FreeBSD.ORG [204.216.27.18])
> 	by mail.originative.co.uk (Postfix) with ESMTP id 7DD377C57
> 	for <paul@originative.co.uk>; Wed, 29 Sep 1999 12:35:23 
> +0100 (BST)
> Received: by hub.freebsd.org (Postfix, from userid 538)
> 	id 4BC781554F; Wed, 29 Sep 1999 03:45:59 -0700 (PDT)
> Received: from localhost (localhost [127.0.0.1])
> 	by hub.freebsd.org (Postfix) with SMTP
> 	id 2E6D11CD472; Wed, 29 Sep 1999 03:45:59 -0700 (PDT)
> 	(envelope-from owner-freebsd-questions)
> Received: by hub.freebsd.org (bulk_mailer v1.12); Wed, 29 Sep 
> 1999 03:45:59 -0700
> Delivered-To: freebsd-questions@freebsd.org
> Received: from axl.noc.iafrica.com (axl.noc.iafrica.com 
> [196.31.1.175])
> 	by hub.freebsd.org (Postfix) with ESMTP id 5450B1555F
> 	for <freebsd-questions@freebsd.org>; Wed, 29 Sep 1999 
> 03:45:53 -0700 (PDT)
> 	(envelope-from sheldonh@axl.noc.iafrica.com)
> Received: from sheldonh (helo=axl.noc.iafrica.com)
> 	by axl.noc.iafrica.com with local-esmtp (Exim 3.02 #1)
> 	id 11WHEt-0000Mo-00; Wed, 29 Sep 1999 12:45:35 +0200
> From: Sheldon Hearn <sheldonh@uunet.co.za>
> To: "Steve" <steve@piperscreek.com>
> Cc: "freebsdquestions" <freebsd-questions@FreeBSD.ORG>
> Subject: Re: loader.conf syntax question version 3.2 
> In-reply-to: Your message of "Tue, 28 Sep 1999 22:16:40 EST."
>              <004301bf0a29$102bb520$4d1d5bcf@steve> 
> Date: Wed, 29 Sep 1999 12:45:34 +0200
> Message-ID: <1413.938601934@axl.noc.iafrica.com>
> Sender: owner-freebsd-questions@FreeBSD.ORG
> X-Loop: FreeBSD.ORG
> Precedence: bulk
> 
> 
> 
> On Tue, 28 Sep 1999 22:16:40 EST, "Steve" wrote:
> 
> > root_disk_unit=2
> > boot /kernel
> 
> Instead of that, try adding this to /boot/loader.conf:
> 
> root_disk_unit="2"
> 
> Ciao,
> Sheldon.
> 
> 
> To Unsubscribe: send mail to majordomo@FreeBSD.org
> with "unsubscribe freebsd-questions" in the body of the message
> 
> 
Comment 10 OpenLDAP project 2014-08-01 21:06:09 UTC
close by request of submitter