|
Home > Archive > Apache Directory Project > November 2007 > [ApacheDS] [Partition] Adding your own partition resp. suffix
You are viewing an archived Text-only version of the thread.
To view this thread in it's original format and/or if you want to reply to
this thread please [click here]
| Author |
[ApacheDS] [Partition] Adding your own partition resp. suffix
|
|
| Spark Shen 2007-11-21, 1:11 am |
| I could not add a new partition when using 1.5.1 (downloaded from *
http://apache.stu.edu.tw/directory/...able/1.5/1.5.1*).
I followed steps in:
http://directory.apache.org/apached...iningapartition
and added a partition definition:
<bean id="sevenSeasPartitionConfiguration" class="
org.apache.directory.server.core.partition.impl.btree.MutableBTreePartitionConfiguration
">
<property name="id" value="The seven seas" />
<property name="cacheSize" value="100" />
<property name="suffix" value="o=sevenSeas" />
<property name="partitionClassName"
value="
org.apache.directory.server.core.partition.impl.btree.jdbm.JdbmPartition" />
<!-- the optimizer is enabled by default but may not always be what
-->
<!-- you want if your queries are really simple
-->
<property name="optimizerEnabled" value="true" />
<!--
Synchronization on writes does not wait for synch operations
to flush dirty pages. Writes persist immediately to disk at
a cost to performance with increased data integrity. Otherwise
the periodic synch operation will flush dirty pages using the
synchPeriodMillis parameter in the main configuration.
-->
<property name="synchOnWrite" value="true" />
<property name="indexedAttributes">
<set>
<bean class="
org.apache.directory.server.core.partition.impl.btree.MutableIndexConfiguration
">
<property name="attributeId" value="1.3.6.1.4.1.18060.0.4.1.2.1"
/>
<property name="cacheSize" value="100" />
</bean>
<bean class="
org.apache.directory.server.core.partition.impl.btree.MutableIndexConfiguration
">
<property name="attributeId" value="1.3.6.1.4.1.18060.0.4.1.2.2"
/>
<property name="cacheSize" value="100" />
</bean>
<bean class="
org.apache.directory.server.core.partition.impl.btree.MutableIndexConfiguration
">
<property name="attributeId" value="1.3.6.1.4.1.18060.0.4.1.2.3"
/>
<property name="cacheSize" value="100" />
</bean>
<bean class="
org.apache.directory.server.core.partition.impl.btree.MutableIndexConfiguration
">
<property name="attributeId" value="1.3.6.1.4.1.18060.0.4.1.2.4"
/>
<property name="cacheSize" value="100" />
</bean>
<bean class="
org.apache.directory.server.core.partition.impl.btree.MutableIndexConfiguration
">
<property name="attributeId" value="1.3.6.1.4.1.18060.0.4.1.2.5"
/>
<property name="cacheSize" value="10" />
</bean>
<bean class="
org.apache.directory.server.core.partition.impl.btree.MutableIndexConfiguration
">
<property name="attributeId" value="1.3.6.1.4.1.18060.0.4.1.2.6"
/>
<property name="cacheSize" value="10" />
</bean>
<bean class="
org.apache.directory.server.core.partition.impl.btree.MutableIndexConfiguration
">
<property name="attributeId" value="1.3.6.1.4.1.18060.0.4.1.2.7"
/>
<property name="cacheSize" value="10" />
</bean>
<bean class="
org.apache.directory.server.core.partition.impl.btree.MutableIndexConfiguration
">
<property name="attributeId" value="dc" />
<property name="cacheSize" value="100" />
</bean>
<bean class="
org.apache.directory.server.core.partition.impl.btree.MutableIndexConfiguration
">
<property name="attributeId" value="ou" />
<property name="cacheSize" value="100" />
</bean>
<bean class="
org.apache.directory.server.core.partition.impl.btree.MutableIndexConfiguration
">
<property name="attributeId" value="krb5PrincipalName" />
<property name="cacheSize" value="100" />
</bean>
<bean class="
org.apache.directory.server.core.partition.impl.btree.MutableIndexConfiguration
">
<property name="attributeId" value="uid" />
<property name="cacheSize" value="100" />
</bean>
<bean class="
org.apache.directory.server.core.partition.impl.btree.MutableIndexConfiguration
">
<property name="attributeId" value="objectClass" />
<property name="cacheSize" value="100" />
</bean>
</set>
</property>
<property name="contextEntry">
<value>
objectClass: top
objectClass: domain
objectClass: extensibleObject
dc: example
</value>
</property>
</bean>
When I restart the ldap server, I see no partition named o=sevenSeas in
studio, and while importing
apache_ds_tutorial.ldif, I got:
#!ERROR [LDAP: error code 32 - failed to add entry ou=people,o=sevenSeas:
ou=people,o=sevenSeas]
What could be the problem? Did I mis-configured something?
BTW, how could ldap server be started/stopped from command line? I always
do a install/uninstall instead,
which is a little laborious.
When I type in "apacheds.exe ..\conf\apacheds.conf" I got the following
error msg:
wrapper | --> Wrapper Started as Console
Unable to get the current logfile size with stat: 文件名、目录名或卷标语法不正确
。 (0x7b)
wrapper | Launching a JVM...
jvm 1 | java.lang.ExceptionInInitializerError
Unable to get the current logfile size with stat: 文件名、目录名或卷标语法不正确
。 (0x7b)
jvm 1 | at org.slf4j.impl.Log4jLoggerFactory.getLogger
(Log4jLoggerFactor
y.java:73)
jvm 1 | at org.slf4j.LoggerFactory.getLogger(LoggerFactory.java:103)
jvm 1 | at org.apache.directory.daemon.Bootstrapper
.<clinit>(Bootstrappe
r.java:57)
jvm 1 | Caused by: java.lang.IllegalArgumentException
jvm 1 | at sun.net.www.ParseUtil.decode(ParseUtil.java:183)
jvm 1 | at sun.net.www.protocol.file.Handler.openConnection(
Handler.java
:65)
jvm 1 | at sun.net.www.protocol.file.Handler.openConnection(
Handler.java
:55)
jvm 1 | at java.net.URL.openConnection(URL.java:943)
jvm 1 | at java.net.URL.openStream(URL.java:1007)
jvm 1 | at org.apache.log4j.PropertyConfigurator.doConfigure
(PropertyCon
figurator.java:433)
jvm 1 | at
org.apache.log4j.helpers.OptionConverter.selectAndConfigure(O
ptionConverter.java:470)
jvm 1 | at org.apache.log4j.LogManager.<clinit>(LogManager.java:122)
jvm 1 | ... 3 more
jvm 1 | Exception in thread "main"
wrapper | JVM exited while loading the application.
wrapper | There were 1 failed launches in a row, each lasting less than 300
sec
onds. Giving up.
wrapper | There may be a configuration problem: please check the logs.
wrapper | <-- Wrapper Stopped
C:\Program Files\Apache Directory Server\bin>apacheds.exe..\instances\default\c
onf\apacheds.conf
wrapper | --> Wrapper Started as Console
wrapper | Launching a JVM...
jvm 1 | 找不到 Java 类: Main
wrapper | JVM exited while loading the application.
wrapper | CTRL-C trapped. Shutting down.
wrapper | <-- Wrapper Stopped
Thanks in advance.
--
Spark Shen
China Software Development Lab, IBM
| |
| Ersin Er 2007-11-21, 1:11 am |
| Hi,
Have you also added the configuration to the configuration list as follows?
<property name="contextPartitionConfigurations">
<set>
<ref bean="examplePartitionConfiguration"/>
<ref bean="sevenSeasPartitionConfiguration"/>
</set>
</property>
On Nov 21, 2007 8:38 AM, Spark Shen <smallsmallorgan@gmail.com> wrote:
> I could not add a new partition when using 1.5.1 (downloaded from *
> http://apache.stu.edu.tw/directory/...table/1.5/1.5.1 *).
>
> I followed steps in: http://directory.apache.org/apached...iningapartition
>
> and added a partition definition:
>
> <bean id="sevenSeasPartitionConfiguration" class="
> org.apache.directory.server.core.partition.impl.btree.MutableBTreePartitionConfiguration
> ">
> <property name="id" value="The seven seas" />
> <property name="cacheSize" value="100" />
> <property name="suffix" value="o=sevenSeas" />
> <property name="partitionClassName"
> value="
> org.apache.directory.server.core.partition.impl.btree.jdbm.JdbmPartition"
> />
>
> <!-- the optimizer is enabled by default but may not always be
> what -->
> <!-- you want if your queries are really
> simple -->
> <property name="optimizerEnabled" value="true" />
>
> <!--
> Synchronization on writes does not wait for synch operations
> to flush dirty pages. Writes persist immediately to disk at
> a cost to performance with increased data integrity. Otherwise
> the periodic synch operation will flush dirty pages using the
> synchPeriodMillis parameter in the main configuration.
> -->
> <property name="synchOnWrite" value="true" />
> <property name="indexedAttributes">
> <set>
> <bean class="
> org.apache.directory.server.core.partition.impl.btree.MutableIndexConfiguration">
> <property name="attributeId" value="1.3.6.1.4.1.18060.0.4.1.2.1"
> />
> <property name="cacheSize" value="100" />
> </bean>
> <bean class="
> org.apache.directory.server.core.partition.impl.btree.MutableIndexConfiguration
> ">
> <property name="attributeId" value="1.3.6.1.4.1.18060.0.4.1.2.2"
> />
> <property name="cacheSize" value="100" />
> </bean>
> <bean class="
> org.apache.directory.server.core.partition.impl.btree.MutableIndexConfiguration">
>
> <property name="attributeId" value="1.3.6.1.4.1.18060.0.4.1.2.3"
> />
> <property name="cacheSize" value="100" />
> </bean>
> <bean class="
> org.apache.directory.server.core.partition.impl.btree.MutableIndexConfiguration
> ">
> <property name="attributeId" value="1.3.6.1.4.1.18060.0.4.1.2.4"
> />
> <property name="cacheSize" value="100" />
> </bean>
> <bean class="
> org.apache.directory.server.core.partition.impl.btree.MutableIndexConfiguration
> ">
> <property name="attributeId" value="1.3.6.1.4.1.18060.0.4.1.2.5" />
> <property name="cacheSize" value="10" />
> </bean>
> <bean class="
> org.apache.directory.server.core.partition.impl.btree.MutableIndexConfiguration">
> <property name="attributeId" value="1.3.6.1.4.1.18060.0.4.1.2.6"
> />
> <property name="cacheSize" value="10" />
> </bean>
> <bean class="
> org.apache.directory.server.core.partition.impl.btree.MutableIndexConfiguration
> ">
> <property name="attributeId" value="1.3.6.1.4.1.18060.0.4.1.2.7"
> />
> <property name="cacheSize" value="10" />
> </bean>
>
> <bean class="
> org.apache.directory.server.core.partition.impl.btree.MutableIndexConfiguration">
> <property name="attributeId" value="dc" />
> <property name="cacheSize" value="100" />
> </bean>
> <bean class="
> org.apache.directory.server.core.partition.impl.btree.MutableIndexConfiguration
> ">
> <property name="attributeId" value="ou" />
> <property name="cacheSize" value="100" />
> </bean>
> <bean class="
> org.apache.directory.server.core.partition.impl.btree.MutableIndexConfiguration
> ">
> <property name="attributeId" value="krb5PrincipalName" />
> <property name="cacheSize" value="100" />
> </bean>
> <bean class="
> org.apache.directory.server.core.partition.impl.btree.MutableIndexConfiguration">
>
> <property name="attributeId" value="uid" />
> <property name="cacheSize" value="100" />
> </bean>
> <bean class="
> org.apache.directory.server.core.partition.impl.btree.MutableIndexConfiguration
> ">
> <property name="attributeId" value="objectClass" />
> <property name="cacheSize" value="100" />
> </bean>
> </set>
> </property>
> <property name="contextEntry">
> <value>
> objectClass: top
> objectClass: domain
> objectClass: extensibleObject
> dc: example
> </value>
> </property>
> </bean>
>
> When I restart the ldap server, I see no partition named o=sevenSeas in
> studio, and while importing
> apache_ds_tutorial.ldif, I got:
> #!ERROR [LDAP: error code 32 - failed to add entry ou=people,o=sevenSeas:
> ou=people,o=sevenSeas]
>
> What could be the problem? Did I mis-configured something?
>
> BTW, how could ldap server be started/stopped from command line? I always
> do a install/uninstall instead,
> which is a little laborious.
>
> When I type in "apacheds.exe ..\conf\apacheds.conf" I got the following
> error msg:
> wrapper | --> Wrapper Started as Console
> Unable to get the current logfile size with stat: 鏂囦欢鍚嶃佺洰褰曞悕鎴栧嵎鎋囪痏娉曚笉
_g‘
> 銆 (0x7b)
> wrapper | Launching a JVM...
> jvm 1 | java.lang.ExceptionInInitializerError
> Unable to get the current logfile size with stat: 鏂囦欢鍚嶃佺洰褰曞悕鎴栧嵎鎋囪痏娉曚笉
_g‘
> 銆 (0x7b)
> jvm 1 | at org.slf4j.impl.Log4jLoggerFactory.getLogger(Log4jLoggerFactor
> y.java:73)
> jvm 1 | at org.slf4j.LoggerFactory.getLogger(LoggerFactory.java
> :103)
> jvm 1 | at org.apache.directory.daemon.Bootstrapper
> .<clinit>(Bootstrappe
> r.java:57)
> jvm 1 | Caused by: java.lang.IllegalArgumentException
> jvm 1 | at sun.net.www.ParseUtil.decode(ParseUtil.java:183)
> jvm 1 | at sun.net.www.protocol.file.Handler.openConnection(
> Handler.java
> :65)
> jvm 1 | at sun.net.www.protocol.file.Handler.openConnection (
> Handler.java
> :55)
> jvm 1 | at java.net.URL.openConnection(URL.java:943)
> jvm 1 | at java.net.URL.openStream(URL.java:1007)
> jvm 1 | at org.apache.log4j.PropertyConfigurator.doConfigure(PropertyCon
>
> figurator.java:433)
> jvm 1 | at
> org.apache.log4j.helpers.OptionConverter.selectAndConfigure(O
> ptionConverter.java:470)
> jvm 1 | at org.apache.log4j.LogManager.<clinit>(LogManager.java:122)
>
> jvm 1 | ... 3 more
> jvm 1 | Exception in thread "main"
> wrapper | JVM exited while loading the application.
> wrapper | There were 1 failed launches in a row, each lasting less than
> 300 sec
> onds. Giving up.
> wrapper | There may be a configuration problem: please check the logs.
> wrapper | <-- Wrapper Stopped
>
> C:\Program Files\Apache Directory Server\bin>apacheds.exe..\instances\default\c
> onf\apacheds.conf
> wrapper | --> Wrapper Started as Console
> wrapper | Launching a JVM...
> jvm 1 | 鎵句笉鍒 Java 绫伙細 Main
> wrapper | JVM exited while loading the application.
> wrapper | CTRL-C trapped. Shutting down.
> wrapper | <-- Wrapper Stopped
>
> Thanks in advance.
> --
> Spark Shen
> China Software Development Lab, IBM
--
Ersin Er
http://www.ersin-er.name
| |
| Stefan Zoerner 2007-11-21, 7:11 am |
| Spark Shen wrote:
>
> I followed steps in:
> http://directory.apache.org/apached...iningapartition
> <http://directory.apache.org/apached...iningapartition>
> and added a partition definition:
>
> <bean id="sevenSeasPartitionConfiguration"
> class="org.apache.directory.server.core.partition.impl.btree.MutableBTreePartitionConfiguration">
> <property name="id" value="The seven seas" />
> <property name="cacheSize" value="100" />
> <property name="suffix" value="o=sevenSeas" />
> <property name="partitionClassName"
>
> value="org.apache.directory.server.core.partition.impl.btree.jdbm.JdbmPartition"
> />
>
> <property name="contextEntry">
> <value>
> objectClass: top
> objectClass: domain
> objectClass: extensibleObject
> dc: example
> </value>
> </property>
> </bean>
Check Ersin's hint, and besides that: the value of the contextEntry
property does not fit with your partition. Try something like this
<property name="contextEntry">
<value>
objectClass: top
objectClass: organization
objectClass: extensibleObject
o: sevenSeas
</value>
</property>
Greetings from Hamburg,
Stefan
| |
| Spark Shen 2007-11-21, 7:11 am |
| Thanks, seems my carelessness caused the problem.
2007/11/21, Stefan Zoerner <stefan-EQq9qWhC7IA@public.gmane.org>:
>
> Spark Shen wrote:
> http://directory.apache.org/apached...iningapartition
> http://directory.apache.org/apached...iningapartition
> org.apache.directory.server.core.partition.impl.btree.MutableBTreePartitionConfiguration
> ">
> org.apache.directory.server.core.partition.impl.btree.jdbm.JdbmPartition"
>
> Check Ersin's hint, and besides that: the value of the contextEntry
> property does not fit with your partition. Try something like this
>
> <property name="contextEntry">
> <value>
> objectClass: top
> objectClass: organization
> objectClass: extensibleObject
> o: sevenSeas
> </value>
> </property>
>
> Greetings from Hamburg,
> Stefan
>
>
--
Spark Shen
China Software Development Lab, IBM
|
|
|
|
|