我正在使用Apache Directory Studio 2.0.0和ApacheDS 2.0.在创建一个新分区之后,o = SevenSeans,dc = com,如
http://directory.apache.org/apacheds/basic-ug/1.4.3-adding-partition.html所示,我试图创建一个新条目.我选择objectClass organizationalPerson并键入parent o = SevenSeans,RDN uid = Name.然后我单击下一个并键入cn和sn属性的值.现在我点击完成并有例外:
Error while creating entry - [LDAP: error code 65 - OBJECT_CLASS_VIOLATION: Failed for MessageType : ADD_REQUES javax.naming.directory.SchemaViolationException: [LDAP: error code 65 - OBJECT_CLASS_VIOLATION: Failed for MessageType : ADD_REQUEST Message ID : 19 Add Request : Entry dn[n]: uid=Name,o=SevenSeans,dc=com objectclass: domain objectclass: top objectclass: extensibleObject objectclass: organizationalPerson objectclass: person uid: Name dc: SevenSeans sn: sf cn: s : ERR_61 Entry uid=Name,dc=com contains more than one STRUCTURAL ObjectClass: [OBJECT_CLASS ( 0.9.2342.19200300.100.4.13 NAME 'domain' SUP 'top' STRUCTURAL MUST 'dc' MAY ( 'associatedName' $'o' $'description' $'businessCategory' $'seeAlso' $'searchGuide' $'userPassword' $'l' $'st' $'street' $'physicalDeliveryOfficeName' $'postalAddress' $'postalCode' $'postOfficeBox' $'facsimileTelephoneNumber' $'internationaliSDNNumber' $'telephoneNumber' $'teletexTerminalIdentifier' $'telexNumber' $'preferredDeliveryMethod' $'destinationIndicator' $'registeredAddress' $'x121Address' ) ),OBJECT_CLASS ( 2.5.6.7 NAME 'organizationalPerson' DESC RFC2256: an organizational person SUP 'person' STRUCTURAL MAY ( 'title' $'x121Address' $'registeredAddress' $'destinationIndicator' $'preferredDeliveryMethod' $'telexNumber' $'teletexTerminalIdentifier' $'telephoneNumber' $'internationaliSDNNumber' $'facsimileTelephoneNumber' $'street' $'postOfficeBox' $'postalCode' $'postalAddress' $'physicalDeliveryOfficeName' $'ou' $'st' $'l' ) ) ]]; remaining name 'uid=Name,dc=com' at com.sun.jndi.ldap.LdapCtx.mapErrorCode(Unknown Source) at com.sun.jndi.ldap.LdapCtx.processReturnCode(Unknown Source) at com.sun.jndi.ldap.LdapCtx.processReturnCode(Unknown Source) at com.sun.jndi.ldap.LdapCtx.c_createSubcontext(Unknown Source) at com.sun.jndi.toolkit.ctx.ComponentDirContext.p_createSubcontext(Unknown Source) at com.sun.jndi.toolkit.ctx.PartialCompositeDirContext.createSubcontext(Unknown Source) at org.apache.directory.studio.connection.core.io.jndi.JNDIConnectionWrapper$4.run(JNDIConnectionWrapper.java:669) at org.apache.directory.studio.connection.core.io.jndi.JNDIConnectionWrapper.runAndMonitor(JNDIConnectionWrapper.java:1305) at org.apache.directory.studio.connection.core.io.jndi.JNDIConnectionWrapper.checkConnectionAndRunAndMonitor(JNDIConnectionWrapper.java:1237) at org.apache.directory.studio.connection.core.io.jndi.JNDIConnectionWrapper.createEntry(JNDIConnectionWrapper.java:722) at org.apache.directory.studio.ldapbrowser.core.jobs.CreateEntryRunnable.createEntry(CreateEntryRunnable.java:224) at org.apache.directory.studio.ldapbrowser.core.jobs.CreateEntryRunnable.run(CreateEntryRunnable.java:124) at org.apache.directory.studio.connection.ui.RunnableContextRunner$1.run(RunnableContextRunner.java:112) at org.eclipse.jface.operation.ModalContext$ModalContextThread.run(ModalContext.java:121) [LDAP: error code 65 - OBJECT_CLASS_VIOLATION: Failed for MessageType : ADD_REQUEST Message ID : 19 Add Request : Entry dn[n]: uid=Name,OBJECT_CLASS ( 2.5.6.7 NAME 'organizationalPerson' DESC RFC2256: an organizational person SUP 'person' STRUCTURAL MAY ( 'title' $'x121Address' $'registeredAddress' $'destinationIndicator' $'preferredDeliveryMethod' $'telexNumber' $'teletexTerminalIdentifier' $'telephoneNumber' $'internationaliSDNNumber' $'facsimileTelephoneNumber' $'street' $'postOfficeBox' $'postalCode' $'postalAddress' $'physicalDeliveryOfficeName' $'ou' $'st' $'l' ) ) ]]
如果我使用import-> LDIF并选择captain-hook-hierarchy.ldif
Error while importing LDIF - [LDAP: error code 32 - NO_SUCH_OBJECT: Failed for MessageType : ADD_REQUES javax.naming.NameNotFoundException: [LDAP: error code 32 - NO_SUCH_OBJECT: Failed for MessageType : ADD_REQUEST Message ID : 20 Add Request : Entry dn[n]: ou=people,o=sevenSeas objectclass: organizationalUnit objectclass: top ou: people : ERR_268 Cannot find a partition for ou=people,o=sevenSeas]; remaining name 'ou=people,o=sevenSeas' at com.sun.jndi.ldap.LdapCtx.mapErrorCode(Unknown Source) at com.sun.jndi.ldap.LdapCtx.processReturnCode(Unknown Source) at com.sun.jndi.ldap.LdapCtx.processReturnCode(Unknown Source) at com.sun.jndi.ldap.LdapCtx.c_createSubcontext(Unknown Source) at com.sun.jndi.toolkit.ctx.ComponentDirContext.p_createSubcontext(Unknown Source) at com.sun.jndi.toolkit.ctx.PartialCompositeDirContext.createSubcontext(Unknown Source) at org.apache.directory.studio.connection.core.io.jndi.JNDIConnectionWrapper$4.run(JNDIConnectionWrapper.java:669) at org.apache.directory.studio.connection.core.io.jndi.JNDIConnectionWrapper.runAndMonitor(JNDIConnectionWrapper.java:1305) at org.apache.directory.studio.connection.core.io.jndi.JNDIConnectionWrapper.checkConnectionAndRunAndMonitor(JNDIConnectionWrapper.java:1237) at org.apache.directory.studio.connection.core.io.jndi.JNDIConnectionWrapper.createEntry(JNDIConnectionWrapper.java:722) at org.apache.directory.studio.ldapbrowser.core.jobs.ImportLdifRunnable.importLdifRecord(ImportLdifRunnable.java:464) at org.apache.directory.studio.ldapbrowser.core.jobs.ImportLdifRunnable.importLdif(ImportLdifRunnable.java:272) at org.apache.directory.studio.ldapbrowser.core.jobs.ImportLdifRunnable.run(ImportLdifRunnable.java:218) at org.apache.directory.studio.connection.core.jobs.StudioConnectionJob.run(StudioConnectionJob.java:109) at org.eclipse.core.internal.jobs.Worker.run(Worker.java:54) [LDAP: error code 32 - NO_SUCH_OBJECT: Failed for MessageType : ADD_REQUEST Message ID : 20 Add Request : Entry dn[n]: ou=people,o=sevenSeas]
我该如何解决?如果我选择顶级课程,可以创建新的条目.
解决方法
该教程中有许多问题(拼写,UI看起来不同等),但是我已经设法导入样本数据并添加了一个新的条目.
您的错误出于这个原因:com包含多个STRUCTURAL ObjectClass.这是因为域和organizationPerson都是结构性的,不能一起工作,尝试删除域.欲了解更多信息,请参阅LDAP objectClasses
要导入captain-hook-hierarchy.ldif,您需要先创建一个新的分区.该教程与命名约定不一致,是导致错误的原因.
创建一个新的分区:
ID:SevenSeas Suffix: o=sevenSeas
你得到的错误是由于教程中的dc = com.如果你打开.ldif,你会看到没有参考,dc = com.
下一步取消选中从后缀DN复选框自动生成上下文条目.它不会为该示例创建适当的属性.然后添加这些属性:
o: sevenSeas objectClass: top objectClass: organization description: The context entry for suffix o=sevenSeas
保存config.ldif文件并重新启动服务器.然后导入captain-hook-hierarchy.ldif.
该目录应该填充并添加新条目只需右键单击一个组并添加新条目.
希望这可以帮助!