Finally i have got the solution.
If the zip folder unzipped and all the jars inside the required
folder imported, it will not work. One of the following errors or both may shown :
No Persistence provider for EntityManager named
Hibernate 5.2.2: No Persistence provider for EntityManager
To solve the above problems have to do the following task :
This line have to add in the persistence.xml
file :
<provider>org.hibernate.jpa.HibernatePersistenceProvider</provider>
And have to download classmate-0.8.0.jar
, and have to add it in the class path. This jar can be downloaded from Here
Then have to download the hibernate-entitymanager-5.0.12.Final.jar
file and Have to add it in the class path. The jar can be downloaded from Here
In the Netbeans there is a default library called Hibernate 4.3.x(JPA 2.1)
.If you want to change this library, you have to find the installation folder of Neatbeans and the folder where hibernate has kept.
In windows it may found in :
C:\Program Files\NetBeans 8.2\java\modules\ext\hibernate4
For Linux it may be found in :
/usr/local/netbeans-8.2/java/modules/ext/hibernate4/
Then paste the jars from required
folder (It will be found in downloaded Hibernate folder) and other jars mentioned above. You may find some jars duplicate. Then you may notice that some jars of hibernate almost with the same name but difference in version. Then delete the jars which has older version name.