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-kafka-spring-boot-starter fails when spring-boot-devtools enabled #240

Closed
tiger-seo opened this issue Jan 28, 2022 · 4 comments
Closed

Comments

@tiger-seo
Copy link

Basic information

  • Axon Framework version: 4.5.8
  • JDK version: 17.0.2
  • Kafka Extension version: 4.5.2
  • Complete executable reproducer if available (e.g. GitHub Repo):

Stack Trace:
Exception in thread "main" java.lang.IllegalStateException: Unable to load devtools settings from location [META-INF/spring-devtools.properties]
at org.springframework.boot.devtools.settings.DevToolsSettings.load(DevToolsSettings.java:118)
at org.springframework.boot.devtools.settings.DevToolsSettings.load(DevToolsSettings.java:101)
at org.springframework.boot.devtools.settings.DevToolsSettings.get(DevToolsSettings.java:95)
at org.springframework.boot.devtools.restart.ChangeableUrls.(ChangeableUrls.java:56)
at org.springframework.boot.devtools.restart.ChangeableUrls.fromUrls(ChangeableUrls.java:187)
at org.springframework.boot.devtools.restart.ChangeableUrls.fromUrls(ChangeableUrls.java:183)
at org.springframework.boot.devtools.restart.ChangeableUrls.fromClassLoader(ChangeableUrls.java:101)
at org.springframework.boot.devtools.restart.DefaultRestartInitializer.getUrls(DefaultRestartInitializer.java:86)
at org.springframework.boot.devtools.restart.DefaultRestartInitializer.getInitialUrls(DefaultRestartInitializer.java:42)
at org.springframework.boot.devtools.restart.Restarter.(Restarter.java:141)
at org.springframework.boot.devtools.restart.Restarter.initialize(Restarter.java:549)
at org.springframework.boot.devtools.restart.RestartApplicationListener.onApplicationStartingEvent(RestartApplicationListener.java:90)
at org.springframework.boot.devtools.restart.RestartApplicationListener.onApplicationEvent(RestartApplicationListener.java:50)
at org.springframework.context.event.SimpleApplicationEventMulticaster.doInvokeListener(SimpleApplicationEventMulticaster.java:176)
at org.springframework.context.event.SimpleApplicationEventMulticaster.invokeListener(SimpleApplicationEventMulticaster.java:169)
at org.springframework.context.event.SimpleApplicationEventMulticaster.multicastEvent(SimpleApplicationEventMulticaster.java:143)
at org.springframework.context.event.SimpleApplicationEventMulticaster.multicastEvent(SimpleApplicationEventMulticaster.java:131)
at org.springframework.boot.context.event.EventPublishingRunListener.starting(EventPublishingRunListener.java:79)
at org.springframework.boot.SpringApplicationRunListeners.lambda$starting$0(SpringApplicationRunListeners.java:56)
at java.base/java.util.ArrayList.forEach(ArrayList.java:1511)
at org.springframework.boot.SpringApplicationRunListeners.doWithListeners(SpringApplicationRunListeners.java:120)
at org.springframework.boot.SpringApplicationRunListeners.starting(SpringApplicationRunListeners.java:56)
at org.springframework.boot.SpringApplication.run(SpringApplication.java:293)
at org.springframework.boot.SpringApplication.run(SpringApplication.java:1303)
at org.springframework.boot.SpringApplication.run(SpringApplication.java:1292)
at com.example.CoreApplication.main(CoreApplication.java:10)
Caused by: java.util.regex.PatternSyntaxException: Illegal repetition near index 13
axon-kafka-${project.version}.jar
^
at java.base/java.util.regex.Pattern.error(Pattern.java:2028)
at java.base/java.util.regex.Pattern.closure(Pattern.java:3309)
at java.base/java.util.regex.Pattern.sequence(Pattern.java:2214)
at java.base/java.util.regex.Pattern.expr(Pattern.java:2069)
at java.base/java.util.regex.Pattern.compile(Pattern.java:1783)
at java.base/java.util.regex.Pattern.(Pattern.java:1430)
at java.base/java.util.regex.Pattern.compile(Pattern.java:1069)
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:1422)
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

Steps to reproduce

run application with Axon Framework and Kafka extension

Expected behaviour

application run

Actual behaviour

application not run , because of exception

To me , this problem is similar to AxonFramework/extension-reactor#28 (comment) from issue #28 , but here , from what i have found debugging , jar build plugin is configured , but version tag is missing in pom.xml, so project.version property is also missing. So , i think , this problem can be fixed by adding version tag to pom.xml.

@smcvb
Copy link
Member

smcvb commented Jan 31, 2022

Thanks for bringing this to our attention, @tiger-seo!
We completely missed this when we revamped the pom files of the Kafka extension.

I agree with you in that I assume the missing section to be the resources part from the build section.
I'll add this and validate it right away.

@smcvb smcvb modified the milestones: Release 4.6.0, Release 4.5.3 Jan 31, 2022
@smcvb smcvb self-assigned this Jan 31, 2022
smcvb added a commit that referenced this issue Jan 31, 2022
Add directory src/main/resources and filtering to true. This ensures
that e.g. {project.version} in resource files are replaced too. This is
mandatory to have the spring-devtools.properties updated with the kafka
version each time.

Resolves #240
smcvb added a commit that referenced this issue Jan 31, 2022
Add directory src/main/resources and filtering to true. This ensures
that e.g. {project.version} in resource files are replaced too. This is
mandatory to have the spring-devtools.properties updated with the kafka
version each time.

Resolves #240
@smcvb
Copy link
Member

smcvb commented Jan 31, 2022

Closing this issue as commit 9bc2345 resolves it.

@smcvb
Copy link
Member

smcvb commented Jan 31, 2022

By the way, I've made a 4.5.3 release containing the aforementioned fixing commit.
Please give it a try, @tiger-seo, and let us know whether it resolves the predicament for you too!

@tiger-seo
Copy link
Author

@smcvb thank u very much for quick actions - the issue has gone ;)

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