[
https://issues.apache.org/jira/browse/DIRSERVER-1643?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=13088639#comment-13088639
]
Simon E. Silva Lauinger commented on DIRSERVER-1643:
----------------------------------------------------
The method above is part of a class called EmbeddedADS. So it appears as part
of this stacktrace.
Here it is:
org.apache.directory.shared.ldap.model.exception.LdapInvalidAttributeValueException:
ERR_04131 The value is expected to be a String
at
org.apache.directory.shared.ldap.model.entry.DefaultAttribute.getString(DefaultAttribute.java:524)
at
org.apache.directory.shared.ldap.schemaloader.SchemaEntityFactory.setSchemaObjectProperties(SchemaEntityFactory.java:1081)
at
org.apache.directory.shared.ldap.schemaloader.SchemaEntityFactory.getAttributeType(SchemaEntityFactory.java:986)
at
org.apache.directory.shared.ldap.schemamanager.impl.DefaultSchemaManager.addAttributeTypes(DefaultSchemaManager.java:791)
at
org.apache.directory.shared.ldap.schemamanager.impl.DefaultSchemaManager.addSchemaObjects(DefaultSchemaManager.java:259)
at
org.apache.directory.shared.ldap.schemamanager.impl.DefaultSchemaManager.load(DefaultSchemaManager.java:744)
at
org.apache.directory.shared.ldap.schemamanager.impl.DefaultSchemaManager.loadDepsFirst(DefaultSchemaManager.java:1199)
at
org.apache.directory.shared.ldap.schemamanager.impl.DefaultSchemaManager.loadWithDeps(DefaultSchemaManager.java:1098)
at
org.apache.directory.shared.ldap.schemamanager.impl.DefaultSchemaManager.loadAllEnabled(DefaultSchemaManager.java:988)
at
de.atis.ldap.server.EmbeddedADS.initSchemaPartition(EmbeddedADS.java:96)
at
de.atis.ldap.server.EmbeddedADS.initDirectoryService(EmbeddedADS.java:128)
at de.atis.ldap.server.EmbeddedADS.<init>(EmbeddedADS.java:147)
at de.atis.ldap.server.EmbeddedADS.<init>(EmbeddedADS.java:151)
at sun.reflect.NativeConstructorAccessorImpl.newInstance0(Native Method)
at
sun.reflect.NativeConstructorAccessorImpl.newInstance(NativeConstructorAccessorImpl.java:39)
at
sun.reflect.DelegatingConstructorAccessorImpl.newInstance(DelegatingConstructorAccessorImpl.java:27)
at java.lang.reflect.Constructor.newInstance(Constructor.java:513)
at
org.springframework.beans.BeanUtils.instantiateClass(BeanUtils.java:126)
> loadAllEnable throws ERR_04131 on tomcat 6
> ------------------------------------------
>
> Key: DIRSERVER-1643
> URL: https://issues.apache.org/jira/browse/DIRSERVER-1643
> Project: Directory ApacheDS
> Issue Type: Bug
> Components: core
> Affects Versions: 2.0.0-M2
> Environment: Tomcat 6 Servlet
> Reporter: Simon E. Silva Lauinger
>
> After creating a schema ldif extractor and and schema manager the method
> "loadAllEnabled()" of the schema manager throws the following exception:
> org.apache.directory.shared.ldap.exception.LdapInvalidAttributeValueException:
> ERR_04131 The value is expected to be a String
> The exception only appears when using a servlet container like tomcat 6. The
> same code works fine on unit tests.
> Here the code:
> DefaultDirectoryService service = new DefaultDirectoryService();
> service.setInstanceLayout(new InstanceLayout(new
> File(System.getProperty("java.io.tmpdir"), "server-work")));
> File instanceDirectory = service.getInstanceLayout().getInstanceDirectory();
> File schemaRepository = new File(instanceDirectory, "schema");
> // Extract the schema on disk (a brand new one) and load the registries
> SchemaLdifExtractor extractor = new
> DefaultSchemaLdifExtractor(instanceDirectory);
> extractor.extractOrCopy(true);
> SchemaLoader loader = new LdifSchemaLoader(schemaRepository);
> DefaultSchemaManager schemaManager = new DefaultSchemaManager(loader);
> service.setSchemaManager(schemaManager);
> // We have to load the schema now, otherwise we won't be able
> // to initialize the Partitions, as we won't be able to parse
> // and normalize their suffix DN
> schemaManager.loadAllEnabled();
> // Init the LdifPartition
> LdifPartition ldifPartition = new LdifPartition(schemaManager);
> ldifPartition.setPartitionPath(schemaRepository.toURI());
> SchemaPartition schemaPartition = new SchemaPartition(schemaManager);
> schemaPartition.setWrappedPartition(ldifPartition);
> schemaPartition.setSchemaManager(schemaManager);
> service.setSchemaPartition(schemaPartition);
--
This message is automatically generated by JIRA.
For more information on JIRA, see: http://www.atlassian.com/software/jira