Axon with Fongo?

Hi,

I’ve tried to replace my MongoDb configuration in spring config with the usage of Fongo to make it possible to run all my unit tests with an embedded database. I get some issues, and wonder if someone in this forum are able to spot the issue?

My spring config can be found here: http://pastie.org/private/55ivkpvb6rg2lkcprmm6vq

and the error I get is like this:

Related cause:
org.springframework.beans.factory.UnsatisfiedDependencyException: Error creating bean with name ‘eventStore’ defined in class path resource [spring-context-test.xml]: Unsatisfied dependency expressed through constructor argument with index 0 of type [org.axonframework.serializer.Serializer]: Could not convert constructor argument value of type [org.springframework.data.mongodb.core.MongoTemplate] to required type [org.axonframework.serializer.Serializer]: Failed to convert value of type ‘org.springframework.data.mongodb.core.MongoTemplate’ to required type ‘org.axonframework.serializer.Serializer’; nested exception is java.lang.IllegalStateException: Cannot convert value of type [org.springframework.data.mongodb.core.MongoTemplate] to required type [org.axonframework.serializer.Serializer]: no matching editors or conversion strategy found

any directions you can kick me in? If I’m able to make this work, it might be a good example for anyone else wanting to replace a MongoDB instance installed locally with an embedded Fongo instead for testing purposes.

Best regards,
Viggo

It looks like the mongo event store requires a reference to the serializer as well:

Could not convert constructor argument value of type [org.springframework.data.mongodb.core.MongoTemplate] to required type [org.axonframework.serializer.Serializer]

Check out the exact constructor arguments for the MongoEventStore.
Cheers,

Allard