Try adding the class attribute to the composite-id.
Hbm mappings are considered deprecated since JPA 1.0 has emerged (2006). If you are migrating to 5.x, it’s time to migrate to annotations or ORM.xml mappings too. They are much better supported too.