I am using jdk1.6 and grails 1.3.4. I have set the JAVA_HOME,GRAILS_HOME and PATH variables following the instructions in the grails.org site. When I execute the create-app command I get the following error:
C:\grails\grails-1.3.4>grails create-app C:\Users\Documents\Grails\helloworld Welcome to Grails 1.3.4 - http://grails.org/ Licensed under Apache Standard License 2.0 Grails home is set to: C:\grails\grails-1.3.4
Base Directory: C:\grails\grails-1.3.4
Resolving dependencies...
Dependencies resolved in 2102ms.
Running script C:\grails\grails-1.3.4\scripts\CreateApp_.groovy
Environment set to development
Error executing script CreateApp: java.lang.StringIndexOutOfBoundsException: Str
ing index out of range: 1
java.lang.StringIndexOutOfBoundsException: String index out of range: 1
at gant.Gant$_dispatch_closure5.doCall(Gant.groovy:391)
at gant.Gant$_dispatch_closure7.doCall(Gant.groovy:415)
at gant.Gant$_dispatch_closure7.doCall(Gant.groovy)
at gant.Gant.withBuildListeners(Gant.groovy:427)
at gant.Gant.this$2$withBuildListeners(Gant.groovy)
at gant.Gant$this$2$withBuildListeners.callCurrent(Unknown Source)
at gant.Gant.dispatch(Gant.groovy:415)
at gant.Gant.this$2$dispatch(Gant.groovy)
at gant.Gant.invokeMethod(Gant.groovy)
at gant.Gant.executeTargets(Gant.groovy:590)
at gant.Gant.executeTargets(Gant.groovy:589)
Caused by: java.lang.StringIndexOutOfBoundsException: String index out of range:
1
at java.lang.String.substring(String.java:1934)
at grails.util.GrailsNameUtils.getClassNameRepresentation(GrailsNameUtil
s.java:82)
at grails.util.GrailsNameUtils$getClassNameRepresentation.call(Unknown S
ource)
at _GrailsCreateProject_groovy$_run_closure4.doCall(_GrailsCreateProject
_groovy:135)
at _GrailsCreateProject_groovy$_run_closure1.doCall(_GrailsCreateProject
_groovy:36)
at gant.Gant$_dispatch_closure5.doCall(Gant.groovy:381)
... 10 more
--- Nested Exception ---
java.lang.StringIndexOutOfBoundsException: String index out of range: 1
at java.lang.String.substring(String.java:1934)
at grails.util.GrailsNameUtils.getClassNameRepresentation(GrailsNameUtil
s.java:82)
at grails.util.GrailsNameUtils$getClassNameRepresentation.call(Unknown S
ource)
at _GrailsCreateProject_groovy$_run_closure4.doCall(_GrailsCreateProject
_groovy:135)
at _GrailsCreateProject_groovy$_run_closure1.doCall(_GrailsCreateProject
_groovy:36)
at gant.Gant$_dis开发者_开发知识库patch_closure5.doCall(Gant.groovy:381)
at gant.Gant$_dispatch_closure7.doCall(Gant.groovy:415)
at gant.Gant$_dispatch_closure7.doCall(Gant.groovy)
at gant.Gant.withBuildListeners(Gant.groovy:427)
at gant.Gant.this$2$withBuildListeners(Gant.groovy)
at gant.Gant$this$2$withBuildListeners.callCurrent(Unknown Source)
at gant.Gant.dispatch(Gant.groovy:415)
at gant.Gant.this$2$dispatch(Gant.groovy)
at gant.Gant.invokeMethod(Gant.groovy)
at gant.Gant.executeTargets(Gant.groovy:590)
at gant.Gant.executeTargets(Gant.groovy:589)
Error executing script CreateApp: java.lang.StringIndexOutOfBoundsException: Str
ing index out of range: 1
There is a StringIndexOutOfBoundsException. Can anyone help me resolve this?
Thanks
SJan
create-app: The starting point for Grails. This command creates a Grails application and requires the user to specify the application name. A subdirectory within the directory the command was executed from is then created based on the entered application name.
The correct way to execute this command:
- Browse to your workspace directory using the command prompt
- Type "grails create-app helloworld
- A subdirectory "helloworld" will be created as your workspace directory
精彩评论