extractor.extractOrCopy(true);
schemaPartition.setWrappedPartition(ldifPartition);
final SchemaLoader loader = new LdifSchemaLoader(schemaRepository);
final SchemaManager schemaManager = new DefaultSchemaManager(loader);
service.setSchemaManager(schemaManager);
// Enable nis so that posixAccount and posixGroup are available
schemaManager.enable("nis");
// 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();
schemaPartition.setSchemaManager(schemaManager);
final List<Throwable> errors = schemaManager.getErrors();
if (!errors.isEmpty()) {
throw new RuntimeException("Schema load failed : " + errors);
}
}