Uploaded image for project: 'Grails'
  1. Grails
  2. GRAILS-7936

Grails command line not handling blanks in Windows

    Details

    • Type: Bug Bug
    • Status: Closed
    • Priority: Major Major
    • Resolution: Fixed
    • Affects Version/s: 2.0-M1, 2.0.3
    • Fix Version/s: 2.1.5, 2.2.2, 2.3-M1
    • Component/s: None
    • Labels:
      None
    • Environment:
      Windows 7 64-bit

      Description

      Not sure if duplicate since the issue has been raised multiple time during different versions...

      1. Installed JDK in D:\Program Files\java\jdk1.7.0
      2. Set JAVA_HOME and GRAILS_HOME appropriately in environment variables and path
      3. Tried running grails command in cygwin/cmd and get:

      "Error opening zip file or JAR manifest missing : D:/Program
      Error occurred during initialization of VM
      agent library failed to init: instrument"

      Workaround: setting the java agent manually... "grails -javaagent:'d:/Program Files/java/jdk1.7.0'"

        Issue Links

          Activity

          Hide
          Alex Coyle added a comment -

          Hi there,

          I am still seeing this issue in the following environment:

          • Windows 7 x64
          • Grails 2.3.1
          • JVM 1.7.0_45 (x64)
          • GRAILS_HOME=C:\Program Files\grails-2.3.1
          • JAVA_HOME=C:\Program Files\Java\jdk1.7.0_45
          • Relevant PATH: PATH=...;%JAVA_HOME%\bin;%GRAILS_HOME%\bin
          Error opening zip file or JAR manifest missing : C:\Program%20Files\grails-2.3.1\lib\org.springsource.springloaded\springloaded-core\jars\springloaded-core-1.1.4.jar
          Error occurred during initialization of VM
          agent library failed to init: instrument
          

          The only workaround for me was to relocate Grails to a path without spaces...

          Could the issue be re-opened?

          Thanks

          Show
          Alex Coyle added a comment - Hi there, I am still seeing this issue in the following environment: Windows 7 x64 Grails 2.3.1 JVM 1.7.0_45 (x64) GRAILS_HOME=C:\Program Files\grails-2.3.1 JAVA_HOME=C:\Program Files\Java\jdk1.7.0_45 Relevant PATH: PATH=...;%JAVA_HOME%\bin;%GRAILS_HOME%\bin Error opening zip file or JAR manifest missing : C:\Program%20Files\grails-2.3.1\lib\org.springsource.springloaded\springloaded-core\jars\springloaded-core-1.1.4.jar Error occurred during initialization of VM agent library failed to init: instrument The only workaround for me was to relocate Grails to a path without spaces... Could the issue be re-opened? Thanks
          Hide
          SriHarshareddyk added a comment -

          I wasn't able to recreate this issue. Could you try running in debug mode and provide more information?

          Show
          SriHarshareddyk added a comment - I wasn't able to recreate this issue. Could you try running in debug mode and provide more information?
          Hide
          Patrick Jungermann added a comment -

          I also have the issue with Grails 2.3.2

          Error opening zip file or JAR manifest missing : C:\Program%20Files\grails\grails-2.3.2\lib\org.springsource.springloaded\springloaded-core\jars\springloaded-core-1.1.4.jar
          Error occurred during initialization of VM
          agent library failed to init: instrument
          Error |
          Forked Grails VM exited with error
          Disconnected from the target VM, address: '127.0.0.1:64461', transport: 'socket'
          
          Process finished with exit code 1
          

          Seems like the part Program%20Files of the path is the problem (shoudl be Program Files)

          Show
          Patrick Jungermann added a comment - I also have the issue with Grails 2.3.2 Error opening zip file or JAR manifest missing : C:\Program%20Files\grails\grails-2.3.2\lib\org.springsource.springloaded\springloaded-core\jars\springloaded-core-1.1.4.jar Error occurred during initialization of VM agent library failed to init: instrument Error | Forked Grails VM exited with error Disconnected from the target VM, address: '127.0.0.1:64461', transport: 'socket' Process finished with exit code 1 Seems like the part Program%20Files of the path is the problem (shoudl be Program Files )
          Hide
          Jonathan Nisell added a comment -

          I agree with Alex Coyle. I am using IntelliJ 13 with Grails 2.3.4 and JDK 1.0.7_51 and get the same error. I have verified both in IntelliJ's "console"-view as well as running it from the command prompt.

          SOLUTION: Another solution though is running it through Cygwin. The Cygwin bash-shell seems to be more adapted to spaces in the path rather than Windows own Commad Prompt. I would rather recommend moving Grails installation to a non-space folder, than using this.

          Cygwin:

          $ grails run-app
          |Loading Grails 2.3.4
          |Configuring classpath
          .
          |Environment set to development
          .................................
          |Packaging Grails application
          .............................
          |Running Grails application
          |Server running. Browse to http://localhost:8080/
          
          
          Show
          Jonathan Nisell added a comment - I agree with Alex Coyle . I am using IntelliJ 13 with Grails 2.3.4 and JDK 1.0.7_51 and get the same error. I have verified both in IntelliJ's "console"-view as well as running it from the command prompt. SOLUTION: Another solution though is running it through Cygwin. The Cygwin bash-shell seems to be more adapted to spaces in the path rather than Windows own Commad Prompt. I would rather recommend moving Grails installation to a non-space folder, than using this. Cygwin : $ grails run-app |Loading Grails 2.3.4 |Configuring classpath . |Environment set to development ................................. |Packaging Grails application ............................. |Running Grails application |Server running. Browse to http://localhost:8080/
          Hide
          sura watthanalamlert added a comment -

          What I did was
          1. copy the whole folder of C:\Program Files\grails-2.3.8 to a location where there is no space i.e. C:\grails-2.3.8
          2. set the value of GRAILS_HOME=C:\grails-2.3.8
          3. append ;%GRAILS_HOME%\bin to Path in My Computer>properties>Advanced Tab> Environment Variables > System variables. (wish I could attach a screen shot to it but I can't)

          Show
          sura watthanalamlert added a comment - What I did was 1. copy the whole folder of C:\Program Files\grails-2.3.8 to a location where there is no space i.e. C:\grails-2.3.8 2. set the value of GRAILS_HOME=C:\grails-2.3.8 3. append ;%GRAILS_HOME%\bin to Path in My Computer>properties>Advanced Tab> Environment Variables > System variables. (wish I could attach a screen shot to it but I can't)

            People

            • Assignee:
              Jeff Scott Brown
              Reporter:
              Alex Duan
            • Votes:
              6 Vote for this issue
              Watchers:
              14 Start watching this issue

              Dates

              • Created:
                Updated:
                Resolved:
                Last Reviewed: