question-mark
Stuck on an issue?

Lightrun Answers was designed to reduce the constant googling that comes with debugging 3rd party libraries. It collects links to all the places you might be looking at while hunting down a tough bug.

And, if you’re still stuck at the end, we’re happy to hop on a call to see how we can help out.

AnnotationCommandHandlerAdapter invokes proxy which lost references to it's fields

See original GitHub issue

Hello, Using this sample project I’d like to setup axon without event sourcing. Just want to have command/event handling of axon. When I register AnnotationCommandHandlerAdapter for my command handler, it turns out that handling method is invoked on proxy which doesn’t have references to it’s (constructor) injected fields. Handling method then results to Command 'com.github.bilak.axon.domain.command.CreateTodoCommand' resulted in java.lang.NullPointerException(null). If this doesn’t have to do anything with axon, let me know and I will post the issue in spring.

PS: could there be any example of axon configuration without event sourcing?

Issue Analytics

  • State:closed
  • Created 7 years ago
  • Comments:5 (2 by maintainers)

github_iconTop GitHub Comments

1reaction
FrankGrootcommented, Mar 2, 2017

You only need to specify the repository if the beanname is different from the default (would be todoEntityRepository in your case).

0reactions
bilakcommented, Mar 1, 2017

@abuijze thanks that works. Just last thing (sorry for bothering here and not writing to google group) … do I need to always specify repository name in @Aggregate annotation or is there another way? When defining repository all informations should be available, I don’t know the postprocess and retrieving of aggregate annotation at runtime of course so I’m wondering which methods are available.

@Bean
Repository<TodoEntity> todoRepository(EntityManagerProvider entityManagerProvider, EventBus eventBus) {
	Repository<TodoEntity> todoRepository = new GenericJpaRepository<TodoEntity>(
			entityManagerProvider,
			TodoEntity.class,
			eventBus
	);
	return todoRepository;
}
Read more comments on GitHub >

github_iconTop Results From Across the Web

17. Web MVC framework - Spring
The Spring Web model-view-controller (MVC) framework is designed around a DispatcherServlet that dispatches requests to handlers, with configurable handler ...
Read more >
Connecting from Joget hosted cloud instance of Joget to ...
I am trying to connect from a Joget hosted cloud instance of Joget to a MySQL ... IllegalArgumentException: Illegal group reference: group index...
Read more >
Abstract Method Error - java - Stack Overflow
java.lang.AbstractMethodError is thrown when an application tries to call an abstract method. Normally, this error is caught by the compiler; this error can ......
Read more >
Getting error "Injection of autowired dependencies failed" in ...
I have created a Spring MVC project using plugin sdk in liferay 7. ... ServiceBeanAopProxy.invoke(ServiceBeanAopProxy.java:173) at com.sun.proxy.$Proxy112.
Read more >
Spring Framework Reference Documentation
This document is a reference guide to Spring Framework features. ... where the container invokes a static , factory method on a class...
Read more >

github_iconTop Related Medium Post

No results found

github_iconTop Related StackOverflow Question

No results found

github_iconTroubleshoot Live Code

Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start Free

github_iconTop Related Reddit Thread

No results found

github_iconTop Related Hackernoon Post

No results found

github_iconTop Related Tweet

No results found

github_iconTop Related Dev.to Post

No results found

github_iconTop Related Hashnode Post

No results found