You are viewing a plain text version of this content. The canonical link for it is here.
Posted to dev@directory.apache.org by "Emmanuel Lecharny (JIRA)" <ji...@apache.org> on 2019/06/16 21:24:00 UTC
[jira] [Updated] (DIRSERVER-1643) loadAllEnable throws ERR_04131 on
tomcat 6
[ https://issues.apache.org/jira/browse/DIRSERVER-1643?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel ]
Emmanuel Lecharny updated DIRSERVER-1643:
-----------------------------------------
Component/s: (was: core)
schema
> 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: schema
> Affects Versions: 2.0.0-M2
> Environment: Tomcat 6 Servlet
> Reporter: Simon E. Silva Lauinger
> Priority: Major
> Fix For: 2.0.0-RC1
>
>
> 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 was sent by Atlassian JIRA
(v7.6.3#76005)
---------------------------------------------------------------------
To unsubscribe, e-mail: dev-unsubscribe@directory.apache.org
For additional commands, e-mail: dev-help@directory.apache.org