Announcement Announcement Module
Collapse
No announcement yet.
'Beginning Groovy and Grails': Nothing works after STS was closed Page Title Module
Move Remove Collapse
X
Conversation Detail Module
Collapse
  • Filter
  • Time
  • Show
Clear All
new posts

  • 'Beginning Groovy and Grails': Nothing works after STS was closed

    Hi,

    I started writing the collab-todo application used throughout the book 'Beginning Groovy and Grails'. Everything worked fine, except I had to learn the name of the Category class is prohibited due to changes in Grails 1.1.1.

    Before I shut down STS, I had a small application (which I could run) with Cat[egory], Todo and User domain classes and their respective Controllers.

    Now I opened STS again and nothing works:
    - The domain classes are unable to resolve the other domain classes
    - There is an additional problem in each domain class such as this one :'Groovy:Apparent variable 'User' was found in a static scope but doesn't refer to a local variable, static field or class.'
    - TodoTests.groovy is unable to resolve the domain classes as well.

    I can't run or clean the application.
    What's wrong? The book's errate didn't help me.

    Pida

  • #2
    Have a look at the logs to see what's wrong.

    I don't know what is the problem but I can suggest a few things:

    From the command prompt (not from STS), run 'grails clean'.
    Then, either run your test or the application with 'grails run-app'.
    Now, I assume that if you have some errors they will show on your application log and stacktrace.log. These would be the first two places to start looking for what's wrong.

    Goodluck.


    Originally posted by Pida View Post
    Hi,

    I started writing the collab-todo application used throughout the book 'Beginning Groovy and Grails'. Everything worked fine, except I had to learn the name of the Category class is prohibited due to changes in Grails 1.1.1.

    Before I shut down STS, I had a small application (which I could run) with Cat[egory], Todo and User domain classes and their respective Controllers.

    Now I opened STS again and nothing works:
    - The domain classes are unable to resolve the other domain classes
    - There is an additional problem in each domain class such as this one :'Groovy:Apparent variable 'User' was found in a static scope but doesn't refer to a local variable, static field or class.'
    - TodoTests.groovy is unable to resolve the domain classes as well.

    I can't run or clean the application.
    What's wrong? The book's errate didn't help me.

    Pida

    Comment


    • #3
      Thanks for your reply.

      I should've posted this earlier, but my problem is already solved (though not explained): I forgot the '=' in a line of code such as this one:
      Code:
      static hasMany = [todos:Todo, categories: Cat]
      However, I don't understand the relation of this problem to the unresolvable classes, but then - as you might expect - I'm a novice to both Grails and STS.

      Pida

      Comment

      Working...
      X