Class ChildEntityNotFoundException

java.lang.Object
java.lang.Throwable
java.lang.Exception
java.lang.RuntimeException
org.axonframework.modelling.entity.ChildEntityNotFoundException
All Implemented Interfaces:
Serializable

public class ChildEntityNotFoundException extends RuntimeException
Exception indicating that there was no child entity available to handle a command. This happens when one or multiple children declare the command as supported via EntityChildMetamodel.supportedCommands(), but none of them return true for EntityChildMetamodel.canHandle(CommandMessage, Object, ProcessingContext). This indicates that the command is not valid for the current state of the child entity.

Before 5.0.0

This exception was called org.axonframework.modelling.command.AggregateEntityNotFoundException and was thrown when no child entity was available for an aggregate. It has been renamed to reflect the move to entities in Axon 5.0.0. In all other aspects, it remains the same.
Since:
3.3
Author:
Steven van Beelen, Mitchell Herrijgers
See Also:
  • Constructor Details

    • ChildEntityNotFoundException

      public ChildEntityNotFoundException(String message)
      Creates a new exception with the given message.
      Parameters:
      message - The message describing the cause of the exception.
    • ChildEntityNotFoundException

      public ChildEntityNotFoundException(@Nonnull CommandMessage commandMessage, @Nonnull Object parentEntity)
      Creates a new exception with the given commandMessage and parentEntity.
      Parameters:
      commandMessage - The CommandMessage that was handled.
      parentEntity - The parent entity instance that was expected to handle the command.