Thats an old problem discussed in different topics. In short:
To get a trainer you need a ware. Eg. a barbarian trainer needs an ax.
A Trainer is made only in a warehouse, if there is also the needed ware for the trainer in a warehouse.
As soon you build buildings which consumes axes, like barracks, all axes are transported to those buildings and no one is left to build a trainer.
If i ran out of trainers i set the stock for ax in barracks to zero. That way produced axes will go into a warehouse and a trainer could be build.
Thats an old problem discussed in different topics. In short:
To get a trainer you need a ware. Eg. a barbarian trainer needs an ax.
A Trainer is made only in a warehouse, if there is also the needed ware for the trainer in a warehouse.
As soon you build buildings which consumes axes, like barracks, all axes are transported to those buildings and no one is left to build a trainer.
If i ran out of trainers i set the stock for ax in barracks to zero. That way produced axes will go into a warehouse and a trainer could be build.
I set this bug as duplicate of bug 1422158.