[Date Prev][Date Next] [Chronological] [Thread] [Top]

JNDI and multiple databases




I am attempting to rewrite some working Perl code into Java using JNDI.

I can't get by the message:
javax.naming.NameNotFoundException: [LDAP: error code 32 - no such
object]

My LDAP instance is perhaps a bit unusual in that it is broken into
three databases:
ou=people,o=ucalgary.ca
ou=uidauthent,o=ucalgary.ca
o=ucalgary.ca

I can read stuff fine out of the o=ucalgary.ca database.  The error
occurs when I try to search ou=people,o=ucalgary.ca.  

My equivalent Perl program works fine.  If I put all objects in the same
database my JNDI code works fine.  It thus seems to be a JNDI/OpenLDAP
compatibility problem.

Anybody have any ideas?

Here is the relevant portion of the debug log.  The only thing that
seems unusual is the get_ctrls stuff.

ber_scanf fmt ({oo}) ber:
ber_dump: buf=0x08105aa8 ptr=0x08105ad5 end=0x08105b02 len=45
  0000:  a3 0c 04 02 73 6e 04 06  6d 6f 72 74 69 73 30 00  
....sn..mortis0.  
  0010:  a0 1b 30 19 04 17 32 2e  31 36 2e 38 34 30 2e 31  
..0...2.16.840.1  
  0020:  2e 31 31 33 37 33 30 2e  33 2e 34 2e 32           
.113730.3.4.2     
end get_filter 0
    filter: (sn=mortis)
ber_scanf fmt ({v}}) ber:
ber_dump: buf=0x08105aa8 ptr=0x08105ae3 end=0x08105b02 len=31
  0000:  30 00 a0 1b 30 19 04 17  32 2e 31 36 2e 38 34 30  
0...0...2.16.840  
  0010:  2e 31 2e 31 31 33 37 33  30 2e 33 2e 34 2e 32     
.1.113730.3.4.2   
=> get_ctrls
ber_scanf fmt ({a) ber:
ber_dump: buf=0x08105aa8 ptr=0x08105ae7 end=0x08105b02 len=27
  0000:  30 19 04 17 32 2e 31 36  2e 38 34 30 2e 31 2e 31  
0...2.16.840.1.1  
  0010:  31 33 37 33 30 2e 33 2e  34 2e 32                 
13730.3.4.2       
=> get_ctrls: oid="2.16.840.1.113730.3.4.2" (noncritical)
<= get_ctrls: 1 0 
    attrs:
conn=0 op=1 SRCH base="ou=people,o=ucalgary.ca" scope=2
filter="(sn=mortis)"
=> ldbm_back_search
dn2entry_r: dn: "OU=PEOPLE,O=UCALGARY.CA"
=> dn2id( "OU=PEOPLE,O=UCALGARY.CA" )
=> ldbm_cache_open( "dn2id.dbb", 73, 600 )
<= ldbm_cache_open (cache 0)
<= dn2id NOID
dn2entry_r: dn: "O=UCALGARY.CA"
=> dn2id( "O=UCALGARY.CA" )
=> ldbm_cache_open( "dn2id.dbb", 73, 600 )
<= ldbm_cache_open (cache 0)
<= dn2id 1
=> id2entry_r( 1 )
=> ldbm_cache_open( "id2entry.dbb", 73, 600 )
<= ldbm_cache_open (cache 1)
=> str2entry
<= str2entry(o=ucalgary.ca) -> -1 (0x8107aa0)
<= id2entry_r( 1 ) 0x8107aa0 (disk)
====> cache_return_entry_r( 1 ): created (0)
send_ldap_result: conn=0 op=1 p=3
send_ldap_result: 10:o=ucalgary.ca:
send_ldap_response: msgid=2 tag=101 err=32

Thanks!

-- ---------------------------------------------------------------
Jeremy Mortis                          
Manager, Web & E-Mail Services                 
University of Calgary Information Technologies, 
2500 University Drive, Calgary, Alberta, Canada T2N 1N4          
Phone (403) 220-4423, Fax (403) 282-9199