Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

axon-reactor-spring-boot-starter fails when spring-boot-devtools is on classpath #28

Closed
magnusheino opened this issue Feb 2, 2021 · 6 comments

Comments

@magnusheino
Copy link

axon-reactor-spring-boot-starter 4.5-SNAPSHOT
spring-boot 2.4.1

Remove devtools, and everything starts...


APPLICATION FAILED TO START


Description:

Parameter 0 of method reactiveCommandGateway in org.axonframework.extensions.reactor.autoconfig.ReactorAutoConfiguration required a bean of type 'org.axonframework.commandhandling.CommandBus' that could not be found.

Action:

Consider defining a bean of type 'org.axonframework.commandhandling.CommandBus' in your configuration.

Process finished with exit code 0

@smcvb
Copy link
Member

smcvb commented Feb 3, 2021

Thanks for bringing this to our attention @magnusheino.
As it stands the solution to this has already been provided to the project, in issue #5 to be exact.
The only issue in your scenarios is that this hasn't seen an actual release yet.

To resolve this for you, you can go three ways:

  1. Wait until the release is there (note: release date is unsure at the moment.
  2. Use a snapshot release
  3. Add your own resources/META-INF/spring-devtools.properties file in your project, which contains the following:
restart.include.axon-reactor=axon-reactor-${insert-reactor-extension-verion-here}.jar
restart.include.axon-reactor-spring-boot-autoconfigure=axon-reactor-spring-boot-autoconfigure-${insert-reactor-extension-verion-here}.jar

I will be closing this issue as the project itself already has seen a solution to this problem.
Trusting to have clarified your options sufficiently @magnusheino!

@smcvb smcvb closed this as completed Feb 3, 2021
@smcvb smcvb self-assigned this Feb 3, 2021
@smcvb smcvb added this to the Release 4.4.3 milestone Feb 3, 2021
@magnusheino
Copy link
Author

Great, I can make that work provided your information.

(However, #5 is merged into axon-reactor-4.4.x branch only and is not available in the 4.5-SNAPSHOT release that I guess is coming out of master? Maybe that is intended?)

@smcvb
Copy link
Member

smcvb commented Feb 3, 2021

Ah, that's definitely not intended.
I'll push the current changes on 4.4.x to master.
This should trigger a snapshot release too, containing the aforementioned adjustment.

Thanks for spotting this @magnusheino!

@magnusheino
Copy link
Author

magnusheino commented Feb 4, 2021

Got the new snapshot.

It seems as some expansion has failed? spring-devtools.properties exists, but the content is:

restart.include.axon-reactor=axon-reactor-${project.version}.jar
restart.include.axon-reactor-spring-boot-autoconfigure=axon-reactor-spring-boot-autoconfigure-${project.version}.jar

...that causes this error:

...
at org.springframework.boot.SpringApplication.run(SpringApplication.java:317)
at org.springframework.boot.SpringApplication.run(SpringApplication.java:1311)
at org.springframework.boot.SpringApplication.run(SpringApplication.java:1300)
at se.lantmateriet.applikationslistan.app.ApplikationslistanKt.main(Applikationslistan.kt:13)
Caused by: java.util.regex.PatternSyntaxException: Illegal repetition near index 13
axon-reactor-${project.version}.jar
^
at java.base/java.util.regex.Pattern.error(Pattern.java:2027)
at java.base/java.util.regex.Pattern.closure(Pattern.java:3320)
at java.base/java.util.regex.Pattern.sequence(Pattern.java:2213)
at java.base/java.util.regex.Pattern.expr(Pattern.java:2068)
at java.base/java.util.regex.Pattern.compile(Pattern.java:1782)
at java.base/java.util.regex.Pattern.(Pattern.java:1428)
at java.base/java.util.regex.Pattern.compile(Pattern.java:1068)
at org.springframework.boot.devtools.settings.DevToolsSettings.lambda$getPatterns$0(DevToolsSettings.java:69)
at java.base/java.util.concurrent.ConcurrentHashMap.forEach(ConcurrentHashMap.java:1603)
at java.base/java.util.Properties.forEach(Properties.java:1443)
at org.springframework.boot.devtools.settings.DevToolsSettings.getPatterns(DevToolsSettings.java:66)
at org.springframework.boot.devtools.settings.DevToolsSettings.add(DevToolsSettings.java:58)
at org.springframework.boot.devtools.settings.DevToolsSettings.load(DevToolsSettings.java:109)
... 25 more

Process finished with exit code 1

@smcvb
Copy link
Member

smcvb commented Feb 4, 2021

I've seen this before, but am slightly weirded out by it.
That exact same approach works locally and is what all the other extensions of Axon, including framework itself, do to resolve the version automatically.

I'll reopen this issue to have a gander at it on a later point in time.
Sadly, I don't have any left to look at this right now.
If you feel up for the task @magnusheino, that would be much appreciated.

@smcvb smcvb reopened this Feb 4, 2021
smcvb added a commit that referenced this issue Apr 6, 2021
Add maven-jar-plugin to replace the project version in the
spring-devtools.properties file

Resolves #28
@smcvb
Copy link
Member

smcvb commented Apr 6, 2021

Sorry for the long wait here @magnusheino. I spotted the problem, which was a missing build plugin to ensure the project place holder was replaced by the actual project version.
Closing this issue for the time being, to start a 4.4.3 release. Let us know if the problem prevails.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

2 participants