Hi Stephan,
What Allard means to ask is if you're wiring the Aggregate Repository yourself to retrieve an aggregate to make it handle commands or if you let Axon do all the work.
From your short snippet however I think you're trying to create the aggregate yourself, so 'invoking directly' would have been the case.
You're however not inclined to call the constructor of an aggregate directly at all, the Repository implementation will take care of that.
You can just publish the `CreateProfile` command on the CommandBus (or through the CommandGateway) and Axon will know to call the command handling constructor of the Profile aggregate.
Internally it will then create the UnitOfWork, which will start the Aggregates Lifecycle, thus solving the exception you're getting.
If this doesn't solve your issue, please be more specific of your Axon application configuration and the version you're using.
Nonetheless, I hope this helps!
Cheers,
Steven