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.

SagaCreationException causes are obfuscated

See original GitHub issue

While developing a toy application I encountered a problem with saga creation. The exact problem was difficult to determine because of the exception handling hierarchy and minimal log output from the framework. For instance, the only feedback from Axon is from a log message produced by DefaultCommandGateway that looks like:

$ 2018-08-23 15:17:38.761  WARN 64992 --- [nio-8080-exec-3] o.a.c.gateway.DefaultCommandGateway      : Command 'com.example.command.StartRegistrationCommand' resulted in org.axonframework.eventhandling.saga.repository.SagaCreationException(An error occurred while attempting to create a new managed instance)

After digging around the source code and not finding anything that would log the underlying cause, I went ahead and installed a patch in my local Maven repository to afford myself more verbose log output (because I’m a bad debugger). I added a logger and some output in the AnnotatedSagaRepository::doCreateInstance method since that appears to be closest to the exception. Turns out, I didn’t have an EventScheduler bean in my Spring Application context, of which the saga had a dependency on.

Maybe this is by design, or I’m missing something altogether, but I would expect some way to learn about the underlying cause of a saga not being able to be created via some log output from Axon.

Finally, and this is unrelated to the aforementioned issue, but is it also by design that the axon-spring-boot-autoconfigure module doesn’t setup a SimpleEventScheduler bean by default?

Issue Analytics

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

github_iconTop GitHub Comments

2reactions
smcvbcommented, Sep 24, 2018

Completely correct @mattupstate! I can assure you we will work on this so that future users will not run into the same issues you ran in to.

0reactions
abuijzecommented, May 24, 2019

The reason the exception isn’t logged in its full “stacktrace glory” is because the result is also returned as part of the commandGateway.send method. The completable future there will complete exceptionally, providing you with all details. We do not want to log stack traces when we return them, to prevent log pollution.

So I don’t think the framework itself should do anything more than it’s currently doing.

Read more comments on GitHub >

github_iconTop Results From Across the Web

SagaCreationException (Axon Framework 3.1.1 API)
Initializes the exception using the given message and cause . Method Summary. Methods inherited from class org.axonframework.common.AxonNonTransientException.
Read more >
Windows Command-Line Obfuscation - Wietze Beukema
This post shows how more than 40 often-used, built-in Windows applications are vulnerable to forms of command-line obfuscation, and presents ...
Read more >
gradle - Android Studio incremental obfuscation causing error
I'm trying to obfuscate a project with 2 modules. The first module is independent and the second is using the first module. Each...
Read more >
Obfuscated Files or Information, Technique T1027 - Enterprise
ID Name Description G0026 APT18 APT18 obfuscates strings in the payload. G0016 APT29 APT29 has used encoded PowerShell commands. G0050 APT32
Read more >
Exploring the Depths of Cmd.exe Obfuscation and Detection ...
There are certainly evasion benefits to using obfuscation that causes the command on disk (in a registry key, batch file, macro, etc.) to...
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