Java – apacheds cannot create a new entry

I am using Apache directory studio 2.0 0 and apacheds 2.0 After creating a new partition, o = seven seas, DC = com, as shown in http://directory.apache.org/apacheds/basic-ug/1.4.3-adding-partition.html As shown in, I tried to create a new entry I select objectclass organizationalperson and type parent o = seven seas, RDN uid = name Then I click Next and type the values of the CN and Sn attributes Now I click finish with exceptions:

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' $'postOffice@R_652_2419@' $'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' $'postOffice@R_652_2419@' $'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' $'postOffice@R_652_2419@' $'postalCode' $'postalAddress' $'physicalDeliveryOfficeName' $'ou' $'st' $'l' )
 )
]]

If I use import - > LDIF and select capture 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]

How can I solve it? If I choose a top-level course, I can create a new entry

Solution

There are many problems in this tutorial (spelling, UI looks different, etc.), but I have managed to import the sample data and add a new entry

Your error is for this reason: com contains multiple structural objectclasses This is because the domain and organizationperson are both structural and cannot work together. Try deleting the domain For more information, see LDAP objectclasses

To import Captain Hook hierarchy LDIF, you need to create a new partition first The tutorial is inconsistent with the naming convention, which is the cause of the error Create a new partition:

ID:SevenSeas
Suffix: o=sevenSeas

The error you get is due to DC = com in the tutorial If you open it LDIF, you will see no reference, DC = com

Next, uncheck the auto generate context entry from suffix DN check box It does not create the appropriate properties for the sample Then add these attributes:

o: sevenSeas
objectClass: top
objectClass: organization
description: The context entry for suffix o=sevenSeas

Save config LDIF file and restart the server Then import capture-hook-hierarchy ldif. The directory should be populated and new entries added. Just right click a group and add a new entry

I hope this can help!

The content of this article comes from the network collection of netizens. It is used as a learning reference. The copyright belongs to the original author.
THE END
分享
二维码
< <上一篇
下一篇>>