Uploaded image for project: 'Service Packs and Hot Fixes'
  1. Service Packs and Hot Fixes
  2. MNT-14275

ImporterComponent throws org.jaxen.saxpath.XPathSyntaxException if import binding is UUID_BINDING.UPDATE_EXISTING and childname has space

    Details

    • Type: Service Pack Request
    • Status: Closed
    • Resolution: Fixed
    • Affects Version/s: 5.0.1
    • Fix Version/s: 5.0.3
    • Component/s: Repository
    • Labels:
      None
    • Environment:
      v5.0.1,RHEL,Tomcat,Postgresql

      Description

      Given that we do not list import/export service in the public API, see ref: http://docs.alfresco.com/5.0/concepts/java-public-api-list.html, the following was discovered and likely needs to be reviewed/addressed as it looks like a minor fix.

      When using ImporterBinding where the UUID_BINDING is set to
      UUID_BINDING.UPDATE_EXISTING

      If the childName contains a space for example the xml has the following:

      <cm:folder view:childName="cm:Vollständige Konzepte">
      

      then it throws error similar to this

      "org.jaxen.saxpath.XPathSyntaxException: null/cm:Vollständige Konzepte: 21: Unexpected 'Konzepte'"
      

      It looks like the ImporterComponent.java method UpdateExistingNodeImporterStrategy was updated in v5.0.1 Alfresco One, lines #1608-1621 added the "if (uuid==null)" to include this:

      //Resolve to path within node, if one specified
      String path = location.getPath() + "/" + QName.createQName(node.getTypeDefinition().getName().getNamespaceURI(), node.getChildName()).toPrefixString();
      

      This looks like where this issue is propagating from.

      Attached customer's example class and the xml file used to test as well as svn diff 5.0.0.5 to 5.0.1 /root/projects/repository/source/java/org/alfresco/repo/importer/

        Attachments

        1. concept-library-folders.xml
          16 kB
          Jennie Soria [X]
        2. diffImporter5005.501.txt
          8 kB
          Jennie Soria [X]
        3. SiteBootstrapExecutorUPDATE_EXISTING.txt
          12 kB
          Jennie Soria [X]

          Structure

            Activity

              People

              • Assignee:
                closedbugs Closed Bugs (Inactive)
                Reporter:
                jsoria Jennie Soria [X] (Inactive)
              • Votes:
                0 Vote for this issue
                Watchers:
                5 Start watching this issue

                Dates

                • Created:
                  Updated:
                  Resolved:

                  Time Tracking

                  Estimated:
                  Original Estimate - Not Specified
                  Not Specified
                  Remaining:
                  Remaining Estimate - 0 minutes
                  0m
                  Logged:
                  Time Spent - 1 day, 6 hours, 30 minutes
                  1d 6h 30m

                    Structure Helper Panel