Struggling with Configuration for Saga

344 views
Skip to first unread message

anshul agarwal

unread,
Aug 9, 2017, 9:54:32 AM8/9/17
to Axon Framework Users

Getting below error during application start up. Is there a good example on Spring Boot Configuration for Saga. The only thing I am struggling while working with Axon is configuration.
Also, couldn't figure out how to change serializer to jackson serializer for event store. I am using Mongo Event Storage Engine.


java.lang.NoSuchMethodException: com.yyyyy.client.XXXXXSaga.<init>()
at java.lang.Class.getConstructor0(Class.java:3082) ~[na:1.8.0_112]
at java.lang.Class.newInstance(Class.java:412) ~[na:1.8.0_112]
at org.axonframework.eventhandling.saga.AnnotatedSagaManager.newInstance(AnnotatedSagaManager.java:42) ~[axon-core-3.0.5.jar:3.0.5]
at org.axonframework.eventhandling.saga.AnnotatedSagaManager.lambda$new$1(AnnotatedSagaManager.java:69) ~[axon-core-3.0.5.jar:3.0.5]

Allard Buijze

unread,
Aug 9, 2017, 10:06:50 AM8/9/17
to Axon Framework Users
Hi,

does your Saga have a default constructor?
You can configure a Serializer just by defining it as a bean in your application context.

Allard
--
You received this message because you are subscribed to the Google Groups "Axon Framework Users" group.
To unsubscribe from this group and stop receiving emails from it, send an email to axonframewor...@googlegroups.com.
For more options, visit https://groups.google.com/d/optout.

anshul agarwal

unread,
Aug 10, 2017, 10:29:58 AM8/10/17
to Axon Framework Users
Thank you Allard. This solves both my issues. 
As I am spending more and more time with Axon, I am really liking it and somewhat amazed by some of the functionalities which really simplifies our microservice development.

My Saga Event handler method is getting triggered twice for the same aggregate id every time I submit a request. Any clue on what might be causing this?

anshul agarwal

unread,
Aug 10, 2017, 3:43:17 PM8/10/17
to Axon Framework Users
I was able to resolve this with help of your comment on this thread https://groups.google.com/forum/#!topic/axonframework/qPiqexYxQJs.

Thanks for your help
Reply all
Reply to author
Forward
0 new messages