suse17 0 Newbie Poster

Hi This is my ldif file:

dn: cn=Manager,dc=test,dc=com
dc: test
description: This is my Wonderful company as much text as you want to put in this line upto 32 K
objectClass: top
objectClass: dcObject
objectClass: person
objectClass: organization
objectClass: inetOrgPerson

#First Level Hierarchy
dn: cn=Manager,ou=people,dc=test,dc=com
dc: test
ou: people
description: All people in organisation

objectClass: organizationalunit
cn: smith
sn: rod
mail:cn.sn at test dot com
#dc: test.com
#Second Level hierarchy
dn: cn=Kevin Rule,ou=people,dc=test,dc=com
dc:test
objectClass: inetOrgPerson
cn: Kevin Rule
cn: kevin
sn: rule
mail:cn.sn at test dot com
#dc: test.com

When imported the same I get the following errors:
javax.naming.directory.SchemaViolationException: [LDAP: error code 65 - invalid structural object class chain (person/organization)]; remaining name 'dc=test,dc=com'

Can anyone tell me where is my ldif file wrong, or why is this error so.
Also in Eclipse IDE
I am creating a directory with the attributes cn, sn and mail. Since mail is an attribute defined in inetOrgPerson, So I imported inetOrgPerson schema file in my slapd.conf file.
But while adding entries, it says ldap Error code 65- attribute dc not allowed.
Now If I try to delete dc attribute it gives me a warning. Attribute dc is part of RDN!
Ignoring this warning when I delete dc attribute it again shows me ldap Error code 65- attribute dc not allowed.

Please tell me where I am wrong and do I need to so. DO I have to edit any schema files. I am new to ldap
Thanks for the help.