1) Create mapping field in an entity: @Id @GenericGenerator(name = "my_generator", strategy = "wrong_strategy") private int id2; 2) Error expected, but nothing is shown. 3) move @GenericGenerator annotation near @Entity and compare