I am having no luck in configuring the Disruptor command bus. I keep receiving these exceptions:
Caused by: org.springframework.beans.factory.BeanCreationException: Error creating bean with name '(inner bean)': Invocation of init method failed; nested exception is org.springframework.beans.factory.BeanCreationException: Error creating bean with name 'exampleRepository': Cannot resolve reference to bean 'commandBus' while setting constructor argument; nested exception is org.springframework.beans.factory.BeanCreationException: Error creating bean with name 'commandBus': Cannot resolve reference to bean 'eventBus' while setting constructor argument; nested exception is org.springframework.beans.factory.BeanCurrentlyInCreationException: Error creating bean with name 'eventBus': Requested bean is currently in creation: Is there an unresolvable circular reference?
Caused by: org.springframework.beans.factory.BeanCreationException: Error creating bean with name 'exampleRepository': Cannot resolve reference to bean 'commandBus' while setting constructor argument; nested exception is org.springframework.beans.factory.BeanCreationException: Error creating bean with name 'commandBus': Cannot resolve reference to bean 'eventBus' while setting constructor argument; nested exception is org.springframework.beans.factory.BeanCurrentlyInCreationException: Error creating bean with name 'eventBus': Requested bean is currently in creation: Is there an unresolvable circular reference?
Caused by: org.springframework.beans.factory.BeanCreationException: Error creating bean with name 'commandBus': Cannot resolve reference to bean 'eventBus' while setting constructor argument; nested exception is org.springframework.beans.factory.BeanCurrentlyInCreationException: Error creating bean with name 'eventBus': Requested bean is currently in creation: Is there an unresolvable circular reference?
Caused by: org.springframework.beans.factory.BeanCurrentlyInCreationException: Error creating bean with name 'eventBus': Requested bean is currently in creation: Is there an unresolvable circular reference?
Related cause:
org.springframework.beans.factory.BeanCurrentlyInCreationException: Error creating bean with name 'exampleRepository': Requested bean is currently in creation: Is there an unresolvable circular reference?
My Spring configuration is rather minimal:
<context:annotation-config/>
<axon:annotation-config/>
<axon:event-bus id="eventBus"/>
<axon:jpa-event-store
id="eventStore"
event-serializer="xStreamSerialiser"/>
<bean id="commandTargetResolver" class="com.example.PackageCommandTargetResolver"/>
<axon:disruptor-command-bus
id="commandBus"
event-store="eventStore"
event-bus="eventBus"
command-target-resolver="commandTargetResolver"
>
<axon:repositories>
<axon:repository id="exampleRepository" aggregate-type="com.example.ExampleAggregrate"/>
</axon:repositories>
</axon:disruptor-command-bus>
<bean id="xStreamSerialiser"
class="com.example.XStreamSerializerFactory"/>
Is there something obvious in my configuration that I am missing?
Thanks,
Randy.