throw new Exception( "Schema load failed : " + ExceptionUtils.printErrors( errors ) );
}
LdifConfigExtractor.extract( workDir, true );
LdifPartition configPartition = new LdifPartition();
configPartition.setId( "config" );
configPartition.setSuffix( "ou=config" );
configPartition.setSchemaManager( schemaManager );
configPartition.setWorkingDirectory( workingDirectory + "/config" );
configPartition.setPartitionDir( new File( configPartition.getWorkingDirectory() ) );
configPartition.initialize();
ConfigPartitionReader cpReader = new ConfigPartitionReader( configPartition );
dirService = cpReader.getDirectoryService();
SchemaPartition schemaPartition = dirService.getSchemaService().getSchemaPartition();
// Init the schema partition's wrapped LdifPartition
LdifPartition wrappedPartition = new LdifPartition();
wrappedPartition.setWorkingDirectory( new File( workDir, schemaPartition.getId() ).getAbsolutePath() );
schemaPartition.setWrappedPartition( wrappedPartition );
schemaPartition.setSchemaManager( schemaManager );
dirService.setWorkingDirectory( workDir );
dirService.setSchemaManager( schemaManager );