I'm trying to configure and test the Riak for Grails plugin. I've removed the hibernate plugin by removing it's dependency in BuildConfig. Note: I'm not attempting to use this against GORM - but merely querying using the spring data support.
I've had to add the following two lines to avoid errors at runtime after removing hibernate;
springConfig.addAlias "persistenceInterceptor", "riakPersistenceInterceptor"
springConfig.addAlias('transactionManager', 'riakTransactionManager')
The project compiles fine, and runs. However - as soon as I attempt to use any of the Riak methods I usually end up with a 404 - Object not found error, or something more elusive.
Documentation suggests I can use an autowired service;
import org.springframework.data.keyvalue.riak.core.RiakTemplate
class myClass {
// Service injection
def riakTemplate
def myMethod() {
riakTemplate.set("myBucket", "myKey", "A String")
}
}
But this doesn't work. I've tried;
RiakTemplate riakTemplate = new riakTemplate("serviceurl", "mapredurl")
riakTemplate.set("myBucket", "myKey", "A String")
I'm running out of ideas. Is there a guide or something helpful to get this working?
Its worth noting I have Riak running on my localhost, and I can manage keys using Curl easily enough. So I don't think it's a Riak issue.
I'm possibly missing something obvious. :)
I'm running Grails 2.1.0.
Thank you!