Vinny
Vinny

Reputation: 797

Best version of the mongodb gorm plugin for grails 2.2.x?

Will the current MongoDB GORM plugin work on grails 2.2.x versions ? Specifically grails 2.2.3. Just a note, upgrading to grails 2.3 is really not an easy option for this app.

Upvotes: 0

Views: 735

Answers (4)

Vinny
Vinny

Reputation: 797

After experimenting with various combinations. I have found that it's the 1.3.3 version of mongodb that worked for my grails version 2.2.3.

additional notes:

I also had to use the 1.1.9 versions grails-datastore-core and grails-datastore-simple as the 1.1.8 versions were causing a class def not found for StatelessDatastore.

I use maven for my build so the final dependencies I added look like this:

<dependency>
    <groupId>org.grails.plugins</groupId>
    <artifactId>mongodb</artifactId>
    <version>1.3.3</version>
    <scope>compile</scope>
    <type>zip</type>
</dependency>

<dependency>
    <groupId>org.grails</groupId>
    <artifactId>grails-datastore-core</artifactId>
    <version>1.1.9.RELEASE</version>
    <scope>compile</scope>
</dependency>

<dependency>
    <groupId>org.grails</groupId>
    <artifactId>grails-datastore-simple</artifactId>
    <version>1.1.9.RELEASE</version>
    <scope>compile</scope>
</dependency>

Thanks for the replies everyone.

Upvotes: 1

Jean-Louis Jouannic
Jean-Louis Jouannic

Reputation: 148

After a few tests, the last version of the mongodb Grails plugin compatible with Grails 2.2.x (2.2.4 in my case) seems to be 1.3.3.

Trying to use the version after (2.0.0) gives the following:

Plugin mongodb-2.0.0 requires version [2.3.2 > *] of Grails which your current Grails installation does not meet

Upvotes: 2

injecteer
injecteer

Reputation: 20699

watch out!

mongo 3.0.1 uses updated version of gorm/hibernate libs, which are incompatible with the ones delivered with hibernate:3.6.10.13 (the most recent version is 3.6.10.14, but when I try getting it, the dependency couldn't be resolved). That means, that the libs in the older versions of hibernate plugin can not be newer than that.

see or in namedQueries in Grails 2.3.8: AbstractMethodError for details.

I had to switch from 3.0.1 back to 3.0.0. If you want to upgrade you mongo java driver, you can do it via dependencies w/o upgrading the grails plugin. Heck! I even used aggregation in mongodb:1.0.0.RC3 :)

Upvotes: 0

Roberto Perez Alcolea
Roberto Perez Alcolea

Reputation: 1414

You can use the latest one: 3.0.1

This version has support for mongodb 2.6

Upvotes: 1

Related Questions