directory-users mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Rich Remington <r...@remingtons.us>
Subject Re: LDAP: error code 65 - failed to add entry...
Date Mon, 26 May 2008 22:01:36 GMT
I had the same trouble with the tutorial on developerworks found here: 
http://www.ibm.com/developerworks/java/library/j-acegi2/

The solution is to add the inetOrgPerson objectclass to each dn: uid=xxx 
entry from the example ldif file before importing.  For example, in the 
"dn: uid=specialUser, ou=..." case, it should look like the following:

dn: uid=specialUser,ou=departments,o=manufacturingEnterprise,dc=org
objectclass: inetOrgPerson
objectclass: organizationalPerson
objectclass: person
objectclass: top
cn: Jenni
sn: Jenni
uid: specialUser
userpassword:: MTIz

You will also have to make the same change for bob and alice.  Also, if 
you got a partial import of the LDIF file, then you will have to remove 
the o=manufacturingEnterprise node and its children before attempting 
the import again.

Cheers,
Rich


Wei Chen wrote:
> Hi all,
>
> I try to import a LDIF file but got exception as
> follow. SOmeone knows why?
>
> The LDIF is attached at the end.
>
> Regards
>
> Wei
>
>
>
> Exception:
> ***********
> javax.naming.directory.SchemaViolationException: 
> [LDAP: error code 65 - failed to add entry
> uid=specialUser,ou=departments,o=manufacturingEnterprise,dc=org:
>
> Attribute uid not declared in objectClasses of entry
> uid=specialUser,ou=departments,o=manufacturingEnterprise,dc=org];
>
> remaining name
> 'uid=specialUser,ou=departments,o=manufacturingEnterprise,dc=org'
>
>
> LDIF:
> ******
> version: 1
> dn: o=manufacturingEnterprise,dc=org
> objectclass: organization
> objectclass: top
> o: manufacturingEnterprise
>
> dn: cn=manager,o=manufacturingEnterprise,dc=org
> objectclass: organizationalPerson
> objectclass: person
> objectclass: top
> cn: manager
> sn: Asif Shahzad
> userpassword:: c2VjcmV0
>
> dn: ou=departments,o=manufacturingEnterprise,dc=org
> objectclass: organizationalUnit
> objectclass: top
> ou: departments
>
> dn:
> ou=marketing,ou=departments,o=manufacturingEnterprise,dc=org
> objectclass: organizationalUnit
> objectclass: top
> ou: marketing
>
> dn:
> cn=HOD,ou=marketing,ou=departments,o=manufacturingEnterprise,dc=org
> objectclass: groupOfNames
> objectclass: top
> cn: HOD
> member:
> uid=bob,ou=employees,ou=partners,o=manufacturingEnterprise,dc=org
> member:
> uid=specialUser,ou=departments,o=manufacturingEnterprise,dc=org
> ou: HEAD_OF_MARKETING
>
> dn:
> cn=managers,ou=marketing,ou=departments,o=manufacturingEnterprise,dc=org
> objectclass: groupOfNames
> objectclass: top
> cn: managers
> member:
> uid=bob,ou=employees,ou=partners,o=manufacturingEnterprise,dc=org
> ou: MARKETING_MANAGER
>
> dn:
> cn=customerRepresentatives,ou=marketing,ou=departments,o=manufacturingEnterprise,dc=org
> objectclass: groupOfNames
> objectclass: top
> cn: customerRepresentatives
> member:
> uid=bob,ou=employees,ou=partners,o=manufacturingEnterprise,dc=org
> ou: CUSTOMER_REPRESENTATIVE
>
> dn:
> ou=engineering,ou=departments,o=manufacturingEnterprise,dc=org
> objectclass: organizationalUnit
> objectclass: top
> ou: engineering
>
> dn:
> cn=HOD,ou=engineering,ou=departments,o=manufacturingEnterprise,dc=org
> objectclass: groupOfNames
> objectclass: top
> cn: HOD
> member:
> uid=alice,ou=employees,ou=partners,o=manufacturingEnterprise,dc=org
> member:
> uid=specialUser,ou=departments,o=manufacturingEnterprise,dc=org
> ou: HEAD_OF_ENGINEERING
>
> dn:
> cn=engineers,ou=engineering,ou=departments,o=manufacturingEnterprise,dc=org
> objectclass: groupOfNames
> objectclass: top
> cn: engineers
> member:
> uid=bob,ou=employees,ou=partners,o=manufacturingEnterprise,dc=org
> ou: ENGINEER
>
> dn:
> cn=technicians,ou=engineering,ou=departments,o=manufacturingEnterprise,dc=org
> objectclass: groupOfNames
> objectclass: top
> cn: technicians
> member:
> uid=bob,ou=employees,ou=partners,o=manufacturingEnterprise,dc=org
> ou: TECHNICIAN
>
> dn:
> uid=specialUser,ou=departments,o=manufacturingEnterprise,dc=org
> objectclass: organizationalPerson
> objectclass: person
> objectclass: top
> cn: Jenni
> sn: Jenni
> uid: specialUser
> userpassword:: MTIz
>
> dn: ou=partners,o=manufacturingEnterprise,dc=org
> objectclass: organizationalUnit
> objectclass: top
> ou: partners
>
> dn:
> ou=employees,ou=partners,o=manufacturingEnterprise,dc=org
> objectclass: organizationalUnit
> objectclass: top
> ou: employees
>
> dn:
> uid=bob,ou=employees,ou=partners,o=manufacturingEnterprise,dc=org
> objectclass: organizationalPerson
> objectclass: person
> objectclass: top
> cn: Bob Steven
> sn: Bob
> uid: bob
> userpassword:: MTIz
>
> dn:
> uid=alice,ou=employees,ou=partners,o=manufacturingEnterprise,dc=org
> objectclass: organizationalPerson
> objectclass: person
> objectclass: top
> cn: Alice John
> sn: Alice
> uid: alice
> userpassword:: MTIz
>
> dn:
> ou=cutomers,ou=partners,o=manufacturingEnterprise,dc=org
> objectclass: organizationalUnit
> objectclass: top
> ou: cutomers
>
> dn:
> ou=suppliers,ou=partners,o=manufacturingEnterprise,dc=org
> objectclass: organizationalUnit
> objectclass: top
> ou: suppliers
>
>
>
>
>
>       ____________________________________________________________________________________
> Be a better friend, newshound, and 
> know-it-all with Yahoo! Mobile.  Try it now.  http://mobile.yahoo.com/;_ylt=Ahu06i62sR8HDtDypao8Wcj9tAcJ

>
>   


Mime
View raw message