Hi,

I imported 2 ldif files (schema, data) into apacheDS 1.5.3 and everything work as per excepted, however when i shutdown server and launch it the second time i get a javax.naming.NamingException. When I repeat this using apacheDS 1.5.1 everything is well.

Here's my env settings
    Java version 1.6.0_06
   OS: Ubuntu 8.04.1

I have attached my server.xml

Did I missed anything? Any help will be appreciated.


Here's the error exception stack trace

Exception in thread "main" javax.naming.NamingException [Root exception is java.io.UTFDataFormatException] at org.apache.directory.server.core.partition.impl.btree.jdbm.JdbmTable.getRaw(JdbmTable.java:1371) at org.apache.directory.server.core.partition.impl.btree.jdbm.JdbmTable.get(JdbmTable.java:314) at org.apache.directory.server.core.partition.impl.btree.jdbm.JdbmMasterTable.get(JdbmMasterTable.java:139) at org.apache.directory.server.core.partition.impl.btree.jdbm.JdbmStore.lookup(JdbmStore.java:1115) at org.apache.directory.server.core.partition.impl.btree.jdbm.JdbmStore.getSuffixEntry(JdbmStore.java:1202) at org.apache.directory.server.core.partition.impl.btree.jdbm.JdbmStore.initSuffixEntry3(JdbmStore.java:445) at org.apache.directory.server.core.partition.impl.btree.jdbm.JdbmStore.init(JdbmStore.java:335) at org.apache.directory.server.core.partition.impl.btree.jdbm.JdbmPartition.init(JdbmPartition.java:243) at org.apache.directory.server.core.partition.DefaultPartitionNexus.addContextPartition(DefaultPartitionNexus.java:647) at org.apache.directory.server.core.partition.DefaultPartitionNexus.init(DefaultPartitionNexus.java:318) at org.apache.directory.server.core.DefaultDirectoryService.initialize(DefaultDirectoryService.java:1402) at org.apache.directory.server.core.DefaultDirectoryService.startup(DefaultDirectoryService.java:775) at org.apache.directory.server.configuration.ApacheDS.startup(ApacheDS.java:130)
   at org.apache.directory.server.Service.init(Service.java:86)
   at org.apache.directory.server.UberjarMain.main(UberjarMain.java:56)
Caused by: java.io.UTFDataFormatException
at java.io.ObjectInputStream$BlockDataInputStream.readUTFSpan(ObjectInputStream.java:3074) at java.io.ObjectInputStream$BlockDataInputStream.readUTFBody(ObjectInputStream.java:3007) at java.io.ObjectInputStream$BlockDataInputStream.readUTF(ObjectInputStream.java:2820)
   at java.io.ObjectInputStream.readUTF(ObjectInputStream.java:1051)
at org.apache.directory.server.core.entry.ServerEntrySerializer.deserialize(ServerEntrySerializer.java:347)
   at jdbm.btree.BPage.deserialize(BPage.java:1000)
   at jdbm.recman.BaseRecordManager.fetch(BaseRecordManager.java:341)
   at jdbm.recman.CacheRecordManager.fetch(CacheRecordManager.java:263)
   at jdbm.btree.BPage.loadBPage(BPage.java:826)
   at jdbm.btree.BPage.childBPage(BPage.java:816)
   at jdbm.btree.BPage.find(BPage.java:285)
   at jdbm.btree.BTree.find(BTree.java:407)
at org.apache.directory.server.core.partition.impl.btree.jdbm.JdbmTable.getRaw(JdbmTable.java:1362)
   ... 14 more


Regards
chung-onn

<?xml version="1.0" encoding="UTF-8"?>
<spring:beans xmlns:spring="http://xbean.apache.org/schemas/spring/1.0"; xmlns:s="http://www.springframework.org/schema/beans"; xmlns="http://apacheds.org/config/1.0";>
   <defaultDirectoryService id="directoryService" instanceId="default" workingDirectory="technetium.com" allowAnonymousAccess="true" accessControlEnabled="false" denormalizeOpAttrsEnabled="true">
      <systemPartition>
         <jdbmPartition id="system" cacheSize="100" suffix="ou=system" optimizerEnabled="true" syncOnWrite="true">
            <indexedAttributes>
               <jdbmIndex attributeId="1.3.6.1.4.1.18060.0.4.1.2.1" cacheSize="100"/>
               <jdbmIndex attributeId="1.3.6.1.4.1.18060.0.4.1.2.2" cacheSize="100"/>
               <jdbmIndex attributeId="1.3.6.1.4.1.18060.0.4.1.2.3" cacheSize="100"/>
               <jdbmIndex attributeId="1.3.6.1.4.1.18060.0.4.1.2.4" cacheSize="100"/>
               <jdbmIndex attributeId="1.3.6.1.4.1.18060.0.4.1.2.5" cacheSize="10"/>
               <jdbmIndex attributeId="1.3.6.1.4.1.18060.0.4.1.2.6" cacheSize="10"/>
               <jdbmIndex attributeId="1.3.6.1.4.1.18060.0.4.1.2.7" cacheSize="10"/>
               <jdbmIndex attributeId="ou" cacheSize="100"/>
               <jdbmIndex attributeId="uid" cacheSize="100"/>
               <jdbmIndex attributeId="objectClass" cacheSize="100"/>
            </indexedAttributes>
            <contextEntry>#systemContextEntry</contextEntry>
         </jdbmPartition>
      </systemPartition>
      <partitions>
         <jdbmPartition id="technetium" cacheSize="100" suffix="dc=technetium,dc=com" optimizerEnabled="true" syncOnWrite="true">
            <indexedAttributes>
               <jdbmIndex attributeId="1.3.6.1.4.1.18060.0.4.1.2.1" cacheSize="100"/>
               <jdbmIndex attributeId="1.3.6.1.4.1.18060.0.4.1.2.2" cacheSize="100"/>
               <jdbmIndex attributeId="1.3.6.1.4.1.18060.0.4.1.2.3" cacheSize="100"/>
               <jdbmIndex attributeId="1.3.6.1.4.1.18060.0.4.1.2.4" cacheSize="100"/>
               <jdbmIndex attributeId="1.3.6.1.4.1.18060.0.4.1.2.5" cacheSize="10"/>
               <jdbmIndex attributeId="1.3.6.1.4.1.18060.0.4.1.2.6" cacheSize="10"/>
               <jdbmIndex attributeId="1.3.6.1.4.1.18060.0.4.1.2.7" cacheSize="10"/>
               <jdbmIndex attributeId="dc" cacheSize="100"/>
               <jdbmIndex attributeId="ou" cacheSize="100"/>
               <jdbmIndex attributeId="krb5PrincipalName" cacheSize="100"/>
               <jdbmIndex attributeId="uid" cacheSize="100"/>
               <jdbmIndex attributeId="objectClass" cacheSize="100"/>
            </indexedAttributes>
            <contextEntry>#technetiumContextEntry</contextEntry>
         </jdbmPartition>
      </partitions>
      <interceptors>
         <normalizationInterceptor/>
         <authenticationInterceptor/>
         <referralInterceptor/>
         <aciAuthorizationInterceptor/>
         <defaultAuthorizationInterceptor/>
         <exceptionInterceptor/>
         <operationalAttributeInterceptor/>
         <schemaInterceptor/>
         <subentryInterceptor/>
         <collectiveAttributeInterceptor/>
         <eventInterceptor/>
         <triggerInterceptor/>
      </interceptors>
   </defaultDirectoryService>
   <spring:bean id="systemContextEntry" class="org.springframework.beans.factory.config.MethodInvokingFactoryBean">
      <spring:property name="targetObject">
         <spring:ref local="directoryService"/>
      </spring:property>
      <spring:property name="targetMethod">
         <spring:value>newEntry</spring:value>
      </spring:property>
      <spring:property name="arguments">
         <spring:list>
            <spring:value xmlns:spring="http://www.springframework.org/schema/beans";>ou: system
objectclass: top
objectclass: organizationalUnit
objectclass: extensibleObject
</spring:value>
            <spring:value>ou=system</spring:value>
         </spring:list>
      </spring:property>
   </spring:bean>
   <spring:bean id="technetiumContextEntry" class="org.springframework.beans.factory.config.MethodInvokingFactoryBean">
      <spring:property name="targetObject">
         <spring:ref local="directoryService"/>
      </spring:property>
      <spring:property name="targetMethod">
         <spring:value>newEntry</spring:value>
      </spring:property>
      <spring:property name="arguments">
         <spring:list>
            <spring:value xmlns:spring="http://www.springframework.org/schema/beans";>
objectclass: top
objectclass: domain
objectclass: extensibleObject
dc: technetium
</spring:value>
            <spring:value>dc=technetium,dc=com</spring:value>
         </spring:list>
      </spring:property>
   </spring:bean>
   <standardThreadPool id="standardThreadPool" maxThreads="8"/>
   <datagramAcceptor id="datagramAcceptor" logicExecutor="#standardThreadPool"/>
   <socketAcceptor id="socketAcceptor" logicExecutor="#standardThreadPool"/>
   <ldapServer id="ldapsServer" ipPort="10636" enabled="true" enableLdaps="true">
      <directoryService>#directoryService</directoryService>
      <socketAcceptor>#socketAcceptor</socketAcceptor>
   </ldapServer>
   <ldapServer id="ldapServer" enabled="true" ipPort="10389" allowAnonymousAccess="false" saslHost="ldap.example.com" saslPrincipal="ldap/[EMAIL PROTECTED]" searchBaseDn="ou=users,ou=system" maxTimeLimit="15000" maxSizeLimit="1000">
      <directoryService>#directoryService</directoryService>
      <socketAcceptor>#socketAcceptor</socketAcceptor>
      <saslMechanismHandlers>
         <simpleMechanismHandler mech-name="SIMPLE"/>
         <cramMd5MechanismHandler mech-name="CRAM-MD5" directoryService="#directoryService"/>
         <digestMd5MechanismHandler mech-name="DIGEST-MD5" directoryService="#directoryService"/>
         <gssapiMechanismHandler mech-name="GSSAPI" directoryService="#directoryService"/>
         <ntlmMechanismHandler mech-name="NTLM" ntlmProviderFqcn="com.foo.Bar"/>
         <ntlmMechanismHandler mech-name="GSS-SPNEGO" ntlmProviderFqcn="com.foo.Bar"/>
      </saslMechanismHandlers>
      <saslQop>
         <s:value>auth</s:value>
         <s:value>auth-int</s:value>
         <s:value>auth-conf</s:value>
      </saslQop>
      <saslRealms>
         <s:value>example.com</s:value>
         <s:value>apache.org</s:value>
      </saslRealms>
      <extendedOperationHandlers>
         <startTlsHandler/>
         <gracefulShutdownHandler/>
         <launchDiagnosticUiHandler/>
      </extendedOperationHandlers>
   </ldapServer>
   <apacheDS id="apacheDS" synchPeriodMillis="15000" allowAnonymousAccess="false">
      <directoryService>#directoryService</directoryService>
      <ldapServer>#ldapServer</ldapServer>
      <ldapsServer>#ldapsServer</ldapsServer>
   </apacheDS>
   <spring:bean class="org.springframework.beans.factory.config.CustomEditorConfigurer">
      <spring:property name="customEditors">
         <spring:map>
            <spring:entry key="javax.naming.directory.Attributes">
               <spring:bean class="org.apache.directory.server.core.configuration.AttributesPropertyEditor"/>
            </spring:entry>
         </spring:map>
      </spring:property>
   </spring:bean>
</spring:beans>

Reply via email to