I want to use Hibernate with Struts2. When the SessionFactory is loaded the following error is occurred.
Initial SessionFactory creation failed.java.lang.NoClassDefFoundError: javax/persistence/JoinTable
When I got the session factory in a normal class in a psvm, no error given,But when only jsp page or Tomcate is run ,above error is thrown.
I searched it in Internet.It is said that it is because that some libraries are not matching..
this said to add some jars listed in that page.And to find them, a link also given. But no jars found.
Also there is another page found saying full-hibernate-plugin-for-struts2 But I couldn't find any useful libraries. It had only war files(normal classes) and some web projects not struts or hibernate libraries.
I use
NetBeansIDE 7.0.1
Tomcat 7
Please any one know how to solve this problem or any working library set ?
check this out:
or you can use maven: