AnsweredAssumed Answered

Deployment Bug with multivalues

Question asked by rfischer on Oct 9, 2009
Latest reply on Oct 9, 2009 by mikeh
Hello,

I have been dealing with issues when trying to do a deployment in Community 3.2.  I unable to do the deploy because of a property value error-

org.alfresco.error.AlfrescoRuntimeException: 09090006 Property type not recognised:
   type: null
        at org.alfresco.repo.domain.PropertyValue.makeValueType(PropertyValue.java:729)
        at org.alfresco.repo.domain.PropertyValue.<init>(PropertyValue.java:691)
        at org.alfresco.deployment.impl.asr.AVMDeploymentTarget$3.execute(AVMDeploymentTarget.java:664)
        at org.alfresco.deployment.impl.asr.AVMDeploymentTarget$3.execute(AVMDeploymentTarget.java:625)
        at org.alfresco.repo.transaction.RetryingTransactionHelper.doInTransaction(RetryingTransactionHelper.java:326)
        at org.alfresco.repo.transaction.RetryingTransactionHelper.doInTransaction(RetryingTransactionHelper.java:233)
        at org.alfresco.deployment.impl.asr.AVMDeploymentTarget.send(AVMDeploymentTarget.java:699)
        at org.alfresco.deployment.impl.server.DeploymentReceiverEngineImpl.getSendToken(DeploymentReceiverEngineImpl.ja

I have found in the code that if the content that is being deployed to the server contains a Collection(multivalue) that it will throw an exception.  At AVMDeploymentTarget.java line 664, a new PropetyValue is created and it passes null for qname -

Map<QName, PropertyValue>propertyMap = new HashMap<QName, PropertyValue>();
for(String key : fprops.keySet())
{
    propertyMap.put(QName.createQName(key), new PropertyValue(null, fprops.get(key)));
}

Then in the PropetyValue.java if the value is an instance of a Collection, it is handled differently and attempts to make a ValueType at line 691.

ValueType collectionValueType = makeValueType(typeQName);

This will always fail in this case since this method throws an exception if qname is null - which it always is.

    private static ValueType makeValueType(QName typeQName)
    {
        ValueType valueType = valueTypesByPropertyType.get(typeQName);
        if (valueType == null)
        {
            throw new AlfrescoRuntimeException(
                    "Property type not recognised: \n" +
                    "   type: " + typeQName);
        }
        return valueType;
    }


Is there a fix for this in place?  It prevents deploying live sites for Alfresco 3.2.

Outcomes