Uploaded image for project: 'Sling'
  1. Sling
  2. SLING-11261

Exception while starting CodehaleMetricsReporter component on Windows Machine

    XMLWordPrintableJSON

Details

    • Bug
    • Status: Closed
    • Major
    • Resolution: Fixed
    • None
    • Commons
    • None
    • OS: Windows machine

    Description

      On windows machine, I am getting the following Exception for while starting the CodehaleMetricsReporter component

      java.nio.file.InvalidPathException: Illegal char <:> at index 2: /C:/playground/rrd4j/metrics/metrics.rrd
      	at sun.nio.fs.WindowsPathParser.normalize(WindowsPathParser.java:182)
      	at sun.nio.fs.WindowsPathParser.parse(WindowsPathParser.java:153)
      	at sun.nio.fs.WindowsPathParser.parse(WindowsPathParser.java:77)
      	at sun.nio.fs.WindowsPath.parse(WindowsPath.java:94)
      	at sun.nio.fs.WindowsFileSystem.getPath(WindowsFileSystem.java:255)
      	at java.nio.file.Paths.get(Paths.java:84)
      	at org.rrd4j.core.RrdFileBackendFactory.exists(RrdFileBackendFactory.java:26)
      	at org.rrd4j.core.RrdBackendFactory.exists(RrdBackendFactory.java:543)
      	at org.rrd4j.core.RrdDb.<init>(RrdDb.java:624)
      	at org.rrd4j.core.RrdDb.of(RrdDb.java:500)
      

      This is because we are creating RrdDB by passing the path returned by RrdDef.getPath() method (see here) which does not return the path correctly and is unreliable as discussed here and It is suggested to use RrdDef.getUri() instead.

      Also, while creating the RrdDef with a path RRD4J lib creates an internal generic URI which again can not be use directly for creating the File or Paths api as this generic URI could be non-absolute in some cases.

      Attaching the test case which should fail on windows machine. RRD4JReporterProblem.java

      Attachments

        1. RRD4JReporterProblem.java
          2 kB
          Sagar Miglani

        Activity

          People

            rombert Robert Munteanu
            sagarmiglani Sagar Miglani
            Votes:
            0 Vote for this issue
            Watchers:
            2 Start watching this issue

            Dates

              Created:
              Updated:
              Resolved:

              Time Tracking

                Estimated:
                Original Estimate - Not Specified
                Not Specified
                Remaining:
                Remaining Estimate - 0h
                0h
                Logged:
                Time Spent - 1h
                1h