Uploaded image for project: 'Magnolia CLI'
  1. Magnolia CLI
  2. NPMCLI-43

'magnolia.resources.dir' must use proper slash - no backslash

XMLWordPrintable

    • Icon: Bug Bug
    • Resolution: Fixed
    • Icon: Critical Critical
    • 0.0.1
    • None
    • None
    • Basel 54
    • 2

      The origin of the problem is that npm-cli writes a proper windows path with backslash for the magnolia.resources.dir property.
      That's why java.nio.file.InvalidPathException is thrown.
      So, we should replace the backslash with slash - then it starts up properly.

      I'm not sure whether we should core in a way that the backslash is accepted.


      To reproduce:
      Run "mgnl jumpstart" on Windows 7 with JRE 8 installed.
      Then start magnolia.
      Result: Errors in log, Magnolia cannot be run in browser.

      See attached file for full log.

      A snippet.

      INFO: At least one JAR was scanned for TLDs yet contained no TLDs. Enable debug logging for this logger for a complete list of JARs that wer
      e scanned but no TLDs were found in them. Skipping unneeded JARs during scanning can improve startup time and JSP compilation time.
      2016-07-26 13:16:21,063 ERROR info.magnolia.init.MagnoliaServletContextListener : Oops, Magnolia could not be started
      java.nio.file.InvalidPathException: Illegal char <      > at index 32: C:UsersmagnoliaDocumentsmagnolia opher   estcli2light-modules
              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 info.magnolia.module.model.reader.LightModuleDefinitionReader.collectLightModuleDescriptorFiles(LightModuleDefinitionReader.java:
      185)
              at info.magnolia.module.model.reader.LightModuleDefinitionReader.readAll(LightModuleDefinitionReader.java:110)
              at info.magnolia.module.ModuleManagerImpl.loadDefinitions(ModuleManagerImpl.java:174)
              at info.magnolia.init.MagnoliaServletContextListener.contextInitialized(MagnoliaServletContextListener.java:157)
              at info.magnolia.init.MagnoliaServletContextListener.contextInitialized(MagnoliaServletContextListener.java:127)
              at org.apache.catalina.core.StandardContext.listenerStart(StandardContext.java:5003)
              at org.apache.catalina.core.StandardContext.startInternal(StandardContext.java:5517)
              at org.apache.catalina.util.LifecycleBase.start(LifecycleBase.java:150)
              at org.apache.catalina.core.ContainerBase.addChildInternal(ContainerBase.java:901)
              at org.apache.catalina.core.ContainerBase.addChild(ContainerBase.java:877)
              at org.apache.catalina.core.StandardHost.addChild(StandardHost.java:652)
              at org.apache.catalina.startup.HostConfig.deployDirectory(HostConfig.java:1263)
              at org.apache.catalina.startup.HostConfig$DeployDirectory.run(HostConfig.java:1948)
              at java.util.concurrent.Executors$RunnableAdapter.call(Executors.java:511)
              at java.util.concurrent.FutureTask.run(FutureTask.java:266)
              at java.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1142)
              at java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:617)
              at java.lang.Thread.run(Thread.java:745)
      java.nio.file.InvalidPathException: Illegal char <      > at index 32: C:UsersmagnoliaDocumentsmagnolia opher   estcli2light-modules
              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 info.magnolia.module.model.reader.LightModuleDefinitionReader.collectLightModuleDescriptorFiles(LightModuleDefinitionReader.java:
      

        Acceptance criteria

              fgrilli Federico Grilli
              czimmermann Christopher Zimmermann
              Votes:
              0 Vote for this issue
              Watchers:
              3 Start watching this issue

                Created:
                Updated:
                Resolved:

                  Bug DoR
                  Task DoD

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