I have set hibernate.cfg.xml in class path ie. this file is in the root folder "src" .
The persistence.xml is in src/META-INF folder which is also in the class path .
the jars which i have added are as follows
this is my persistence.xml
this is my hibernate.cfg.xml
the main class is as follows
but i'm getting this error
run: Exception in thread "main" java.lang.NoClassDefFoundError: org/jboss/util/file/ArchiveBrowser$Filter at org.hibernate.ejb.HibernatePersistence.createEntityManagerFactory(HibernatePersistence.java:119) at javax.persistence.Persistence.createEntityManagerFactory(Persistence.java:52) at javax.persistence.Persistence.createEntityManagerFactory(Persistence.java:34) at com.DO.JPAMain.main(JPAMain.java:28) Java Result: 1 BUILD SUCCESSFUL (total time: 0 seconds)