Discussion:
Grails 2.2.2: Does not pick up changes from within the grails shell
Harry Simons
2013-07-04 10:21:21 UTC
Permalink
Hello,

I'm having a really difficult time getting Grails to pick my changes
from within the Grails shell (ie, from the 'grails> ' prompt).

Details:
1. I stop the app via a 'stop-app' (at the grails> prompt).
2. I make very simple edits to one of my domain classes using gedit.
3. I then do a 'run-app'. Grails does say 'Compiling 1 source files'
but doesn't pick up my edits.

I have tried a 'clean' followed by a 'run-app' and same results.

However, if I exit the Grails shell and say 'grails run-app', I can
see my edits taking effect. The problem is, restarting Grails during
development is proving to be very, VERY time consuming. Can somebody
please suggest a fix or a workaround, or at least confirm that this is
a known problem.

I'm using:
Grails 2.2.2
Groovy 2.1.5
Java 1.6.0_43
Ubuntu 13.x

/HS

---------------------------------------------------------------------
To unsubscribe from this list, please visit:

http://xircles.codehaus.org/manage_email
HarrySimons
2013-07-05 06:11:49 UTC
Permalink
Folks...? Are you there??

As part of my current Grails self-learning exercise, I anticipate doing
"short code editing --> result inspection --> repeat..." cycles a few dozen
times a day at least.

Thus, I'd really like to know about some solution or workaround. (Wondering:
If I'm the only one facing this issue, then what am I doing wrong? And if
others too are facing this issue, then how are they are coping with it?)

Many thanks in advance,
/HS
Post by Harry Simons
Hello,
I'm having a really difficult time getting Grails to pick my changes
from within the Grails shell (ie, from the 'grails> ' prompt).
1. I stop the app via a 'stop-app' (at the grails> prompt).
2. I make very simple edits to one of my domain classes using gedit.
3. I then do a 'run-app'. Grails does say 'Compiling 1 source files'
but doesn't pick up my edits.
I have tried a 'clean' followed by a 'run-app' and same results.
However, if I exit the Grails shell and say 'grails run-app', I can
see my edits taking effect. The problem is, restarting Grails during
development is proving to be very, VERY time consuming. Can somebody
please suggest a fix or a workaround, or at least confirm that this is
a known problem.
Grails 2.2.2
Groovy 2.1.5
Java 1.6.0_43
Ubuntu 13.x
/HS
---------------------------------------------------------------------
http://xircles.codehaus.org/manage_email
--
View this message in context: http://grails.1312388.n4.nabble.com/Grails-2-2-2-Does-not-pick-up-changes-from-within-the-grails-shell-tp4646315p4646335.html
Sent from the Grails - user mailing list archive at Nabble.com.

---------------------------------------------------------------------
To unsubscribe from this list, please visit:

http://xircles.codehaus.org/manage_email
Vladimir Havenchyk
2013-07-05 06:17:22 UTC
Permalink
Have the same on windows 7, jdk6, grails 2.2.0, 2.2.1



--
View this message in context: http://grails.1312388.n4.nabble.com/Grails-2-2-2-Does-not-pick-up-changes-from-within-the-grails-shell-tp4646315p4646336.html
Sent from the Grails - user mailing list archive at Nabble.com.

---------------------------------------------------------------------
To unsubscribe from this list, please visit:

http://xircles.codehaus.org/manage_email
Scott Eisenberg
2013-07-08 20:19:46 UTC
Permalink
Anyone want to chime in on whether their reloading works from the shell. Hard to believe it's universally broken.
Post by HarrySimons
Folks...? Are you there??
As part of my current Grails self-learning exercise, I anticipate doing
"short code editing --> result inspection --> repeat..." cycles a few dozen
times a day at least.
If I'm the only one facing this issue, then what am I doing wrong? And if
others too are facing this issue, then how are they are coping with it?)
Many thanks in advance,
/HS
Post by Harry Simons
Hello,
I'm having a really difficult time getting Grails to pick my changes
from within the Grails shell (ie, from the 'grails> ' prompt).
1. I stop the app via a 'stop-app' (at the grails> prompt).
2. I make very simple edits to one of my domain classes using gedit.
3. I then do a 'run-app'. Grails does say 'Compiling 1 source files'
but doesn't pick up my edits.
I have tried a 'clean' followed by a 'run-app' and same results.
However, if I exit the Grails shell and say 'grails run-app', I can
see my edits taking effect. The problem is, restarting Grails during
development is proving to be very, VERY time consuming. Can somebody
please suggest a fix or a workaround, or at least confirm that this is
a known problem.
Grails 2.2.2
Groovy 2.1.5
Java 1.6.0_43
Ubuntu 13.x
/HS
---------------------------------------------------------------------
http://xircles.codehaus.org/manage_email
--
View this message in context: http://grails.1312388.n4.nabble.com/Grails-2-2-2-Does-not-pick-up-changes-from-within-the-grails-shell-tp4646315p4646335.html
Sent from the Grails - user mailing list archive at Nabble.com.
---------------------------------------------------------------------
http://xircles.codehaus.org/manage_email
---------------------------------------------------------------------
To unsubscribe from this list, please visit:

http://xircles.codehaus.org/manage_email
Steve Hummingbird
2013-07-08 20:38:14 UTC
Permalink
reloading works fine here with 2.2.2 and 2.2.3. Here is something from an older mail I've sent to the list, which usually helped me if I had reloading issues:

"So, I updated my dependencies (resources to 1.2) , run 'refresh-dependencies' and 'clean' and it seems that reloading is back to normal"

Cheers,
Steve
Post by Scott Eisenberg
Anyone want to chime in on whether their reloading works from the shell. Hard to believe it's universally broken.
Post by HarrySimons
Folks...? Are you there??
As part of my current Grails self-learning exercise, I anticipate doing
"short code editing --> result inspection --> repeat..." cycles a few dozen
times a day at least.
If I'm the only one facing this issue, then what am I doing wrong? And if
others too are facing this issue, then how are they are coping with it?)
Many thanks in advance,
/HS
Post by Harry Simons
Hello,
I'm having a really difficult time getting Grails to pick my changes
from within the Grails shell (ie, from the 'grails> ' prompt).
1. I stop the app via a 'stop-app' (at the grails> prompt).
2. I make very simple edits to one of my domain classes using gedit.
3. I then do a 'run-app'. Grails does say 'Compiling 1 source files'
but doesn't pick up my edits.
I have tried a 'clean' followed by a 'run-app' and same results.
However, if I exit the Grails shell and say 'grails run-app', I can
see my edits taking effect. The problem is, restarting Grails during
development is proving to be very, VERY time consuming. Can somebody
please suggest a fix or a workaround, or at least confirm that this is
a known problem.
Grails 2.2.2
Groovy 2.1.5
Java 1.6.0_43
Ubuntu 13.x
/HS
---------------------------------------------------------------------
http://xircles.codehaus.org/manage_email
--
View this message in context: http://grails.1312388.n4.nabble.com/Grails-2-2-2-Does-not-pick-up-changes-from-within-the-grails-shell-tp4646315p4646335.html
Sent from the Grails - user mailing list archive at Nabble.com.
---------------------------------------------------------------------
http://xircles.codehaus.org/manage_email
---------------------------------------------------------------------
http://xircles.codehaus.org/manage_email
---------------------------------------------------------------------
To unsubscribe from this list, please visit:

http://xircles.codehaus.org/manage_email
Scott Eisenberg
2013-07-10 03:08:15 UTC
Permalink
I did some simple tests with a newly created app. In general, I found live reloading to work for me, with some caveats.

I could add new domains, add scaffold controller, add some fields, refresh and it showed up.

Could make changes to the fields, wait just a little bit and then the changed fields would appear.

This was all with database configured as "create-drop".

When I configured the database with "update", changes and refresh would give a Missing Method error on the list method of the domain.

** Grails team, is this expected with the update config? Raise a Jira?

Mac, OSX 10.8.2, grails 2.2.3, Java 1.6.0_51-b11-457-11M4509
Post by Steve Hummingbird
"So, I updated my dependencies (resources to 1.2) , run 'refresh-dependencies' and 'clean' and it seems that reloading is back to normal"
Cheers,
Steve
Post by Scott Eisenberg
Anyone want to chime in on whether their reloading works from the shell. Hard to believe it's universally broken.
Post by HarrySimons
Folks...? Are you there??
As part of my current Grails self-learning exercise, I anticipate doing
"short code editing --> result inspection --> repeat..." cycles a few dozen
times a day at least.
If I'm the only one facing this issue, then what am I doing wrong? And if
others too are facing this issue, then how are they are coping with it?)
Many thanks in advance,
/HS
Post by Harry Simons
Hello,
I'm having a really difficult time getting Grails to pick my changes
from within the Grails shell (ie, from the 'grails> ' prompt).
1. I stop the app via a 'stop-app' (at the grails> prompt).
2. I make very simple edits to one of my domain classes using gedit.
3. I then do a 'run-app'. Grails does say 'Compiling 1 source files'
but doesn't pick up my edits.
I have tried a 'clean' followed by a 'run-app' and same results.
However, if I exit the Grails shell and say 'grails run-app', I can
see my edits taking effect. The problem is, restarting Grails during
development is proving to be very, VERY time consuming. Can somebody
please suggest a fix or a workaround, or at least confirm that this is
a known problem.
Grails 2.2.2
Groovy 2.1.5
Java 1.6.0_43
Ubuntu 13.x
/HS
---------------------------------------------------------------------
http://xircles.codehaus.org/manage_email
--
View this message in context: http://grails.1312388.n4.nabble.com/Grails-2-2-2-Does-not-pick-up-changes-from-within-the-grails-shell-tp4646315p4646335.html
Sent from the Grails - user mailing list archive at Nabble.com.
---------------------------------------------------------------------
http://xircles.codehaus.org/manage_email
---------------------------------------------------------------------
http://xircles.codehaus.org/manage_email
---------------------------------------------------------------------
http://xircles.codehaus.org/manage_email
---------------------------------------------------------------------
To unsubscribe from this list, please visit:

http://xircles.codehaus.org/manage_email
Graeme Rocher
2013-07-10 07:22:40 UTC
Permalink
No it isn't expected. A JIRA with steps to reproduce would be helpful
Post by Scott Eisenberg
I did some simple tests with a newly created app. In general, I found
live reloading to work for me, with some caveats.
I could add new domains, add scaffold controller, add some fields, refresh
and it showed up.
Could make changes to the fields, wait just a little bit and then the
changed fields would appear.
This was all with database configured as "create-drop".
When I configured the database with "update", changes and refresh would
give a Missing Method error on the list method of the domain.
** Grails team, is this expected with the update config? Raise a Jira?
Mac, OSX 10.8.2, grails 2.2.3, Java 1.6.0_51-b11-457-11M4509
Post by Steve Hummingbird
reloading works fine here with 2.2.2 and 2.2.3. Here is something from
an older mail I've sent to the list, which usually helped me if I had
Post by Steve Hummingbird
"So, I updated my dependencies (resources to 1.2) , run
'refresh-dependencies' and 'clean' and it seems that reloading is back to
normal"
Post by Steve Hummingbird
Cheers,
Steve
Post by Scott Eisenberg
Anyone want to chime in on whether their reloading works from the
shell. Hard to believe it's universally broken.
Post by Steve Hummingbird
Post by Scott Eisenberg
Post by HarrySimons
Folks...? Are you there??
As part of my current Grails self-learning exercise, I anticipate doing
"short code editing --> result inspection --> repeat..." cycles a few
dozen
Post by Steve Hummingbird
Post by Scott Eisenberg
Post by HarrySimons
times a day at least.
Thus, I'd really like to know about some solution or workaround.
If I'm the only one facing this issue, then what am I doing wrong? And
if
Post by Steve Hummingbird
Post by Scott Eisenberg
Post by HarrySimons
others too are facing this issue, then how are they are coping with
it?)
Post by Steve Hummingbird
Post by Scott Eisenberg
Post by HarrySimons
Many thanks in advance,
/HS
Post by Harry Simons
Hello,
I'm having a really difficult time getting Grails to pick my changes
from within the Grails shell (ie, from the 'grails> ' prompt).
1. I stop the app via a 'stop-app' (at the grails> prompt).
2. I make very simple edits to one of my domain classes using gedit.
3. I then do a 'run-app'. Grails does say 'Compiling 1 source files'
but doesn't pick up my edits.
I have tried a 'clean' followed by a 'run-app' and same results.
However, if I exit the Grails shell and say 'grails run-app', I can
see my edits taking effect. The problem is, restarting Grails during
development is proving to be very, VERY time consuming. Can somebody
please suggest a fix or a workaround, or at least confirm that this is
a known problem.
Grails 2.2.2
Groovy 2.1.5
Java 1.6.0_43
Ubuntu 13.x
/HS
---------------------------------------------------------------------
http://xircles.codehaus.org/manage_email
--
http://grails.1312388.n4.nabble.com/Grails-2-2-2-Does-not-pick-up-changes-from-within-the-grails-shell-tp4646315p4646335.html
Post by Steve Hummingbird
Post by Scott Eisenberg
Post by HarrySimons
Sent from the Grails - user mailing list archive at Nabble.com.
---------------------------------------------------------------------
http://xircles.codehaus.org/manage_email
---------------------------------------------------------------------
http://xircles.codehaus.org/manage_email
---------------------------------------------------------------------
http://xircles.codehaus.org/manage_email
---------------------------------------------------------------------
http://xircles.codehaus.org/manage_email
--
Graeme Rocher
Grails Project Lead
SpringSource
Aaron Long
2013-07-11 03:28:59 UTC
Permalink
Domain class reloading is somewhat hit or miss in my experience. That's
especially true if you are changing persistent properties. Lari Hotari has
some changes still in the works that allow reloading the domain class
without reinitializing the session factory. That seems to help prevent some
of the MethodMissing issues that occur for us.

For everything else, reloading seems to work pretty well in interactive
mode (in 2.2.3).

BTW, you can disable the session factory reloading via:

hibernate {
reload = false
}
Post by Graeme Rocher
No it isn't expected. A JIRA with steps to reproduce would be helpful
Post by Scott Eisenberg
I did some simple tests with a newly created app. In general, I found
live reloading to work for me, with some caveats.
I could add new domains, add scaffold controller, add some fields,
refresh and it showed up.
Could make changes to the fields, wait just a little bit and then the
changed fields would appear.
This was all with database configured as "create-drop".
When I configured the database with "update", changes and refresh would
give a Missing Method error on the list method of the domain.
** Grails team, is this expected with the update config? Raise a Jira?
Mac, OSX 10.8.2, grails 2.2.3, Java 1.6.0_51-b11-457-11M4509
Post by Steve Hummingbird
reloading works fine here with 2.2.2 and 2.2.3. Here is something from
an older mail I've sent to the list, which usually helped me if I had
Post by Steve Hummingbird
"So, I updated my dependencies (resources to 1.2) , run
'refresh-dependencies' and 'clean' and it seems that reloading is back to
normal"
Post by Steve Hummingbird
Cheers,
Steve
Post by Scott Eisenberg
Anyone want to chime in on whether their reloading works from the
shell. Hard to believe it's universally broken.
Post by Steve Hummingbird
Post by Scott Eisenberg
Post by HarrySimons
Folks...? Are you there??
As part of my current Grails self-learning exercise, I anticipate
doing
Post by Steve Hummingbird
Post by Scott Eisenberg
Post by HarrySimons
"short code editing --> result inspection --> repeat..." cycles a few
dozen
Post by Steve Hummingbird
Post by Scott Eisenberg
Post by HarrySimons
times a day at least.
Thus, I'd really like to know about some solution or workaround.
If I'm the only one facing this issue, then what am I doing wrong?
And if
Post by Steve Hummingbird
Post by Scott Eisenberg
Post by HarrySimons
others too are facing this issue, then how are they are coping with
it?)
Post by Steve Hummingbird
Post by Scott Eisenberg
Post by HarrySimons
Many thanks in advance,
/HS
Post by Harry Simons
Hello,
I'm having a really difficult time getting Grails to pick my changes
from within the Grails shell (ie, from the 'grails> ' prompt).
1. I stop the app via a 'stop-app' (at the grails> prompt).
2. I make very simple edits to one of my domain classes using gedit.
3. I then do a 'run-app'. Grails does say 'Compiling 1 source files'
but doesn't pick up my edits.
I have tried a 'clean' followed by a 'run-app' and same results.
However, if I exit the Grails shell and say 'grails run-app', I can
see my edits taking effect. The problem is, restarting Grails during
development is proving to be very, VERY time consuming. Can somebody
please suggest a fix or a workaround, or at least confirm that this
is
Post by Steve Hummingbird
Post by Scott Eisenberg
Post by HarrySimons
Post by Harry Simons
a known problem.
Grails 2.2.2
Groovy 2.1.5
Java 1.6.0_43
Ubuntu 13.x
/HS
---------------------------------------------------------------------
http://xircles.codehaus.org/manage_email
--
http://grails.1312388.n4.nabble.com/Grails-2-2-2-Does-not-pick-up-changes-from-within-the-grails-shell-tp4646315p4646335.html
Post by Steve Hummingbird
Post by Scott Eisenberg
Post by HarrySimons
Sent from the Grails - user mailing list archive at Nabble.com.
---------------------------------------------------------------------
http://xircles.codehaus.org/manage_email
---------------------------------------------------------------------
http://xircles.codehaus.org/manage_email
---------------------------------------------------------------------
http://xircles.codehaus.org/manage_email
---------------------------------------------------------------------
http://xircles.codehaus.org/manage_email
--
Graeme Rocher
Grails Project Lead
SpringSource
Nicholas Wittstruck
2013-07-17 08:36:50 UTC
Permalink
I’m currently having similar issues with a newly created plugin. When I run a unit test changes in the service are not picked up. The GrailsProjectWatcher detects the change but it seems that the change is not applied.

Other grails apps are working fine, it’s just this plugin that is not working properly. I’m not sure if this is due to Mac OS X 10.9, but I’ve created a jira and attached an example project that shows this problem, maybe you can let me know if you can reproduce it:
http://jira.grails.org/browse/GRAILS-10255

Cheers,

Nick
Domain class reloading is somewhat hit or miss in my experience. That's especially true if you are changing persistent properties. Lari Hotari has some changes still in the works that allow reloading the domain class without reinitializing the session factory. That seems to help prevent some of the MethodMissing issues that occur for us.
For everything else, reloading seems to work pretty well in interactive mode (in 2.2.3).
hibernate {
reload = false
}
No it isn't expected. A JIRA with steps to reproduce would be helpful
I did some simple tests with a newly created app. In general, I found live reloading to work for me, with some caveats.
I could add new domains, add scaffold controller, add some fields, refresh and it showed up.
Could make changes to the fields, wait just a little bit and then the changed fields would appear.
This was all with database configured as "create-drop".
When I configured the database with "update", changes and refresh would give a Missing Method error on the list method of the domain.
** Grails team, is this expected with the update config? Raise a Jira?
Mac, OSX 10.8.2, grails 2.2.3, Java 1.6.0_51-b11-457-11M4509
Post by Steve Hummingbird
"So, I updated my dependencies (resources to 1.2) , run 'refresh-dependencies' and 'clean' and it seems that reloading is back to normal"
Cheers,
Steve
Post by Scott Eisenberg
Anyone want to chime in on whether their reloading works from the shell. Hard to believe it's universally broken.
Post by HarrySimons
Folks...? Are you there??
As part of my current Grails self-learning exercise, I anticipate doing
"short code editing --> result inspection --> repeat..." cycles a few dozen
times a day at least.
If I'm the only one facing this issue, then what am I doing wrong? And if
others too are facing this issue, then how are they are coping with it?)
Many thanks in advance,
/HS
Post by Harry Simons
Hello,
I'm having a really difficult time getting Grails to pick my changes
from within the Grails shell (ie, from the 'grails> ' prompt).
1. I stop the app via a 'stop-app' (at the grails> prompt).
2. I make very simple edits to one of my domain classes using gedit.
3. I then do a 'run-app'. Grails does say 'Compiling 1 source files'
but doesn't pick up my edits.
I have tried a 'clean' followed by a 'run-app' and same results.
However, if I exit the Grails shell and say 'grails run-app', I can
see my edits taking effect. The problem is, restarting Grails during
development is proving to be very, VERY time consuming. Can somebody
please suggest a fix or a workaround, or at least confirm that this is
a known problem.
Grails 2.2.2
Groovy 2.1.5
Java 1.6.0_43
Ubuntu 13.x
/HS
---------------------------------------------------------------------
http://xircles.codehaus.org/manage_email
--
View this message in context: http://grails.1312388.n4.nabble.com/Grails-2-2-2-Does-not-pick-up-changes-from-within-the-grails-shell-tp4646315p4646335.html
Sent from the Grails - user mailing list archive at Nabble.com.
---------------------------------------------------------------------
http://xircles.codehaus.org/manage_email
---------------------------------------------------------------------
http://xircles.codehaus.org/manage_email
---------------------------------------------------------------------
http://xircles.codehaus.org/manage_email
---------------------------------------------------------------------
http://xircles.codehaus.org/manage_email
--
Graeme Rocher
Grails Project Lead
SpringSource
Graeme Rocher
2013-07-09 08:14:33 UTC
Permalink
Check that reloading is actually enabled. This can be seen in the index.gsp
page of a new app.

If not try passing the -reloading flat when starting the shell:

grails -reloading

Cheers
Post by Harry Simons
Hello,
I'm having a really difficult time getting Grails to pick my changes
from within the Grails shell (ie, from the 'grails> ' prompt).
1. I stop the app via a 'stop-app' (at the grails> prompt).
2. I make very simple edits to one of my domain classes using gedit.
3. I then do a 'run-app'. Grails does say 'Compiling 1 source files'
but doesn't pick up my edits.
I have tried a 'clean' followed by a 'run-app' and same results.
However, if I exit the Grails shell and say 'grails run-app', I can
see my edits taking effect. The problem is, restarting Grails during
development is proving to be very, VERY time consuming. Can somebody
please suggest a fix or a workaround, or at least confirm that this is
a known problem.
Grails 2.2.2
Groovy 2.1.5
Java 1.6.0_43
Ubuntu 13.x
/HS
---------------------------------------------------------------------
http://xircles.codehaus.org/manage_email
--
Graeme Rocher
Grails Project Lead
SpringSource
awaltrip
2014-06-16 18:34:48 UTC
Permalink
I had the same problem with Grails 2.2.3. I created a test app, created the
domain classes, mucked with the DataSource.groovy and took a look at a
couple of other conf files, started the app (typed run-app from grails
command popup) , clicked on the only controller available
(databasemigration.DbdocController), went to the dbconsole, did not login to
the dbconsole, stopped the app, added some controllers, started the app,
none of the new controllers showed up.

The FIX was:
- right click project name in "Project Explorer".
- From the context menu select "Refresh"
- right click project name in "Project Explorer".
- From the context menu select:
- Run as -> 'Grails command (run-app)'

So the fix worked even after doing 'Grails Tools -> Refresh Dependencies'
didn't fix it.
- Still a great stack (my current favorite) but it take a bit of fiddling
with (~5-10 minutes).
Cheers,
Alex



--
View this message in context: http://grails.1312388.n4.nabble.com/Grails-2-2-2-Does-not-pick-up-changes-from-within-the-grails-shell-tp4646315p4657120.html
Sent from the Grails - user mailing list archive at Nabble.com.

---------------------------------------------------------------------
To unsubscribe from this list, please visit:

http://xircles.codehaus.org/manage_email

Continue reading on narkive:
Loading...