Axon Server Command does not contain routing key.

I am trying to migrate my application to Axon 4.0 with Axon server.

But I got this error with my command.

data class CreateTravelProductCommand(
    @TargetAggregateIdentifier val id: String,
    val productCreator: String

Try removing converting the command from a data class to a regular class and inheriting from Serializable

The data class should work out of the box. Did you check if the data class is compiled with Axon 4?