Upgrade Hibernate to hibernate-core-3.6.5.Final

Just some problems when i had to upgrade from Hibernate 3.3 to 3.6.5

1. Getting the following exception
Hibernate java.lang.ClassNotFoundException: javax.persistence.Cacheable

--> copy hibernate-jpa-2.0-api-1.0.0.Final.jar from
hibernate-distribution-3.6.5.Final\lib\jpa

Import the new jar file in eclipse

2. Getting the following exception
java.lang.NoSuchMethodError: javax.persistence.OneToMany.orphanRemoval()Z

Remove the Jar ejb3-persistence.jar from class path and from eclipse projects

3. The annotation CollectionOfElements is deprecated

replace @CollectionOfElements with @ElementCollection

4. Remove the jars
hibernate-annotations.jar
hibernate-commons-annotations.jar
hibernate-entitymanager.jar

fix eclipse imports