Skip to content

Flaky Behavior for Dynamic Conversion #4653

Description

@dilgerma

Basic information

This is a custom quarkus extension but the behavior might be due to the dynamic conversion in Axon 5.x.

Steps to reproduce

  1. Check out the reproducer branch:
    axon-51-upgrade-flaky-exception
  2. Navigate to the core/deployment Maven module (quarkus-axon-deployment).
  3. Execute the test class:
    at.meks.quarkiverse.axon.deployment.eventprocessors.pooled.WithDefaultsTest
  4. Run the test repeatedly.

The issue is flaky and does not occur on every execution. After several runs, the test may fail with an exception originating from the PooledStreamingEventProcessor / WorkPackage processing flow.

Expected behaviour

The test should complete successfully on every execution without exceptions during event processing.

Actual behaviour

The test intermittently fails with the following exception:

java.lang.IllegalArgumentException: java.lang.NullPointerException:
Cannot invoke "java.lang.Number.longValue()" because the return value of
"sun.invoke.util.ValueConversions.primitiveConversion(sun.invoke.util.Wrapper, Object, boolean)"
is null

The exception is logged from:

org.axonframework.messaging.eventhandling.processing.streaming.pooled.WorkPackage

Example log message:

WARN  [org.axonframework.messaging.eventhandling.processing.streaming.pooled.WorkPackage]
(WorkPackage[GiftCardInMemory]-0)
Error while processing batch in Work Package [2]-[GiftCardInMemory].
Aborting Work Package...

The stack trace indicates the failure occurs during event handler invocation through MethodInvokingMessageHandlingMember, eventually causing the WorkPackage to abort processing.

A complete stack trace is available in the issue description above.

Metadata

Metadata

Labels

Priority 1: MustHighest priority. A release cannot be made if this issue isn’t resolved.

Type

Fields

No fields configured for Bug.

Projects

No projects

Milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions