directory-users mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Amandine Charbonnier <acharbonn...@besancon.parkeon.com>
Subject Apache DS unit tests
Date Tue, 07 Jul 2009 15:29:49 GMT
Hi,

I want to write unit tests with JUnit (and maven) which used an embedded 
LDap. I have found your article : 
http://directory.apache.org/apacheds/1.0/using-apacheds-for-unit-tests.html
I try the more simplest example but it failed with an exception :
org.apache.directory.shared.ldap.exception.LdapConfigurationException: 
failed while trying to parse system ldif file [Root exception is 
org.apache.directory.shared.ldap.exception.LdapNameNotFoundException: 
dc=parkeon,dc=com]
    at 
org.apache.directory.server.unit.AbstractServerTest.importLdif(AbstractServerTest.java:394)
    at 
com.parkeon.transfolio.agent.manager.AgentManagerImplTest.testgetProviderNameById(AgentManagerImplTest.java:62)
    at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
    at 
sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:39)
    at 
sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:25)
    at java.lang.reflect.Method.invoke(Method.java:597)
    at junit.framework.TestCase.runTest(TestCase.java:164)
    at junit.framework.TestCase.runBare(TestCase.java:130)
    at junit.framework.TestResult$1.protect(TestResult.java:106)
    at junit.framework.TestResult.runProtected(TestResult.java:124)
    at junit.framework.TestResult.run(TestResult.java:109)
    at junit.framework.TestCase.run(TestCase.java:120)
    at junit.framework.TestSuite.runTest(TestSuite.java:230)
    at junit.framework.TestSuite.run(TestSuite.java:225)
    at 
org.eclipse.jdt.internal.junit.runner.junit3.JUnit3TestReference.run(JUnit3TestReference.java:130)
    at 
org.eclipse.jdt.internal.junit.runner.TestExecution.run(TestExecution.java:38)
    at 
org.eclipse.jdt.internal.junit.runner.RemoteTestRunner.runTests(RemoteTestRunner.java:460)
    at 
org.eclipse.jdt.internal.junit.runner.RemoteTestRunner.runTests(RemoteTestRunner.java:673)
    at 
org.eclipse.jdt.internal.junit.runner.RemoteTestRunner.run(RemoteTestRunner.java:386)
    at 
org.eclipse.jdt.internal.junit.runner.RemoteTestRunner.main(RemoteTestRunner.java:196)
Caused by: 
org.apache.directory.shared.ldap.exception.LdapNameNotFoundException: 
dc=parkeon,dc=com
    at 
org.apache.directory.server.core.partition.DefaultPartitionNexus.getPartition(DefaultPartitionNexus.java:1153)
    at 
org.apache.directory.server.core.partition.DefaultPartitionNexus.hasEntry(DefaultPartitionNexus.java:1075)
    at 
org.apache.directory.server.core.interceptor.InterceptorChain$1.hasEntry(InterceptorChain.java:167)
    at 
org.apache.directory.server.core.interceptor.InterceptorChain$Entry$1.hasEntry(InterceptorChain.java:1259)
    at 
org.apache.directory.server.core.interceptor.BaseInterceptor.hasEntry(BaseInterceptor.java:160)
    at 
org.apache.directory.server.core.interceptor.InterceptorChain$Entry$1.hasEntry(InterceptorChain.java:1259)
    at 
org.apache.directory.server.core.interceptor.BaseInterceptor.hasEntry(BaseInterceptor.java:160)
    at 
org.apache.directory.server.core.interceptor.InterceptorChain$Entry$1.hasEntry(InterceptorChain.java:1259)
    at 
org.apache.directory.server.core.interceptor.BaseInterceptor.hasEntry(BaseInterceptor.java:160)
    at 
org.apache.directory.server.core.interceptor.InterceptorChain$Entry$1.hasEntry(InterceptorChain.java:1259)
    at 
org.apache.directory.server.core.interceptor.BaseInterceptor.hasEntry(BaseInterceptor.java:160)
    at 
org.apache.directory.server.core.interceptor.InterceptorChain$Entry$1.hasEntry(InterceptorChain.java:1259)
    at 
org.apache.directory.server.core.interceptor.BaseInterceptor.hasEntry(BaseInterceptor.java:160)
    at 
org.apache.directory.server.core.interceptor.InterceptorChain$Entry$1.hasEntry(InterceptorChain.java:1259)
    at 
org.apache.directory.server.core.interceptor.BaseInterceptor.hasEntry(BaseInterceptor.java:160)
    at 
org.apache.directory.server.core.interceptor.InterceptorChain$Entry$1.hasEntry(InterceptorChain.java:1259)
    at 
org.apache.directory.server.core.interceptor.BaseInterceptor.hasEntry(BaseInterceptor.java:160)
    at 
org.apache.directory.server.core.interceptor.InterceptorChain$Entry$1.hasEntry(InterceptorChain.java:1259)
    at 
org.apache.directory.server.core.exception.ExceptionInterceptor.add(ExceptionInterceptor.java:156)
    at 
org.apache.directory.server.core.interceptor.InterceptorChain$Entry$1.add(InterceptorChain.java:1155)
    at 
org.apache.directory.server.core.interceptor.BaseInterceptor.add(BaseInterceptor.java:130)
    at 
org.apache.directory.server.core.interceptor.InterceptorChain$Entry$1.add(InterceptorChain.java:1155)
    at 
org.apache.directory.server.core.authz.AciAuthorizationInterceptor.add(AciAuthorizationInterceptor.java:443)
    at 
org.apache.directory.server.core.interceptor.InterceptorChain$Entry$1.add(InterceptorChain.java:1155)
    at 
org.apache.directory.server.core.referral.ReferralInterceptor.add(ReferralInterceptor.java:363)
    at 
org.apache.directory.server.core.interceptor.InterceptorChain$Entry$1.add(InterceptorChain.java:1155)
    at 
org.apache.directory.server.core.authn.AuthenticationInterceptor.add(AuthenticationInterceptor.java:204)
    at 
org.apache.directory.server.core.interceptor.InterceptorChain$Entry$1.add(InterceptorChain.java:1155)
    at 
org.apache.directory.server.core.normalization.NormalizationInterceptor.add(NormalizationInterceptor.java:112)
    at 
org.apache.directory.server.core.interceptor.InterceptorChain.add(InterceptorChain.java:722)
    at 
org.apache.directory.server.core.partition.PartitionNexusProxy.add(PartitionNexusProxy.java:447)
    at 
org.apache.directory.server.core.partition.PartitionNexusProxy.add(PartitionNexusProxy.java:435)
    at 
org.apache.directory.server.core.jndi.ServerContext.doAddOperation(ServerContext.java:224)
    at 
org.apache.directory.server.core.jndi.ServerDirContext.createSubcontext(ServerDirContext.java:445)
    at 
javax.naming.directory.InitialDirContext.createSubcontext(InitialDirContext.java:183)
    at 
org.apache.directory.server.unit.AbstractServerTest.importLdif(AbstractServerTest.java:388)
    ... 19 more




Have you some examples ? Or another guideline ?
Thanks a lot. Regards,

Amandine

Mime
View raw message