Hello. I have an old project in grails 3.3.10 and ...
# questions
a
Hello. I have an old project in grails 3.3.10 and try to migrate to 4.0.4 (stp by step, finally to 7) I have problem with cmds
Caused by: groovy.lang.MissingMethodException: No signature of method: ......findConstraintsEvaluator() is applicable for argument types: () values: []
I can not find a solution. I asked AI 😄 and it told me to inject GrailsApplication to every Validateable class… there is hundreds of them.. is is this really it?
s
I see no reason to do an intermediate step to 4.x before going to 7.0.x The error in questions sounds weird, but I'm gonna need more context to know what's going on.
a
I have a big legacy project. I can not upgrade right to 7. I need to do it slowly because of mass of changes in next versions. I need to do this because of the business guys 😄 I need to show them it’s possible to do an upgrade. 4.x will be faster than 7.x and good for start
s
I just worry, that you will have a hard time finding people that has or can remember as far back as 4.0.4, and so you might get stuck just doing that upgrade.
If you worry about going to 7.x (and that is understandable) I'd suggest 6.2.4 which has long been proving stable.
a
I know.. but project has complicated security. with 4x it can stay without changes.. but not with 6x..
s
Ok. I hope you find a way through. The two questions you posted sounds like wrong dependencies. My advice would be to make a vanilla Grails 4.0.4 and find the versions of the plugins you need in the correct version (this is probably the tricky part)
a
my current error is ~
Copy code
> Task :auth:compileGsonViews FAILED
Error: Could not find or load main class grails.plugin.json.view.JsonViewCompiler
try with
Copy code
implementation "org.grails.plugins:views-json:$jsonViewsVersion"
    implementation "org.grails.plugins:views-json-templates:$jsonViewsVersion"
2.0.4 and 2.0.3.. and all before 2.1.x without gradle update to 6.x but without success
s
Rule #1 Use the gradle versions provided (as it's most likely to work correctly)
From a vanilla Grails 4.0.4 app created with
Copy code
grails create-app g404-app-gson --feature json-views
Copy code
❯ ./gradlew --version

------------------------------------------------------------
Gradle 5.6.4
------------------------------------------------------------
json-views
is probably tightly bound to the grails-version
This is my vanilla dependencies graph
Copy code
./gradlew dependencies