Uploaded image for project: 'Remote Alfresco API rivet'
  1. Remote Alfresco API rivet
  2. CMA-33

NodeService's getNode() method fails to return properties of type ArrayList<String>

    XMLWordPrintable

    Details

    • Type: Bug
    • Status: Closed
    • Priority: Major
    • Resolution: Fixed
    • Affects Version/s: None
    • Fix Version/s: 1.4.2
    • Component/s: None
    • Labels:
      None

      Description

      If a one of the Alfresco properties for a node is of type ArrayList<String> (i.e. d:text, multiple=true) a call to NodeService.getNode() asking for that property throws a Castor exception:

      com.rivetlogic.core.cma.exception.CmaRuntimeException: org.exolab.castor.xml.MarshalException: element "propertyValue" occurs more than once. (parent class: org.exolab.castor.mapping.MapItem)
       location: /property/property/property/property/property/propertyValue{File: [not available]; line: 3; column: 1650}
             at com.rivetlogic.core.cma.mapping.impl.CmaCastorUnmarshaller.unmarshal(CmaCastorUnmarshaller.java:57)
             at com.rivetlogic.core.cma.rest.impl.RestExecuterImpl.processResponse(RestExecuterImpl.java:237)
             at com.rivetlogic.core.cma.rest.impl.RestExecuterImpl.processResponse(RestExecuterImpl.java:205)
             at com.rivetlogic.core.cma.rest.impl.RestExecuterImpl.execute(RestExecuterImpl.java:93)
             at com.rivetlogic.core.cma.rest.impl.RestExecuterImpl.execute(RestExecuterImpl.java:74)
             at com.rivetlogic.core.cma.impl.NodeServiceImpl.execute(NodeServiceImpl.java:1483)
             at com.rivetlogic.core.cma.impl.NodeServiceImpl.getNode(NodeServiceImpl.java:565)
             at ucs.common.contentmgmt.AlfrescoContentManager.getRivetNodeForGUID(AlfrescoContentManager.java:2015)
             at ucs.common.contentmgmt.AlfrescoContentManager.getApplicationContentMetaData(AlfrescoContentManager.java:1815)
             at ucs.common.contentmgmt.AlfrescoContentManager.searchForContentByGUID(AlfrescoContentManager.java:641)
             at ucs.common.contentmgmt.AlfrescoContentManager.searchForContentByGUID(AlfrescoContentManager.java:1071)
             at ucs.common.contentmgmt.ContentManagementHelper.searchForContentByGUID(ContentManagementHelper.java:182)
             at ucs.common.contentmgmt.test.GetMetaDataAndContentByGuidTest.runTest(GetMetaDataAndContentByGuidTest.java:48)
             at junit.framework.TestCase.runBare(TestCase.java:134)
             at junit.framework.TestResult$1.protect(TestResult.java:110)
             at junit.framework.TestResult.runProtected(TestResult.java:128)
             at junit.framework.TestResult.run(TestResult.java:113)
             at junit.framework.TestCase.run(TestCase.java:124)
             at junit.framework.TestSuite.runTest(TestSuite.java:232)
             at junit.framework.TestSuite.run(TestSuite.java:227)
             at ucs.common.contentmgmt.test.MainTest.main(MainTest.java:52)
      Caused by: org.exolab.castor.xml.MarshalException: element "propertyValue" occurs more than once. (parent class: org.exolab.castor.mapping.MapItem)
       location: /property/property/property/property/property/propertyValue{File: [not available]; line: 3; column: 1650}
             at org.exolab.castor.xml.Unmarshaller.convertSAXExceptionToMarshalException(Unmarshaller.java:761)
             at org.exolab.castor.xml.Unmarshaller.unmarshal(Unmarshaller.java:727)
             at com.rivetlogic.core.cma.mapping.impl.CmaCastorUnmarshaller.unmarshal(CmaCastorUnmarshaller.java:55)
             ... 20 more
      Caused by: ValidationException: element "propertyValue" occurs more than once. (parent class: org.exolab.castor.mapping.MapItem)
       location: /property/property/property/property/property/propertyValue
             at org.exolab.castor.xml.UnmarshalHandler.endElement(UnmarshalHandler.java:984)
             at org.exolab.castor.xml.UnmarshalHandler.endElement(UnmarshalHandler.java:1159)
             at org.apache.xerces.parsers.AbstractSAXParser.endElement(Unknown Source)
             at org.apache.xerces.impl.XMLDocumentFragmentScannerImpl.scanEndElement(Unknown Source)
             at org.apache.xerces.impl.XMLDocumentFragmentScannerImpl$FragmentContentDispatcher.dispatch(Unknown Source)
             at org.apache.xerces.impl.XMLDocumentFragmentScannerImpl.scanDocument(Unknown Source)
             at org.apache.xerces.parsers.XML11Configuration.parse(Unknown Source)
             at org.apache.xerces.parsers.XML11Configuration.parse(Unknown Source)
             at org.apache.xerces.parsers.XMLParser.parse(Unknown Source)
             at org.apache.xerces.parsers.AbstractSAXParser.parse(Unknown Source)
             at org.apache.xerces.jaxp.SAXParserImpl$JAXPSAXParser.parse(Unknown Source)
             at org.exolab.castor.xml.Unmarshaller.unmarshal(Unmarshaller.java:715)
             ... 21 more

      I believe this has been fixed in NodeService.getProperties() so it just needs to be fixed here as well.

        Attachments

          Issue Links

            Activity

              People

              • Assignee:
                aelnattar Al El-Nattar
                Reporter:
                aelnattar Al El-Nattar
              • Votes:
                0 Vote for this issue
                Watchers:
                0 Start watching this issue

                Dates

                • Created:
                  Updated:
                  Resolved:

                  Zendesk Support