如何删除所有条目ldap java [英] how to delete all entries ldap java

查看:533
本文介绍了如何删除所有条目ldap java的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我有一个使用Spring LDAP和Java Naming的Java应用程序.问题是当我删除包含条目的分支时.示例:

I have an application in Java, using Spring LDAP and Java Naming. The problem is when I delete a branch that contains entries. example:

root
|
|----A
|    |
|    |--A1
|       |
|       |----A2
|            |
|            |---A3  
|
|
|-----B

当我尝试删除分支A时,向我发送以下异常:

When I try to delete the branch A, sends me the following exception:

[LDAP: error code 66 - subordinate objects must be deleted first]

请帮助我!谢谢你!

问候.

推荐答案

如果您使用的是Spring LDAP,则应该能够使用带有递归"参数的LdapTemplate#unbind方法来实现此目的:

If you are using Spring LDAP, you should be able to accomplish this using LdapTemplate#unbind method that takes 'recursive' argument:

http://docs.spring.io/spring-ldap/docs/2.0.2.RELEASE/apidocs/org/springframework/ldap/core/LdapTemplate.html#unbind(javax.naming.名称,布尔值)

这篇关于如何删除所有条目ldap java的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆