Uploaded image for project: 'Fedora Repository Project'
  1. Fedora Repository Project
  2. FCREPO-2986

Running or building 5.0.2-RC fails on Windows

    XMLWordPrintable

    Details

    • Type: Bug
    • Status: Closed
    • Priority: Blocker
    • Resolution: Fixed
    • Affects Version/s: Fedora 5.0.2
    • Fix Version/s: Fedora 5.1.0, Fedora 5.0.2
    • Component/s: None
    • Labels:
      None
    • Environment:
      Windows 10

      Description

      Several tests fail when building:

      [ERROR] Errors:
      [ERROR] FedoraResourceImplIT.testFindTimeMapLDPCv:1127 ▒ InvalidPath Illegal char <:> ...
      [ERROR] FedoraResourceImplIT.testGetMementoByDatetimeEmpty:1198 ▒ InvalidPath Illegal ...
      [ERROR] FedoraTimeMapImplIT.testGetOriginalBinaryDescriptionResource:119 ▒ InvalidPath
      [ERROR] FedoraTimeMapImplIT.testGetOriginalBinaryResource:101 ▒ InvalidPath Illegal ch...
      [ERROR] FedoraTimeMapImplIT.testGetOriginalResource:83 ▒ InvalidPath Illegal char <:> ...
      [ERROR] TimeMapServiceImplIT.testCreateTimeMap:87 ▒ InvalidPath Illegal char <:> at in...
      [ERROR] TimeMapServiceImplIT.testFindOrCreateForBinary:138 ▒ InvalidPath Illegal char ...
      [ERROR] TimeMapServiceImplIT.testFindTimeMap:108 ▒ InvalidPath Illegal char <:> at ind...
      [ERROR] TimeMapServiceImplIT.testTimeMapExists:122 ▒ InvalidPath Illegal char <:> at i...
      [INFO]
      [ERROR] Tests run: 130, Failures: 0, Errors: 9, Skipped: 1

       

      Likewise,  creating resources using the one-click jar fails, and reveals where the problem is:

      java.nio.file.InvalidPathException: Illegal char <:> at index 12: /test\fedora:timemap at sun.nio.fs.WindowsPathParser.normalize(Unknown Source) at sun.nio.fs.WindowsPathParser.parse(Unknown Source) at sun.nio.fs.WindowsPathParser.parse(Unknown Source) at sun.nio.fs.WindowsPath.parse(Unknown Source) at sun.nio.fs.WindowsFileSystem.getPath(Unknown Source) at java.nio.file.Paths.get(Unknown Source) at org.fcrepo.kernel.modeshape.services.TimeMapServiceImpl.getLdpcvPath(TimeMapServiceImpl.java:98) at org.fcrepo.kernel.modeshape.services.TimeMapServiceImpl.findOrCreate(TimeMapServiceImpl.java:61) at org.fcrepo.kernel.modeshape.services.TimeMapServiceImpl.findOrCreate(TimeMapServiceImpl.java:45) at org.fcrepo.http.api.FedoraLdp.createFedoraResource(FedoraLdp.java:798) at

       

      The problem is 

      return Paths.get(path, LDPCV_TIME_MAP).toString();

      Using Paths this way is inherently problematic on non-unix systems because Path is defined as "An object that may be used to locate a file in a file system. It will typically represent a system dependent file path"

        Attachments

          Issue Links

            Activity

              People

              Assignee:
              birkland Aaron Birkland
              Reporter:
              birkland Aaron Birkland
              Reviewer:
              Ben Pennell
              Votes:
              0 Vote for this issue
              Watchers:
              2 Start watching this issue

                Dates

                Created:
                Updated:
                Resolved: