Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

possible issue in chapter 7 of gwsg v2 #1

Open
bocode opened this issue Mar 17, 2011 · 5 comments
Open

possible issue in chapter 7 of gwsg v2 #1

bocode opened this issue Mar 17, 2011 · 5 comments

Comments

@bocode
Copy link

bocode commented Mar 17, 2011

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.
@scottdavis99
Copy link
Owner

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
scott@thirstyhead.com

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:
#1

@bocode
Copy link
Author

bocode commented Mar 23, 2011

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 <
reply@reply.github.com>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
scott@thirstyhead.com

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:
#1

Reply to this email directly or view it on GitHub:
#1 (comment)

@happycampo
Copy link

This solution worked for me. I was having the same issue. Thanks!

@Euloiix
Copy link

Euloiix commented Aug 16, 2011

I am still having this issue, even when adding the package name.
Any oher solution ??

@Euloiix
Copy link

Euloiix commented Aug 16, 2011

My bad ... I was typing a wrong package name :)

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

4 participants