Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Missing DefaultGroovyMethods.collect on startup of Grails 3.3.16 app with Gorm-MongoDB 7.0.2 #567

Open
seanhastings opened this issue Mar 29, 2023 · 0 comments

Comments

@seanhastings
Copy link

Background

When trying to upgrade the Mongo GORM plugin to the latest 7.0.x on Grails version 3.3.16, running the application gives the following error on startup:

***************************
APPLICATION FAILED TO START
***************************

Description:

An attempt was made to call the method org.codehaus.groovy.runtime.DefaultGroovyMethods.collect([Ljava/lang/Object;Lgroovy/lang/Closure;)Ljava/util/List; but it does not exist. Its class, org.codehaus.groovy.runtime.DefaultGroovyMethods, is available from the following locations:

    jar:file:/Users/shastings/.gradle/caches/modules-2/files-2.1/org.codehaus.groovy/groovy/2.4.21/abbb8d83268f3243a57d9f7768e159373a4e378/groovy-2.4.21.jar!/org/codehaus/groovy/runtime/DefaultGroovyMethods.class

It was loaded from the following location:

    file:/Users/shastings/.gradle/caches/modules-2/files-2.1/org.codehaus.groovy/groovy/2.4.21/abbb8d83268f3243a57d9f7768e159373a4e378/groovy-2.4.21.jar

It seems that the List collect(Object, Closure) method can't be found, but I can see it in the decompiled source of that class, so I'm not sure what's going wrong here. I've tried deleting the Gradle cache mentioned and allowing it to rebuild, but still get the same error afterward.

Recreation Steps

  1. Create a clean 3.3.16 Grails application.
    grails create-app
  2. Add the Mongo GORM dependency to build.gradle
    compile 'org.grails.plugins:mongodb:7.0.2'
  3. Run the application
    grails run-app

Sample project

https://github.com/seanhastings/missing-method-example

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant