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.

Axon doesn't work in combination with spring-boot-dev-tools on class path

See original GitHub issue

Axon version: 3.0.2 With: spring-boot-axon + H2 + No cache repository

If you add spring-boot-dev-tools in your class path, axon will not work. I am not sure, but spring-boot-dev-tools will change the path class name of event message object and during the publishing this event will not match.

I make an example here -> https://github.com/moifort/axon-sample-with-spring-dev-tools

Make the test by removing/adding spring-boot-dev-tools dependency

Issue Analytics

  • State:closed
  • Created 7 years ago
  • Comments:16 (9 by maintainers)

github_iconTop GitHub Comments

2reactions
pbitcommented, Mar 6, 2017

Did some test with the sample project given by @moifort The Axon jars are just one part, the serializer has to be included too. What finally worked:

restart.include.axon-core=axon-core-3.0.2.jar
restart.include.axon-spring=axon-spring-3.0.2.jar
restart.include.axon-spring-boot-autoconfigure=axon-spring-boot-autoconfigure-3.0.2.jar
restart.include.xstream=xstream-1.4.9.jar

Depending on the serializer chosen by the developer you have to include more dependencies (with unknown side effects). I think this should not be handled by Axon. Just add a section to the README and give some examples for common use cases.

1reaction
smcvbcommented, Apr 6, 2020

We’ve prioritized a fix/solution for the spring-dev-tools issue in #1382 for release 4.4. That issue links to the majority of the created issues around spring-dev-tools, although I forget to reference this one; sorry for that unclarity.

By the way, the file you’re referencing was intended as a fix for the users, although it indeed doesn’t work as expected.

Read more comments on GitHub >

github_iconTop Results From Across the Web

How to fix problem of spring-boot-devtools with axon?
I have to use spring-boot-devtools & axon in spring-boot application. I have included both of them in pom.xml. It is not working.
Read more >
Spring Boot - Axon Reference Guide
When Axon Spring Boot application starts up, it looks for a file named spring.factories in the classpath . This file is located in...
Read more >
20. Developer tools - Spring
As DevTools monitors classpath resources, the only way to trigger a restart is to update the classpath. The way in which you cause...
Read more >
Trouble configuring AxonDB - Google Groups
I have a working spring boot axon 3.2 application and I am having ... with name 'eventBus' defined in class path resource [com/fedexx/AxonConfig.class]: ......
Read more >
Upgrading to Axon 4 from 3.x - Medium
One of the problems with Axon 3.x was the way the configuration was built. If you didn't use the Spring Boot auto configuration,...
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