Search code examples
grailsriak

Riak for Grails Plugin


I am trying to use the Grails Riak plugin but I don't succeed.

Maybe I didn't get it, but I expect that the plugin let's me store my domain objects in a riak database: http://springsource.github.com/grails-data-mapping/riak/manual/guide/3.%20Object%20Mapping.html

But it seems since there is still a datasource defined, Grails just maps the object to the normal SQL database.

What am I doing wrong? How do I get the plugin to work?

Update:

uninstalling the Hibernate plugin seems not to work for Grails 2.0.x. After uninstalling, it seems to be automatically reinstalled.

For Grails 1.3.8, it works, but

grails install-plugin riak

will result in an error while downloading and installing it works:

grails install-plugin grails-riak-1.0.0.M4.zip

I've now configured my riak to listen on port 8091 (http://localhost:8091/buckets?buckets=true) and when I connect through a browser, I get a reply. But my Grails App complains java.net.ConnectException: Connection Refused

Update 2:

It seems that the riak plugin ignores my configuration - if a riak instance is configured for port 9098, the plugin manages to connect and works!


Solution

  • If you install the Riak plugin you have to uninstall the Hibernate plugin. Otherwise it will get confused as to which datastore you actually want to store data in.