ClassNotFoundException
{
List<WorkspaceEntry> originalWorkspaceEntrys = repositoryEntry.getWorkspaceEntries();
//Getting system workspace entry
WorkspaceEntry systemWorkspaceEntry = null;
for (WorkspaceEntry wsEntry : originalWorkspaceEntrys)
{
if (wsEntry.getName().equals(repositoryEntry.getSystemWorkspaceName()))
{
systemWorkspaceEntry = wsEntry;
break;
}
}
WorkspaceInitializerEntry wieOriginal = systemWorkspaceEntry.getInitializer();
//getting backup chail log to system workspace.
BackupChainLog systemBackupChainLog = workspacesMapping.get(systemWorkspaceEntry.getName());
WorkspaceInitializerEntry wiEntry = getWorkspaceInitializerEntry(systemBackupChainLog);
// set initializer
systemWorkspaceEntry.setInitializer(wiEntry);
ArrayList<WorkspaceEntry> newEntries = new ArrayList<WorkspaceEntry>();
newEntries.add(systemWorkspaceEntry);
repositoryEntry.setWorkspaceEntries(newEntries);
String currennWorkspaceName = repositoryEntry.getSystemWorkspaceName();
boolean restored = true;
try
{
repositoryService.createRepository(repositoryEntry);
//set original initializer to created workspace.
RepositoryImpl defRep = (RepositoryImpl)repositoryService.getRepository(repositoryEntry.getName());
WorkspaceContainerFacade wcf = defRep.getWorkspaceContainer(systemWorkspaceEntry.getName());
WorkspaceEntry createdWorkspaceEntry = (WorkspaceEntry)wcf.getComponent(WorkspaceEntry.class);
createdWorkspaceEntry.setInitializer(wieOriginal);
// save configuration to persistence (file or persister)
repositoryService.getConfig().retain();
for (WorkspaceEntry wsEntry : originalWorkspaceEntrys)