jjzjj

java - apacheDS 无法创建新条目

coder 2024-03-10 原文

我正在使用 Apache Directory Studio 2.0.0ApacheDS 2.0。创建新分区后 o=SevenSeans,dc=com,如 http://directory.apache.org/apacheds/basic-ug/1.4.3-adding-partition.html 中所述我正在尝试创建一个新条目。我选择 objectClass organizationalPerson 并键入 parent o=SevenSeans,dc=com, RDN uid=Name。然后我单击下一步并键入 cnsn 属性的值。现在我点击完成并有异常(exception):

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,o=SevenSeans,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,o=SevenSeans,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,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,o=SevenSeans,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' )
 )
]]

如果我使用 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
    objectclass: organizationalUnit
    objectclass: top
    ou: people
: ERR_268 Cannot find a partition for ou=people,o=sevenSeas]

我该如何解决这个问题?如果我选择 top 类,就可以创建新条目。

最佳答案

该教程存在许多问题(拼写、UI 看起来不同等),但我已成功导入示例数据并添加新条目。

您的错误是由于以下原因而发生的:com 包含多个 STRUCTURAL ObjectClass。发生这种情况是因为 domainorganizationalPerson 都是结构化的,不能一起工作,请尝试删除 domain。有关详细信息,请参阅 LDAP objectClasses

要导入 captain-hook-hierarchy.ldif,您需要先创建一个新分区。该教程不符合命名约定,是导致您出错的原因。 创建一个新分区:

ID:SevenSeas
Suffix: o=sevenSeas

您收到的错误是因为教程中的 ,dc=com。如果您打开 .ldif,您会看到没有对 ,dc=com 的引用。

接下来取消选中 Auto-generate context entry from suffix DN 复选框。它不会为示例创建适当的属性。然后添加这些属性:

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

保存config.ldif文件并重启服务器。然后导入 captain-hook-hierarchy.ldif。 该目录应该填充并添加新条目,只需右键单击一个组并添加新条目

希望这对您有所帮助!

关于java - apacheDS 无法创建新条目,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/20003709/

有关java - apacheDS 无法创建新条目的更多相关文章

  1. ruby - 如何在 Ruby 中顺序创建 PI - 2

    出于纯粹的兴趣,我很好奇如何按顺序创建PI,而不是在过程结果之后生成数字,而是让数字在过程本身生成时显示。如果是这种情况,那么数字可以自行产生,我可以对以前看到的数字实现垃圾收集,从而创建一个无限系列。结果只是在Pi系列之后每秒生成一个数字。这是我通过互联网筛选的结果:这是流行的计算机友好算法,类机器算法:defarccot(x,unity)xpow=unity/xn=1sign=1sum=0loopdoterm=xpow/nbreakifterm==0sum+=sign*(xpow/n)xpow/=x*xn+=2sign=-signendsumenddefcalc_pi(digits

  2. python - 如何使用 Ruby 或 Python 创建一系列高音调和低音调的蜂鸣声? - 2

    关闭。这个问题是opinion-based.它目前不接受答案。想要改进这个问题?更新问题,以便editingthispost可以用事实和引用来回答它.关闭4年前。Improvethisquestion我想在固定时间创建一系列低音和高音调的哔哔声。例如:在150毫秒时发出高音调的蜂鸣声在151毫秒时发出低音调的蜂鸣声200毫秒时发出低音调的蜂鸣声250毫秒的高音调蜂鸣声有没有办法在Ruby或Python中做到这一点?我真的不在乎输出编码是什么(.wav、.mp3、.ogg等等),但我确实想创建一个输出文件。

  3. ruby-on-rails - 由于 "wkhtmltopdf",PDFKIT 显然无法正常工作 - 2

    我在从html页面生成PDF时遇到问题。我正在使用PDFkit。在安装它的过程中,我注意到我需要wkhtmltopdf。所以我也安装了它。我做了PDFkit的文档所说的一切......现在我在尝试加载PDF时遇到了这个错误。这里是错误:commandfailed:"/usr/local/bin/wkhtmltopdf""--margin-right""0.75in""--page-size""Letter""--margin-top""0.75in""--margin-bottom""0.75in""--encoding""UTF-8""--margin-left""0.75in""-

  4. ruby - 使用 Vim Rails,您可以创建一个新的迁移文件并一次性打开它吗? - 2

    使用带有Rails插件的vim,您可以创建一个迁移文件,然后一次性打开该文件吗?textmate也可以这样吗? 最佳答案 你可以使用rails.vim然后做类似的事情::Rgeneratemigratonadd_foo_to_bar插件将打开迁移生成的文件,这正是您想要的。我不能代表textmate。 关于ruby-使用VimRails,您可以创建一个新的迁移文件并一次性打开它吗?,我们在StackOverflow上找到一个类似的问题: https://sta

  5. ruby-on-rails - 无法使用 Rails 3.2 创建插件? - 2

    我对最新版本的Rails有疑问。我创建了一个新应用程序(railsnewMyProject),但我没有脚本/生成,只有脚本/rails,当我输入ruby./script/railsgeneratepluginmy_plugin"Couldnotfindgeneratorplugin.".你知道如何生成插件模板吗?没有这个命令可以创建插件吗?PS:我正在使用Rails3.2.1和ruby​​1.8.7[universal-darwin11.0] 最佳答案 随着Rails3.2.0的发布,插件生成器已经被移除。查看变更日志here.现在

  6. ruby - 无法运行 Rails 2.x 应用程序 - 2

    我尝试运行2.x应用程序。我使用rvm并为此应用程序设置其他版本的ruby​​:$rvmuseree-1.8.7-head我尝试运行服务器,然后出现很多错误:$script/serverNOTE:Gem.source_indexisdeprecated,useSpecification.Itwillberemovedonorafter2011-11-01.Gem.source_indexcalledfrom/Users/serg/rails_projects_terminal/work_proj/spohelp/config/../vendor/rails/railties/lib/r

  7. ruby-on-rails - 无法在centos上安装therubyracer(V8和GCC出错) - 2

    我正在尝试在我的centos服务器上安装therubyracer,但遇到了麻烦。$geminstalltherubyracerBuildingnativeextensions.Thiscouldtakeawhile...ERROR:Errorinstallingtherubyracer:ERROR:Failedtobuildgemnativeextension./usr/local/rvm/rubies/ruby-1.9.3-p125/bin/rubyextconf.rbcheckingformain()in-lpthread...yescheckingforv8.h...no***e

  8. ruby - 如何使用 RSpec::Core::RakeTask 创建 RSpec Rake 任务? - 2

    如何使用RSpec::Core::RakeTask初始化RSpecRake任务?require'rspec/core/rake_task'RSpec::Core::RakeTask.newdo|t|#whatdoIputinhere?endInitialize函数记录在http://rubydoc.info/github/rspec/rspec-core/RSpec/Core/RakeTask#initialize-instance_method没有很好的记录;它只是说:-(RakeTask)initialize(*args,&task_block)AnewinstanceofRake

  9. ruby - 无法让 RSpec 工作—— 'require' : cannot load such file - 2

    我花了三天的时间用头撞墙,试图弄清楚为什么简单的“rake”不能通过我的规范文件。如果您遇到这种情况:任何文件夹路径中都不要有空格!。严重地。事实上,从现在开始,您命名的任何内容都没有空格。这是我的控制台输出:(在/Users/*****/Desktop/LearningRuby/learn_ruby)$rake/Users/*******/Desktop/LearningRuby/learn_ruby/00_hello/hello_spec.rb:116:in`require':cannotloadsuchfile--hello(LoadError) 最佳

  10. ruby - 为什么 SecureRandom.uuid 创建一个唯一的字符串? - 2

    关闭。这个问题需要detailsorclarity.它目前不接受答案。想改进这个问题吗?通过editingthispost添加细节并澄清问题.关闭8年前。Improvethisquestion为什么SecureRandom.uuid创建一个唯一的字符串?SecureRandom.uuid#=>"35cb4e30-54e1-49f9-b5ce-4134799eb2c0"SecureRandom.uuid方法创建的字符串从不重复?

随机推荐