Forrest
  1. Forrest
  2. FOR-267

spaces in project path lead to error on Windows

    Details

    • Type: Bug Bug
    • Status: Resolved
    • Priority: Major Major
    • Resolution: Fixed
    • Affects Version/s: 0.6
    • Fix Version/s: 0.6
    • Component/s: Core operations
    • Labels:
      None
    • Environment:
      Windows 2000 and XP

      Description

      With 'forrest run' if there are spaces in the pathname then failure.

      This is for Forrest-r37116, with r37072 it still worked.
      'forrest run' terminates with an error saying:

      run_default_jetty:
      java.lang.NoClassDefFoundError: path/after/space/myproject -Dforrest/home=H:\forrest\src\core
      Exception in thread "main"

      removing the space from the path
      d:/the path/after/space/myproject
      so that it looks like
      d:/the_path/after/space/myproject
      runs fine

        Issue Links

          Activity

          Hide
          Dave Brondsema added a comment -
          can somebody verify this is works properly before we close the issue?
          Show
          Dave Brondsema added a comment - can somebody verify this is works properly before we close the issue?
          Hide
          Nicola Ken Barozzi added a comment -
          Ok, good work :-)
          Show
          Nicola Ken Barozzi added a comment - Ok, good work :-)
          Hide
          Dave Brondsema added a comment -
          If you run in verbose mode, you can see exactly what the command line is when executing "java". There are lots of -Dprop=value arguments. And as it notes the quotes surrounding them are not part of the executing string that is built. I am quite sure that spaces in the value part causes a problem. For example java ... -Dproject.temp-dir=d:\a b\temp ... is bad because that is two arguments not one (and b\temp is not a valid argument for java). It should be java ... "-Dproject.temp-dir=d:\a b\temp" ... I think. I am working on testing & verifying this and patching ant.
          Show
          Dave Brondsema added a comment - If you run in verbose mode, you can see exactly what the command line is when executing "java". There are lots of -Dprop=value arguments. And as it notes the quotes surrounding them are not part of the executing string that is built. I am quite sure that spaces in the value part causes a problem. For example java ... -Dproject.temp-dir=d:\a b\temp ... is bad because that is two arguments not one (and b\temp is not a valid argument for java). It should be java ... "-Dproject.temp-dir=d:\a b\temp" ... I think. I am working on testing & verifying this and patching ant.
          Hide
          Nicola Ken Barozzi added a comment -
          I have run with and without the sysproperty feature, and the *only* difference I see with 'forrest -debug' is the fact that it adds the property values.

          Still dunno what exactly breaks, investigation continues.
          Show
          Nicola Ken Barozzi added a comment - I have run with and without the sysproperty feature, and the *only* difference I see with 'forrest -debug' is the fact that it adds the property values. Still dunno what exactly breaks, investigation continues.
          Hide
          Nicola Ken Barozzi added a comment -
          I confirm Dave's comment.

          If I remove the syspropertyset definition from the call to Cocoon in site.xml it wll works as before.

          I don't yet understand why it happens, so I'm still investigating.
          Show
          Nicola Ken Barozzi added a comment - I confirm Dave's comment. If I remove the syspropertyset definition from the call to Cocoon in site.xml it wll works as before. I don't yet understand why it happens, so I'm still investigating.
          Hide
          Dave Brondsema added a comment -
          This is probably caused by my recent change to all <java> tasks which invoke Cocoon. All properties beginning with "forrest." or "project." are passed on to that JVM using -Dprop=value. So I think the ant task needs to be patched to properly quote or escape spaces in the values.
          Show
          Dave Brondsema added a comment - This is probably caused by my recent change to all <java> tasks which invoke Cocoon. All properties beginning with "forrest." or "project." are passed on to that JVM using -Dprop=value. So I think the ant task needs to be patched to properly quote or escape spaces in the values.
          Hide
          Nicola Ken Barozzi added a comment -
          I get the same problem, and have resorted to using the short dos names for now. Not a nice solution but it keeps me going ;-)
          Show
          Nicola Ken Barozzi added a comment - I get the same problem, and have resorted to using the short dos names for now. Not a nice solution but it keeps me going ;-)
          Hide
          David Crossley added a comment -
          Is everything okay when you use the command-line mode 'forrest' rather than webapp mode 'forrest run'?
          Show
          David Crossley added a comment - Is everything okay when you use the command-line mode 'forrest' rather than webapp mode 'forrest run'?

            People

            • Assignee:
              Dave Brondsema
              Reporter:
              Johannes Schaefer
            • Votes:
              0 Vote for this issue
              Watchers:
              0 Start watching this issue

              Dates

              • Created:
                Updated:
                Resolved:

                Development