Does anyone know if the latest Grails GORM for Mongo plugin supports GridFS?? Looked at the docs but couldn't find any information? If so please may you provide an example.
No, no support yet. You can create a feature request at http://jira.grails.org/browse/GPMONGODB
Related
I have a grails 3 application that makes heavy use of plugins. Some of these plugins provide domain classes. My application will not start unless every plugin has the same gorm version. This is an annoyance for locally developed plugins, but can be a significant problem for using third-party plugins.
There are more details in the stacktrace, but the relevant parts appear to be:
Caused by: org.grails.core.exceptions.GrailsRuntimeException: Failed to introspect class: class (my class name)
at grails.core.ArtefactHandlerAdapter.isArtefact(ArtefactHandlerAdapter.java:129)
at grails.core.DefaultGrailsApplication.addOverridableArtefact(DefaultGrailsApplication.java:772)
at org.grails.plugins.AbstractGrailsPluginManager.registerProvidedArtefacts(AbstractGrailsPluginManager.java:310)
I am currently using Grails 3.2.8 with GORM 6.1.3.RELEASE, but this happens with other non-matching versions for gorm as well.
If there is a better way to accomplish the bigger-picture goal, my big-picture goal is to use the grails ehcache plugin (currently at 3.0.0.M1) which requires gorm 6.1.x as a minimum. Per conversations on that plugin github site, there is no problem using gorm 6.1 with grails 3.2.x, though this is not the default.
Is there any way to run a grails 3 application, using plugins which provide domain objects, in which these plugins have different minor versions of gorm?
In case anyone else comes across this, the answer was basically "no".
The longer answer is "not as long as the groovy version is changing in non-backwards-compatible ways", and apparently that happens a lot.
There are some comments from Graeme here: https://github.com/grails/grails-core/issues/10693 but to summarize: you have to use the same version of gorm across plugins, and also make sure any third-party plugins you rely on are on the same version. This is only required for plugins that provide domain objects, at least!
I need suggestions on cache clustering for Grails at the most recent version I can get.
I've been trying to set up Terracotta with Grails 2.4.4 but I can't manage to find a compatible version of its plugin (by the way, the Terracotta plugin page says it was last updated 6 years ago). Also I can't find any recent posts on cache clustering for grails.
I'm planning on using it also for session replication. I'm using Apache Shiro for authentication/authorization. But that shouldn't matter.
Ehcache has an embedded distributed solution based on RMI. I'm gonna give it a try but I'm not sure it'll work for web sessions in grails since the documentation says to use Terracotta.
I need to implement some simple aggregations in my app powered by Grails 1.3.7. The mongodb-plugin of 1.0.0.RC3 ships with gmongo 0.9.1, where the aggregate functions are not implemented.
How can I solve the problem? Are there any hooks to call java-mongo API directly, or maybe there's some other plugin releases which allow aggregations?
TIA
It seems that Mongo aggregation apis exist since 2.1 here, probably you might need to upgrade your libraries.
Here is the mongodb plugin documentation which is talking about accessing low-level api. For grails 1.3.7 take at this blog for details on how to add more recent mongo libs into your Grails application and this post seems to have the same issue.
Hope it helps.
Aggregations only work in GMongo 1.0+.
Well, it seems to be impossible to do it with the existing gmongo/mongo-GORM. There are too many version clashes: different mongo java drivers, different groovy versions etc. I saw many ClassNotFoundExceptions and alike.
Luckily I don't need the aggregation functionality right now, so I'll just wait and upgrade to grails 2.x and mongo-GORM 1.3++ later
So, I made it!
with a little amount of the blood shed, I found a way to use aggregations in gmongo 0.9.1 / mongodb 1.0.0.RC3 / Grails 1.3.7!
HOWTO:
you need to replace the mongo-java-driver with a newer version (I used the most recent for now 2.9.3). In Grails it looks like:
dependencies {
compile 'org.mongodb:mongo-java-driver:2.9.3'
}
In BootStrap or in my case Plugin-descriptor add the following line:
DBCollectionPatcher.PATCHED_METHODS << 'aggregate'
The aggregation invocation looks like:
def res = Task.collection.aggregate( [ $group:[ _id:'totalTime', time:[ $sum:'$time' ] ] ], [] as DBObject ).results()
and it works like a charm!
I'm looking for a security plugin for a grails project.
Spring security core 1.2.7.3 looks awesome but it seems that it's not under development for almost a year. Does anyone knows if that is the case?
Also are there any other good plugins?
Also i'm using mongodb and wanted to know if spring security core is compatible with mongo
Thanks!
Roy
Take a look at the plugin again. It's supported by SpringSource. If no updates, no need in them. Don't think they just forget to update.
i'm looking for a rails plugin for open id authentication.
I'm using restful-authentication
Can you tip me any plugin?
Do you know any tutorials for using these plugins?
thanks
Use the open_id_authentication plugin maintain by Rails core team http://github.com/rails/open_id_authentication
When I tried this a few years ago, I had problems configuring Apache/mongrel. I vaguely remember with respect to Yahoo.
The plugin itself was easy to use!
Stephan