当我尝试使用Apache LDAP API运行测试时,我收到以下错误。我设置了一个Maven项目,我的pom.xml对Apache Directory服务器和API工件有许多依赖关系。我的代码(我复制并粘贴了一个例子,只是为了起床和运行,以便我可以探索)所有构建都很好。但是,当我运行它(作为Junit测试)时,我得到以下内容....
任何人都可以帮助我吗?也许只是提供一个成功使用Apache LDAP API的例子,也许还给我带有正确依赖关系的pom.xml? (apche LDAP API文档似乎已过时)。
我目前正在使用嵌入式Apache Directory服务器开始测试,使用以下内容...
@RunWith(FrameworkRunner.class)
@CreateLdapServer(transports =
{
@CreateTransport(protocol = "LDAP") ,
@CreateTransport(protocol = "LDAPS") })
// disable changelog, for more info see DIRSERVER-1528
@CreateDS(enableChangeLog = false, name = "PasswordPolicyTest")
public class PasswordPolicyIT extends AbstractLdapTestUnit
{ .......etc }
因此,另一种方法是,如果我定制一些测试只是连接到我在我的机器上运行的本地Directory Server实例。我认为这会阻止我收到的错误消息。再说一遍,如果有人可以在那里提供代码片段,它会很有用..
非常感谢
> 2013-06-20 16:05:10 ERROR FrameworkRunner:287 - Problem locating LDIF
> file in schema repository Multiple copies of resource named
> 'schema/ou=schema/cn=apachemeta/ou=matchingrules/m-oid=1.3.6.1.4.1.18060.0.4.0.1.3.ldif'
> located on classpath at urls
> jar:file:/Users/rk/.m2/repository/org/apache/directory/api/api-ldap-client-all/1.0.0-M17/api-ldap-client-all-1.0.0-M17.jar!/schema/ou%3dschema/cn%3dapachemeta/ou%3dmatchingrules/m-oid%3d1.3.6.1.4.1.18060.0.4.0.1.3.ldif
> jar:file:/Users/rk/.m2/repository/org/apache/directory/shared/shared-ldap-schema-data/1.0.0-M7/shared-ldap-schema-data-1.0.0-M7.jar!/schema/ou%3dschema/cn%3dapachemeta/ou%3dmatchingrules/m-oid%3d1.3.6.1.4.1.18060.0.4.0.1.3.ldif
> jar:file:/Users/rk/.m2/repository/org/apache/directory/server/apacheds-all/2.0.0-M12/apacheds-all-2.0.0-M12.jar!/schema/ou%3dschema/cn%3dapachemeta/ou%3dmatchingrules/m-oid%3d1.3.6.1.4.1.18060.0.4.0.1.3.ldif