Uploaded image for project: 'Hippo Configuration Management'
  1. Hippo Configuration Management
  2. HCM-246

Failing YAML export of resource with default file name containing colon, on Windows

    XMLWordPrintable

    Details

    • Type: Bug
    • Status: Closed
    • Priority: Normal
    • Resolution: Fixed
    • Affects Version/s: 1.0.3
    • Fix Version/s: 1.2.0
    • Labels:
      None
    • Similar issues:
    • Story Points:
      1
    • Epic Link:
    • Flagged:
      Flagged
    • Processed by team:
      Platform
    • Sprint:
      Platform 175, Platform 176

      Description

      YAML export will write resource files to file system and reference those from yaml files. 

      This fails on Windows when the hippo:filename property value contains a colon, which is true for the default at /hippo:namespaces/hippo/resource/hipposysedit:prototypes/hipposysedit:prototype where hippo:filename=hippo:resource

      In retrospect, the default file name here is awkward and resolution could also be to change that.

      Reproduction

      • On Windows, create a 12.1.0 project from archetype
      • Build and run it
      • From console, select above node and export it. This fails because a file named "hippo:resource" is illegal on Windows.
        INFO java.nio.file.InvalidPathException: Illegal char <:> at index 7: .\hippo:resource
        INFO    at sun.nio.fs.WindowsPathParser.normalize(WindowsPathParser.java:182) ~[?:1.8.0_152]
        INFO    at sun.nio.fs.WindowsPathParser.parse(WindowsPathParser.java:153) ~[?:1.8.0_152]
        INFO    at sun.nio.fs.WindowsPathParser.parse(WindowsPathParser.java:77) ~[?:1.8.0_152]
        INFO    at sun.nio.fs.WindowsPath.parse(WindowsPath.java:94) ~[?:1.8.0_152]
        INFO    at sun.nio.fs.WindowsFileSystem.getPath(WindowsFileSystem.java:255) ~[?:1.8.0_152]
        INFO    at sun.nio.fs.AbstractPath.resolve(AbstractPath.java:53) ~[?:1.8.0_152]
        INFO    at org.onehippo.cm.model.serializer.FileResourceOutputProvider.getResourcePath(FileResourceOutputProvider.java:64) ~[hippo-configuration-management-model-1.0.3.jar:1.0.3]
        INFO    at org.onehippo.cm.model.serializer.FileResourceOutputProvider.getResourceOutputStream(FileResourceOutputProvider.java:57) ~[hippo-configuration-management-model-1.0.3.jar:1.0.3]
        INFO    at org.onehippo.cm.model.serializer.ModuleContext.serializeResourceValue(ModuleContext.java:268) ~[hippo-configuration-management-model-1.0.3.jar:1.0.3]
        INFO    at org.onehippo.cm.model.serializer.SourceSerializer.serializeResourceValue(SourceSerializer.java:381) ~[hippo-configuration-management-model-1.0.3.jar:1.0.3]
        INFO    at org.onehippo.cm.model.serializer.SourceSerializer.processSingleResource(SourceSerializer.java:250) ~[hippo-configuration-management-model-1.0.3.jar:1.0.3]
        INFO    at org.onehippo.cm.model.serializer.SourceSerializer.representPropertyUsingMap(SourceSerializer.java:223) ~[hippo-configuration-management-model-1.0.3.jar:1.0.3]
        INFO    at org.onehippo.cm.model.serializer.SourceSerializer.representProperty(SourceSerializer.java:177) ~[hippo-configuration-management-model-1.0.3.jar:1.0.3]
        INFO    at org.onehippo.cm.model.serializer.SourceSerializer.representDefinitionNode(SourceSerializer.java:147) ~[hippo-configuration-management-model-1.0.3.jar:1.0.3]
        INFO    at org.onehippo.cm.model.serializer.SourceSerializer.representDefinitionNode(SourceSerializer.java:150) ~[hippo-configuration-management-model-1.0.3.jar:1.0.3]
        INFO    at org.onehippo.cm.model.serializer.SourceSerializer.representDefinitionNode(SourceSerializer.java:150) ~[hippo-configuration-management-model-1.0.3.jar:1.0.3]
        INFO    at org.onehippo.cm.model.serializer.SourceSerializer.representDefinitionNode(SourceSerializer.java:150) ~[hippo-configuration-management-model-1.0.3.jar:1.0.3]
        INFO    at org.onehippo.cm.model.serializer.SourceSerializer.representDefinitionNode(SourceSerializer.java:150) ~[hippo-configuration-management-model-1.0.3.jar:1.0.3]
        INFO    at org.onehippo.cm.model.serializer.SourceSerializer.representDefinitionNode(SourceSerializer.java:150) ~[hippo-configuration-management-model-1.0.3.jar:1.0.3]
        INFO    at org.onehippo.cm.model.serializer.SourceSerializer.representContentDefinition(SourceSerializer.java:125) ~[hippo-configuration-management-model-1.0.3.jar:1.0.3]
        INFO    at org.onehippo.cm.model.serializer.ContentSourceSerializer.representSource(ContentSourceSerializer.java:35) ~[hippo-configuration-management-model-1.0.3.jar:1.0.3]
        INFO    at org.onehippo.cm.model.serializer.ModuleWriter.writeModule(ModuleWriter.java:71) ~[hippo-configuration-management-model-1.0.3.jar:1.0.3]
        INFO    at org.onehippo.cm.model.serializer.ModuleWriter.writeModule(ModuleWriter.java:54) ~[hippo-configuration-management-model-1.0.3.jar:1.0.3]
        INFO    at org.onehippo.cm.engine.ConfigurationServiceImpl.exportZippedContent(ConfigurationServiceImpl.java:381) ~[hippo-repository-engine-5.0.4.jar:5.0.4]
        INFO    at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method) ~[?:1.8.0_152]
        INFO    at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:62) ~[?:1.8.0_152]
        INFO    at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43) ~[?:1.8.0_152]
        INFO    at java.lang.reflect.Method.invoke(Method.java:498) ~[?:1.8.0_152]
        INFO    at org.onehippo.cms7.services.HippoServiceRegistry$NamedRegistration$1.invoke(HippoServiceRegistry.java:57) ~[hippo-services-4.0.3.jar:4.0.3]
        INFO    at com.sun.proxy.$Proxy50.exportZippedContent(Unknown Source) ~[?:?]
        INFO    at org.hippoecm.frontend.plugins.console.menu.content.DownloadExportYamlLink.getContent(DownloadExportYamlLink.java:67) ~[hippo-cms-console-frontend-5.0.4.jar:5.0.4]
        

       

        Attachments

          Issue Links

            Activity

              People

              • Assignee:
                Unassigned
                Reporter:
                jhoffman Jeroen Hoffman
              • Votes:
                0 Vote for this issue
                Watchers:
                4 Start watching this issue

                Dates

                • Created:
                  Updated:
                  Resolved: