[activeldap-discuss] <attr> is unknown attribute (ActiveLdap::UnknownAttribute)
Tim Hermans
thermans at gmail.com
Thu Apr 22 11:15:26 EDT 2010
About a year ago we discussed this problem (see thread "unknown objectClass:
what am I doing wrong?"). I'm revisiting it now 'cos I'd really like to see
this work with my LDAP server.
Here's the issue: I get ActiveLdap::UnknownAttribute when I try to find any
attribute. The search completes properly on the server, ActiveLdap just
doesn't seem to process the results properly.
I believe it might be my proprietary schema. Here's what a typical tree
item looks like:
DSE root:
cn=admin root
cn=site
umpn=1.555.5551234
objectclass: top
objectclass: umphone
objectclass: umphonenumber
umivrflow: orion
umivrvariant: testing
umpn: 1.555.5551234
umpnstatus: A
umpntype: P
Here's the code:
require 'active_ldap'
class Target < ActiveLdap::Base
ldap_mapping :dn_attribute => "umpn",
:prefix => "",
:classes => ['top', 'umphone', 'umphonenumber']
end
ActiveLdap::Base.setup_connection :host => 'ldaphost',
:base => 'cn=site, cn= admin root',
:bind_dn => 'cn=root',
:password => 'xxxxxx'
@target = Target.find('1.555.5551234').collect
And the backtrace:
/home/thermans/.gem/gems/activeldap-1.2.1/lib/active_ldap/base.rb:1277:in
`set_attribute': umpn is unknown attribute (ActiveLdap::UnknownAttribute)
from
/home/thermans/.gem/gems/activeldap-1.2.1/lib/active_ldap/base.rb:782:in
`dn='
from
/home/thermans/.gem/gems/activeldap-1.2.1/lib/active_ldap/base.rb:1155:in
`initialize_by_ldap_data'
from
/home/thermans/.gem/gems/activeldap-1.2.1/lib/active_ldap/base.rb:611:in
`instantiate_without_callbacks'
from
/home/thermans/.gem/gems/activeldap-1.2.1/lib/active_ldap/base.rb:610:in
`instance_eval'
from
/home/thermans/.gem/gems/activeldap-1.2.1/lib/active_ldap/base.rb:610:in
`instantiate_without_callbacks'
from
/home/thermans/.gem/gems/activeldap-1.2.1/lib/active_ldap/callbacks.rb:29:in
`instantiate'
from
/home/thermans/.gem/gems/activeldap-1.2.1/lib/active_ldap/operations.rb:283:in
`find_every'
from
/home/thermans/.gem/gems/activeldap-1.2.1/lib/active_ldap/operations.rb:282:in
`collect'
from
/home/thermans/.gem/gems/activeldap-1.2.1/lib/active_ldap/operations.rb:282:in
`find_every'
from
/home/thermans/.gem/gems/activeldap-1.2.1/lib/active_ldap/operations.rb:226:in
`find'
from ldap.rb:17
The schema itself is attached.
The issue seems to be that "real_name" (in "base.rb") does not get set. I'm
not sure what this is: I don't really have the skills to analyse further.
Can anyone help?
Thanks
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://rubyforge.org/pipermail/ruby-activeldap-discuss/attachments/20100422/26be1668/attachment-0001.html>
-------------- next part --------------
A non-text attachment was scrubbed...
Name: schema.rb
Type: application/octet-stream
Size: 160417 bytes
Desc: not available
URL: <http://rubyforge.org/pipermail/ruby-activeldap-discuss/attachments/20100422/26be1668/attachment-0001.obj>
More information about the ruby-activeldap-discuss
mailing list