opened
thevoiceofzeke
username_0
The version of Gradle you connect to does not support that method.

This error also occurs with Grails 3.0.3 but does not occur with 3.0.1.
Grails 3.0.4 incompatible with Gradle 2.3
issue
created
jeffbrown
username_1
Can you push a sample app which demonstrates the error to github?

Thanks for the feedback.
comment
created
thevoiceofzeke
username_0
Hello,
I'd like to but I can't push the app I'm working on. I'll have to build a new one and try to duplicate the error, which may take some time. I'll email you again when/if I get around to doing that. Is #9147 referring to the bug report number? If so, I'll include it in my next email.
-Zeke W.

Date: Wed, 29 Jul 2015 12:23:47 -0700
comment
created
graemerocher
username_2
This happens when you have an incompatible Gradle daemon running in the background. To fix the problem you need to stop the daemon so it can be restarted with a compatible version:

    $ gradle --stop
comment
created
MauiMana
username_3
Same issue happens to me. I'm running latest grails (3.0.4) with latest grade (2.5) (on MAC OS X). What to do???
comment
created
thevoiceofzeke
username_0
In our case, reverting to grails 3.0.1 ($ gvm use grails 3.0.1) solved the problem. It even worked after reverting to 3.0.1 and then going back to 3.0.4. We have no idea why that worked, but it did. Best of luck!

Date: Tue, 4 Aug 2015 13:24:19 -0700
comment
created
orubel
username_4
Running into this issue too with Java 8. Did a 'ps -aux | grep gradle' and no gradle daemons running but did notice that Java 8 is running Gradle 2.3. 

I went ahead and downloaded that and loaded that as GRADLE_HOME but still running into same issue.
comment
created
orubel
username_4
There are still errors with this it appears; it seems to always assume a domain as a resource. A resource can be a linkedhashmap, a commandobject, an algorithm, a list,  an enum, etc. The method needs to allow for a generic Object or Model to be passed or for for passed Object to be easily converted to the generic type.

Spring uses Model and since after() in handlerInterceptor can NEGATE view, this could return both ModelAndView or Model (depending on the compiled state of handlerInterceptor).

As of right now, this is still broken as render does not work with 'after' in handlerInterceptor' and this does not work with anything besides domain resource it appears.
comment
created
orubel
username_4
Here we go. Just tested it in the simplest form and duplicated the error.

https://github.com/username_4/testapp
comment
closed
graemerocher
username_2
issue
created
graemerocher
username_2
This would happen if you have an older version of Gradle running as a daemon in the background. Prior to starting Grails do:

      gradle --stop

Then try again
comment
created
sapanparikh18
username_5
@username_2 even after running  gradle --stop we get the same error. Even upgraded to Gradle 2.7 and still no luck
comment
created
sapanparikh18
username_5
@username_2 here is the screenshot of the error and I have just cloned the project from here https://github.com/dspies/grails-3-with-security and renamed the folder

![image](https://cloud.githubusercontent.com/assets/1727880/10039544/12ec04b8-61a1-11e5-9eaa-cb3920379628.png)
comment
created
graemerocher
username_2
@username_5 Try `kill -9 java`, there is clearly a process running, not sure why `gradle --stop` doesn't prevent that. We probably need to add a `grails --restart-daemon` command or something to control what the daemon is doing...
comment
created
sapanparikh18
username_5
@username_2 using windows, so kill did not work! but killed java processes from task manager. Even restarted the machine and still facing the same issue 
![image](https://cloud.githubusercontent.com/assets/1727880/10041721/37447580-61b4-11e5-88a4-855c59e53b28.png)
comment
created
graemerocher
username_2
Ok will make another attempt to reproduce on Windows, but almost certainly something to do with your environment, as this is not a general issue.
comment
created
graemerocher
username_2
@username_5 No luck reproducing sorry. Can you upload an example that reproduces the problem to github?
comment
created
paulerickson
username_6
Same here - no gradle daemons running.  I think it may be important to clean or start fresh because, once built with 3.0.1, we were able to upgrade (`gvm use gradle 3.0.4`) and then run grails successfully (for a while).

Now I'm having this issue with 3.0.7 on another project.  It ran for me locally and then blew up on the build box.  So I'll have to futz with it and try to reproduce, but it seems like previously built sources fix/mask the problem, but it crops up on clean builds.
comment
created
graemerocher
username_2
@username_6 Check your gradle wrapper versions and `gradle.properties` have been updated to ensure the version of Gradle is consistent
comment
created
paulerickson
username_6
```
I updated gradle.properties and repeated, with the same effect.
comment
created
paulerickson
username_6
Well that was an [issue with the dependency-management-plugin](https://github.com/spring-gradle-plugins/dependency-management-plugin/issues/54).  I updated it to 0.5.2.RELEASE and was able to update the gradle wrapper... but that just led to other runtime exceptions, so I'm thinking upgrading gradle is not the way to go.

To your original point: yes, gradle.properties and gradlew were both consistent at 2.3.
comment
created
sapanparikh18
username_5
@username_2 You can pull the code from https://github.com/dspies/grails-3-with-security and rename the folder and try running grails
comment
created
graemerocher
username_2
@username_5 Tested with Grails 3.0.7, after changing the `grailsVersion` in `gradle.properties` and changing the `io.spring.dependency-management` plugin in `build.gradle` to `0.5.2.RELEASE` it runs works for me.

Just to be sure I did `killall java` to stop all background Java processes (Gradle daemons for example) and it works. I will try now to reproduce on Windows...
comment
created
sapanparikh18
username_5
@username_2 you are right I went to the gradle.properties and changed the file to the following
`grailsVersion=3.0.7
gradleWrapperVersion=2.7`

And it started working. Thanks a lo
comment
created
graemerocher
username_2
@username_5 No problem, as I said before it is generally something misconfigured or local to the environment. @username_6 If you can provide an example to reproduce happy to again take another look
comment
created
paulerickson
username_6
I appreciate it @username_2 , but if updating seems to resolve it, then I'll focus on doing that and try to work out whatever broke in the process, rather than reproducing.  Thanks!
comment
created
orubel
username_4
This happens if you delete the /build/.dependencies i found out :)

I was running into an issue on an upgrade where the .dependies file kept outputting on 'clean' or 'install' so I thought I would just delete and hopefully it would repop. No such luck. :)
comment
created
monksy
username_7
I solved this issue when I found that I had an older version of grails defined in my project and my installation of Grails was a much higher version.
comment
created
johedl
username_8
Same here, the version of Grails defined in gradle.properties should be the same as the one installed under "GRAILS_HOME".
comment
created
KentDevWeb
username_9
Thanks @username_4 , it works for me !
comment