This week's book giveaway is in the OCPJP forum. We're giving away four copies of OCA/OCP Java SE 7 Programmer I & II Study Guide and have Kathy Sierra & Bert Bates on-line! See this thread for details.
Hi, this is my first application in Hibernate JPA, I created 2 projects in eclipse 1) daks - it's a tomcat based web application 2) jpatest - JPA project in hibernate plate form. Then, I included jpatest project into my web project java module dependency path. I included all the below hibernate jars into jpa project- jpatest classpath.
Please look at my project hierarchy below
EMFactoryListener is invoked when application starts, its been configured in web.xml
EMFactory is invoked by EMFactoryListener when application starts.
JPA hibernate persistence.xml is below which presents in META-INF folder
Are you aware that Tomcat is a Servlet/JSP container, it does not implement JPA. In order to run small JPA applications you need some more work with Tomcat. Are you using EclipseLink or something, to do this?
I have configured Hibernate JPA entity manager in jpa project class path, i have pasted the screen shot of hibernate libraries above. I'm using jdk 1.6, please see the screen shots below. Please advise me. Thanks
Joined: Jan 02, 2007
Thanks for advising me, I found what was missing. I thought, web application will be able to refer all JPA project module libraries by including JPA project as java/J2ee module into web application class path in eclipse, but that seems to be wrong. After including, JPA modules's all dependencies hibernate libs also into web application classpath solved my error. The below are my finalized HibernateJPA Mysql libs I have placed into JPA module and web application class path as well.