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-tracing-opentelemetry with Spring Devtools crashes on start #2828

Closed
tiger-seo opened this issue Sep 8, 2023 · 2 comments
Closed

axon-tracing-opentelemetry with Spring Devtools crashes on start #2828

tiger-seo opened this issue Sep 8, 2023 · 2 comments
Assignees
Labels
Priority 3: Could Low priority. Issues that are nice to have but have a straightforward workaround. Status: Resolved Use to signal that work on this issue is done. Type: Bug Use to signal issues that describe a bug within the system.
Milestone

Comments

@tiger-seo
Copy link

Basic information

  • Axon Framework version: 4.6
  • JDK version: 17
  • Complete executable reproducer if available (e.g. GitHub Repo):

Steps to reproduce

-add axon-tracing-opentelemetry to dependencies
-start application

Expected behaviour

application running successfully

Actual behaviour

application failed to run because of exception

Caused by: java.lang.ClassCastException: class org.axonframework.tracing.opentelemetry.OpenTelemetrySpanFactory cannot be cast to class org.axonframework.tracing.SpanFactory (org.axonframework.tracing.opentelemetry.OpenTelemetrySpanFactory is in unnamed module of loader 'app'; org.axonframework.tracing.SpanFactory is in unnamed module of loader org.springframework.boot.devtools.restart.classloader.RestartClassLoader @6084846e)

@tiger-seo tiger-seo added the Type: Bug Use to signal issues that describe a bug within the system. label Sep 8, 2023
@tiger-seo
Copy link
Author

i believe this can be fixed in the same way as in kafka - add the file https://github.com/AxonFramework/extension-kafka/blob/master/kafka/src/main/resources/META-INF/spring-devtools.properties

@smcvb smcvb added Priority 3: Could Low priority. Issues that are nice to have but have a straightforward workaround. Status: Resolved Use to signal that work on this issue is done. labels Sep 8, 2023
@smcvb smcvb self-assigned this Sep 8, 2023
@smcvb smcvb added this to the Release 4.8.2 milestone Sep 8, 2023
@smcvb
Copy link
Member

smcvb commented Sep 8, 2023

We've only recently noticed that the Spring configuration redesign we did in 4.6.0 of Axon Framework leads to the referred-to file no longer being required.
To be more exact, we actually dropped the entire spring-devtools.properties file from Axon Framework in this pull request.

As you can read from the referred-to PR, it will be included in the 4.8.2 release of Axon Framework, which we're planning to release today.
If you're not able to move to 4.8.2 yet, @tiger-seo, know that you can add the spring-devtools.properties file in your application too to achieve the same.
In doing so, you essentially take up the role that Axon Framework took in the past, which should let you move forward.
By the way, if you add the file, you need to define the axon-tracing-opentelemetry module to be included in restarted (just as with the Kafka version you're sharing).

Since the issue is resolved in a more recent version you can utilize soon, and the workaround easy, we've decided to close this issue as resolved.
Feel free to keep commenting here if necessary!

@smcvb smcvb closed this as completed Sep 8, 2023
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Priority 3: Could Low priority. Issues that are nice to have but have a straightforward workaround. Status: Resolved Use to signal that work on this issue is done. Type: Bug Use to signal issues that describe a bug within the system.
Projects
None yet
Development

No branches or pull requests

2 participants