tags:

views:

170

answers:

3

I was making various small changes to my app and at some point the grails app server decides that it needs to restart over and over and over.

Anybody else seen this crazy behavior. I cannot really upload my whole app as an example. I have no idea what I did. I wasn't making any configuration changes or plugin changes.

I'm using grails 1.2.

-- As I wrote this email, I tried it again and I get a slightly different behavior.

It goes to restart the app and gives the message that it is Compiling 1 Source file and keeps recompiling the one message.

+3  A: 

Not sure if this is your problem, but I've observed something like this when there is something minor wrong with one of your class names or packages, i.e. say you have a package org.grails.plugin in directory org.grails.foo. That for some reason causes recompilation.

To catch some of this errors, I modified my GRAILS_HOME\scripts_GrailsCompile.groovy by making it print out the files it's compiling.

To modify:

search for ant.groovyc and add listfiles:"yes" to the parameters.

Example:

ant.groovyc(destdir:classesDirPath,
  classpathref:classpathId,
  listfiles:"yes",
  encoding:"UTF-8",
  compilerPaths.curry(classpathId, false)
) 

This way if you see the exact same files keeps getting recompiled, you know where to look.

Jean Barmash
I ended up creating a new project and copying all my source files over to it. It started up and compiled just fine. But thanks for the suggestion. I'll use it next time something like this happens.
Andrew
creating new project from scratch - equivalent to the good old reboot :-)
Jean Barmash
A: 

If grails is running in dev mode, and the source code is on a remote file system, and the remote file server has its time set in the future, then this is what you'll get.

kdj
A: 

thats right. thx jean, with your help i figured out the file with the wrong package/folder-combination (thx kdj).

kraiz