HI,
What I really need to do is to create a dc.
I have tried:
File pd = new File("C:\\doit");
pd.mkdirs();
JdbmPartition partition = null;
try {
JdbmPartitionFactory f = new JdbmPartitionFactory();
partition = f.createPartition("sevenseas",
"o=sevenseas", 500, pd);
//partition.initialize();
directoryService.addPartition(partition);
} catch (Exception e) {
e.printStackTrace();
}
directoryService.startup();
ldapServer.start();
try {
// create the context entry
Entry entry = new DefaultEntry(new DN("o=sevenseas"));
entry.put("objectClass", "top", "organizationalUnit",
"extensibleObject");
entry.put("o", "sevenseas");
// add the context entry
AddOperationContext adOpContext = new
AddOperationContext(directoryService.getAdminSession(), entry);
directoryService.getOperationManager().add(adOpContext);
//directoryService.getPartitionNexus().addContextPartition(partition);
} catch (Exception e) {
e.printStackTrace();
}
which gave me:
schema partition directory exists, skipping schema extraction
[15:54:06] WARN [org.apache.directory.server.core.DefaultDirectoryService] -
You didn't change the admin password of directory service instance 'null'.
Please update the admin password as soon as possible to prevent a possible
security breach.
[15:54:06] WARN [org.apache.directory.server.core.referral.ReferralInterceptor]
- could not find objectClass attribute in entry: Entry
dn[n]: o=sevenseas
objectClass: top
objectClass: organizationalUnit
objectClass: extensibleObject
o: sevenseas
[15:54:06] ERROR [org.apache.directory.server.core.schema.SchemaInterceptor] -
ERR_60 Entry o=sevenseas does not contain a STRUCTURAL ObjectClass
org.apache.directory.shared.ldap.exception.LdapSchemaViolationException: ERR_60
Entry o=sevenseas does not contain a STRUCTURAL ObjectClass
at
org.apache.directory.server.core.schema.SchemaInterceptor.assertObjectClasses(SchemaInterceptor.java:1688)
at
org.apache.directory.server.core.schema.SchemaInterceptor.check(SchemaInterceptor.java:1416)
at
org.apache.directory.server.core.schema.SchemaInterceptor.add(SchemaInterceptor.java:1507)
at
org.apache.directory.server.core.interceptor.InterceptorChain$Element$1.add(InterceptorChain.java:1020)
at
org.apache.directory.server.core.operational.OperationalAttributeInterceptor.add(OperationalAttributeInterceptor.java:236)
at
org.apache.directory.server.core.interceptor.InterceptorChain$Element$1.add(InterceptorChain.java:1020)
at
org.apache.directory.server.core.changelog.ChangeLogInterceptor.add(ChangeLogInterceptor.java:105)
at
org.apache.directory.server.core.interceptor.InterceptorChain$Element$1.add(InterceptorChain.java:1020)
at
org.apache.directory.server.core.exception.ExceptionInterceptor.add(ExceptionInterceptor.java:157)
at
org.apache.directory.server.core.interceptor.InterceptorChain$Element$1.add(InterceptorChain.java:1020)
at
org.apache.directory.server.core.admin.AdministrativePointInterceptor.add(AdministrativePointInterceptor.java:339)
at
org.apache.directory.server.core.interceptor.InterceptorChain$Element$1.add(InterceptorChain.java:1020)
at
org.apache.directory.server.core.interceptor.BaseInterceptor.add(BaseInterceptor.java:128)
at
org.apache.directory.server.core.interceptor.InterceptorChain$Element$1.add(InterceptorChain.java:1020)
at
org.apache.directory.server.core.authz.AciAuthorizationInterceptor.add(AciAuthorizationInterceptor.java:420)
at
org.apache.directory.server.core.interceptor.InterceptorChain$Element$1.add(InterceptorChain.java:1020)
at
org.apache.directory.server.core.referral.ReferralInterceptor.add(ReferralInterceptor.java:247)
at
org.apache.directory.server.core.interceptor.InterceptorChain$Element$1.add(InterceptorChain.java:1020)
at
org.apache.directory.server.core.authn.AuthenticationInterceptor.add(AuthenticationInterceptor.java:314)
at
org.apache.directory.server.core.interceptor.InterceptorChain$Element$1.add(InterceptorChain.java:1020)
at
org.apache.directory.server.core.normalization.NormalizationInterceptor.add(NormalizationInterceptor.java:118)
at
org.apache.directory.server.core.interceptor.InterceptorChain.add(InterceptorChain.java:650)
at
org.apache.directory.server.core.DefaultOperationManager.add(DefaultOperationManager.java:265)
at
org.example.StartStopListener2.contextInitialized(StartStopListener2.java:108)
at
org.apache.catalina.core.StandardContext.listenerStart(StandardContext.java:3795)
at
org.apache.catalina.core.StandardContext.start(StandardContext.java:4252)
at
org.apache.catalina.core.ContainerBase.addChildInternal(ContainerBase.java:760)
at org.apache.catalina.core.ContainerBase.addChild(ContainerBase.java:740)
at org.apache.catalina.core.StandardHost.addChild(StandardHost.java:544)
From: Benjamin, Roy [mailto:[email protected]]
Sent: Friday, August 06, 2010 2:32 PM
To: Apache Directory Developers List
Subject: Embedded sample question
Hi,
When I run ApacheDS embedded it has a root object: Root DSE(3)
Is this object a 'dc' ?
if so, when really is its name, dc=Root or dc=Root DSE, or dc=Root DSE(3)
Is it possible to change this and or create another dc using the API ?
Thanks
Roy