This may be caused by the types of @Id fields not matching the types in id class. According to https://docs.oracle.com/javaee/7/api/javax/persistence/IdClass.html
The names of the fields or properties in the primary key class and the primary key fields or properties of the entity must correspond and their types must be the same.