RM-991: Failed to applay patch AVMToADMRemoteStorePatch during upgrade from 3.4.13 to 4.2.0 with RM on Postgres

git-svn-id: https://svn.alfresco.com/repos/alfresco-enterprise/modules/recordsmanagement/HEAD@56093 c4b6b30b-aa2e-2d43-bbcb-ca4b014f7261
This commit is contained in:
Roy Wetherall
2013-09-27 13:22:51 +00:00
parent 7c03089524
commit 06625fb26f
3 changed files with 29 additions and 26 deletions

View File

@@ -91,6 +91,8 @@ public class NotificationTemplatePatch_v21 extends ModulePatchComponent
{
// get the parent node
NodeRef supersededTemplate = notificationHelper.getSupersededTemplate();
if (nodeService.exists(supersededTemplate) == true)
{
NodeRef parent = nodeService.getPrimaryParent(supersededTemplate).getParentRef();
// build the node properties
@@ -117,3 +119,4 @@ public class NotificationTemplatePatch_v21 extends ModulePatchComponent
}
}
}
}

View File

@@ -23,7 +23,6 @@ import java.util.HashMap;
import java.util.List;
import java.util.Map;
import org.alfresco.error.AlfrescoRuntimeException;
import org.alfresco.model.ContentModel;
import org.alfresco.repo.security.authentication.AuthenticationUtil;
import org.alfresco.repo.security.authentication.AuthenticationUtil.RunAsWork;
@@ -84,7 +83,8 @@ public class RMv21BehaviorScriptsPatch extends ModulePatchComponent implements B
// check that the rm config root has been correctly bootstrapped
if (nodeService.exists(RM_CONFIG) == false)
{
throw new AlfrescoRuntimeException("Unable to complete the patch because RM config root folder does not exist in the data dictionary.");
// we don't need to do anything
return;
}
// check that the behavior scripts folder exists

View File

@@ -75,7 +75,7 @@ public class RMv21ReportServicePatch extends ModulePatchComponent
protected void executePatch() throws Throwable
{
// check whether report dir exists or not
if (nodeService.exists(TEMPLATE_ROOT) == false)
if (nodeService.exists(RM_CONFIG_FOLDER) == true && nodeService.exists(TEMPLATE_ROOT) == false)
{
if (logger.isDebugEnabled() == true)
{