activeldap/activeldap — Issue #31: ActiveLdap::ObjectClassError: unknown objectClass in LDAP server: top, costCenter
Author: pschyska
Created: 2012-01-16 16:32:19+00:00
State: open

Hi,

I'm getting an error as shown below when using #find on a model class:

Loading development environment (Rails 3.1.3)
:001 > Costcenter.find "112345"
ActiveLdap::ObjectClassError: unknown objectClass in LDAP server: top, costCenter

This is my model class:

class Costcenter < ActiveLdap::Base
ldap_mapping :dn_attribute => "cn",
:prefix => "ou=costcenters",
:classes => ["top", "costCenter"]

has_many :cc_managers, :class_name=> "LdapUser", :wrap => "ccManager", :primary_key => "dn"
end

This is parts of my ldap schema defining costCenter class:

attributetype ( 1.3.6.1.4.1.4203.666.1.94.1
NAME 'ccName'
DESC 'Der Name der Kostenstelle'
EQUALITY caseIgnoreMatch
SUBSTR caseIgnoreSubstringsMatch
SYNTAX 1.3.6.1.4.1.1466.115.121.1.15
SINGLE-VALUE )

attributetype ( 1.3.6.1.4.1.4203.666.1.95
NAME 'ccManager'
DESC 'Kostenstellenverantwortliche(r)'
SUP uniqueMember )

attributetype ( 1.3.6.1.4.1.4203.666.1.98
NAME 'taxable'
DESC 'Ist diese Kostenstelle steuerpflichtig? (pflichtig, frei, gemischt)'
SYNTAX 1.3.6.1.4.1.1466.115.121.1.15
EQUALITY caseIgnoreMatch
SUBSTR caseIgnoreSubstringsMatch
SINGLE-VALUE
)

# costCenter
objectclass ( 1.3.6.1.4.1.4203.666.1.101 NAME 'costCenter'
DESC 'Eine Kostenstelle'
SUP top STRUCTURAL
MUST ( ccName $ cn $ taxable )
MAY ( ccManager )
)

I have tried everything to no avail.
With the net-ldap gem (latest and trunk 0.2.20110317223538 from https://github.com/RoryO/ruby-net-ldap.git) I get the error as given above.
With the ruby-ldap gem I get "abort trap" hard ruby lockups with webrick as well as with thin (webrick problems are known obviously). It's happening with activeldap trunk and latest.
The rest of my environment is:

OpenLDAP-Server in CentOS is openldap-servers.i386 0:2.3.43-12.el5_7.10

% ruby -v ruby 1.9.3p0 (2011-10-30 revision 33570) [x86_64-darwin11.2.0]
% rails -v
Rails 3.1.3

on OSX 10.7.2

I don't know what's happening here, the stuff is simple enough, right?

Thanks,

Paul