diff --git a/source/java/org/alfresco/repo/deploy/DeploymentServiceImpl.java b/source/java/org/alfresco/repo/deploy/DeploymentServiceImpl.java index 60422d1f06..1599c2b73e 100644 --- a/source/java/org/alfresco/repo/deploy/DeploymentServiceImpl.java +++ b/source/java/org/alfresco/repo/deploy/DeploymentServiceImpl.java @@ -850,7 +850,7 @@ public class DeploymentServiceImpl implements DeploymentService } catch (Exception e) { - throw new AVMException("Could not connect to remote FSR, transportName:" + transportName + ", hostName:" + hostName + ", port: " + port, e); + throw new AVMException("Could not connect to remote deployment receiver, transportName:" + transportName + ", hostName:" + hostName + ", port: " + port, e); } } diff --git a/source/java/org/alfresco/repo/domain/PropertyValue.java b/source/java/org/alfresco/repo/domain/PropertyValue.java index 51b03c534a..682fb3e315 100644 --- a/source/java/org/alfresco/repo/domain/PropertyValue.java +++ b/source/java/org/alfresco/repo/domain/PropertyValue.java @@ -687,13 +687,23 @@ public class PropertyValue implements Cloneable, Serializable } else if (value instanceof Collection) { - Collection collection = (Collection) value; - ValueType collectionValueType = makeValueType(typeQName); - // convert the collection values - we need to do this to ensure that the - // values provided conform to the given type - ArrayList convertedCollection = collectionValueType.convert(collection); - // the persisted type is, nonetheless, a serializable - setPersistedValue(ValueType.SERIALIZABLE, convertedCollection); + if(typeQName != null) + { + Collection collection = (Collection) value; + ValueType collectionValueType = makeValueType(typeQName); + // convert the collection values - we need to do this to ensure that the + // values provided conform to the given type + + ArrayList convertedCollection = collectionValueType.convert(collection); + // the persisted type is, nonetheless, a serializable + setPersistedValue(ValueType.SERIALIZABLE, convertedCollection); + } + else + { + setPersistedValue(ValueType.SERIALIZABLE, value); + } + + setMultiValued(true); } else diff --git a/source/java/org/alfresco/repo/template/CropContentMethod.java b/source/java/org/alfresco/repo/template/CropContentMethod.java index 663b696537..a7a641b937 100644 --- a/source/java/org/alfresco/repo/template/CropContentMethod.java +++ b/source/java/org/alfresco/repo/template/CropContentMethod.java @@ -28,6 +28,9 @@ import java.util.List; import org.alfresco.repo.processor.BaseProcessorExtension; import org.alfresco.repo.template.BaseContentNode.TemplateContentData; +import org.alfresco.service.cmr.repository.ContentIOException; +import org.apache.commons.logging.Log; +import org.apache.commons.logging.LogFactory; import freemarker.ext.beans.BeanModel; import freemarker.template.TemplateMethodModelEx; @@ -43,6 +46,7 @@ import freemarker.template.TemplateNumberModel; */ public final class CropContentMethod extends BaseProcessorExtension implements TemplateMethodModelEx { + private static final Log logger = LogFactory.getLog(CropContentMethod.class); /** * @see freemarker.template.TemplateMethodModel#exec(java.util.List) */ @@ -60,9 +64,23 @@ public final class CropContentMethod extends BaseProcessorExtension implements T Object wrapped = ((BeanModel)arg0).getWrappedObject(); if (wrapped instanceof TemplateContentData) { - int bytes = ((TemplateNumberModel)arg1).getAsNumber().intValue(); - - result = ((TemplateContentData)wrapped).getContentAsText(bytes); + int bytes = ((TemplateNumberModel)arg1).getAsNumber().intValue(); + + try + { + result = ((TemplateContentData)wrapped).getContentAsText(bytes); + } + catch (ContentIOException e) + { + logger.warn("unable to getContentAsText", e); + /* + * Unable to extract content - return empty text instead. + * Probably here through a transformation failure. + * This method is called from FreeMarker so throwing the + * exception causes problems. + */ + result = ""; + } } } } diff --git a/source/java/org/alfresco/repo/workflow/WorkflowPackageImpl.java b/source/java/org/alfresco/repo/workflow/WorkflowPackageImpl.java index b999e46929..109b62ef8e 100644 --- a/source/java/org/alfresco/repo/workflow/WorkflowPackageImpl.java +++ b/source/java/org/alfresco/repo/workflow/WorkflowPackageImpl.java @@ -187,7 +187,8 @@ public class WorkflowPackageImpl implements WorkflowPackageComponent for (ChildAssociationRef packageItemParent : packageItemParents) { NodeRef parentRef = packageItemParent.getParentRef(); - if (nodeService.hasAspect(parentRef, WorkflowModel.ASPECT_WORKFLOW_PACKAGE)) + if (nodeService.hasAspect(parentRef, WorkflowModel.ASPECT_WORKFLOW_PACKAGE) + && !nodeService.hasAspect(parentRef, ContentModel.ASPECT_ARCHIVED)) { String workflowInstance = (String)nodeService.getProperty(parentRef, WorkflowModel.PROP_WORKFLOW_INSTANCE_ID); if (workflowInstance != null && workflowInstance.length() > 0)