although it’s possible to use a long, it’s far from recommended to do so. In general, they make for very poor unique identifiers. In this particular case, I think your problem is related to the fact that a long is initialized with 0. Axon sees that as an initialized value (all non-null values are) and when events are applied, they are given the aggregate identifier 0.
The solution would be to use a Long instead, as it is initialized with a null.