gswg-v2
gswg-v2 copied to clipboard
possible issue in chapter 7 of gwsg v2
Hi Scott, I've reading the second issue and found an issue after invoking "grails generate-all User" command. I'm using grails 1.3.7 version on windows xp and java compiler is 1.6.0_10..
BTW i cut pasted the User's domain code and issued the generate-all command.
Here is the error:
C:\web\racetrack>grails generate-all User Welcome to Grails 1.3.7 - http://grails.org/ Licensed under Apache Standard License 2.0 Grails home is set to: C:\grails-1.3.7 Base Directory: C:\web\racetrack Resolving dependencies... Dependencies resolved in 2391ms. Running script C:\grails-1.3.7\scripts\GenerateAll.groovy Environment set to development [groovyc] Compiling 2 source files to C:\web\racetrack\target\classes [groovyc] Compiling 1 source file to C:\web\racetrack\target\classes Domain class not found in grails-app/domain, trying hibernate mapped classes... [groovyc] Compiling 1 source file to C:\web\racetrack\target\classes [groovyc] Compiling 1 source file to C:\web\racetrack\target\classes No domain class found for name User. Please try again and enter a valid domain class nam e Application context shutting down... Application context shutdown.
Hi Bocode,
It sounds like you are running into a Java packaging issue. After Jason and I wrote the 2nd Edition, Grails started putting all of its artifacts into packages. In other words, your User.groovy class is probably in grails-app/domain/racetrack/User.groovy.
It would be nice if Grails "just knew" what you were talking about when you told it to "grails generate-all User", but instead you need to be a bit more specific: "grails generate-all racetrack.User".
HTH, s Scott Davis [email protected]
ThirstyHead: training done right http://thirstyhead.com
On Mar 17, 2011, at 3:42 AM, bocode wrote:
Hi Scott, I've reading the second issue and found an issue after invoking "grails generate-all User" command. I'm using grails 1.3.7 version on windows xp and java compiler is 1.6.0_10..
BTW i cut pasted the User's domain code and issued the generate-all command.
Here is the error:
C:\web\racetrack>grails generate-all User Welcome to Grails 1.3.7 - http://grails.org/ Licensed under Apache Standard License 2.0 Grails home is set to: C:\grails-1.3.7 Base Directory: C:\web\racetrack Resolving dependencies... Dependencies resolved in 2391ms. Running script C:\grails-1.3.7\scripts\GenerateAll.groovy Environment set to development [groovyc] Compiling 2 source files to C:\web\racetrack\target\classes [groovyc] Compiling 1 source file to C:\web\racetrack\target\classes Domain class not found in grails-app/domain, trying hibernate mapped classes... [groovyc] Compiling 1 source file to C:\web\racetrack\target\classes [groovyc] Compiling 1 source file to C:\web\racetrack\target\classes No domain class found for name User. Please try again and enter a valid domain class nam e Application context shutting down... Application context shutdown.Reply to this email directly or view it on GitHub: https://github.com/scottdavis99/gswg-v2/issues/1
Hi Scott,
Thanks for the reply. Let me retry with your suggestion.
Thank you Bocode
On Wed, Mar 23, 2011 at 12:24 AM, scottdavis99 < [email protected]>wrote:
Hi Bocode,
It sounds like you are running into a Java packaging issue. After Jason and I wrote the 2nd Edition, Grails started putting all of its artifacts into packages. In other words, your User.groovy class is probably in grails-app/domain/racetrack/User.groovy.
It would be nice if Grails "just knew" what you were talking about when you told it to "grails generate-all User", but instead you need to be a bit more specific: "grails generate-all racetrack.User".
HTH, s Scott Davis [email protected]
ThirstyHead: training done right http://thirstyhead.com
On Mar 17, 2011, at 3:42 AM, bocode wrote:
Hi Scott, I've reading the second issue and found an issue after invoking "grails generate-all User" command. I'm using grails 1.3.7 version on windows xp and java compiler is 1.6.0_10..
BTW i cut pasted the User's domain code and issued the generate-all command.
Here is the error:
C:\web\racetrack>grails generate-all User Welcome to Grails 1.3.7 - http://grails.org/ Licensed under Apache Standard License 2.0 Grails home is set to: C:\grails-1.3.7 Base Directory: C:\web\racetrack Resolving dependencies... Dependencies resolved in 2391ms. Running script C:\grails-1.3.7\scripts\GenerateAll.groovy Environment set to development [groovyc] Compiling 2 source files to C:\web\racetrack\target\classes [groovyc] Compiling 1 source file to C:\web\racetrack\target\classes Domain class not found in grails-app/domain, trying hibernate mapped classes... [groovyc] Compiling 1 source file to C:\web\racetrack\target\classes [groovyc] Compiling 1 source file to C:\web\racetrack\target\classes No domain class found for name User. Please try again and enter a valid domain class nam e Application context shutting down... Application context shutdown.Reply to this email directly or view it on GitHub: https://github.com/scottdavis99/gswg-v2/issues/1
Reply to this email directly or view it on GitHub: https://github.com/scottdavis99/gswg-v2/issues/1#comment_904315
This solution worked for me. I was having the same issue. Thanks!
I am still having this issue, even when adding the package name. Any oher solution ??
My bad ... I was typing a wrong package name :)