I am trying to figure out how to properly utilize hibernate 4 from a web project (a Vaadin 7.1 project in my case). I am using eclipse and the Vaadin web project (before trying to access hibernate stuff) deploys and runs properly on my jBoss EAP.
All the tutorials for hibernate point you to how to add the hibernate tools in eclipse (did that) then create a Java Project then add hibernate facet (this is what MyEclipse call it) to the project and then reverse engineer your tables into POJO classes with annotations and everything. At that point it also creates the hibernate.cfg.xml and the whole project compiles fine.
Then I add the hibernate project as a dependency on the Vaadin web project in order to be able to get the hibernate session and start loading stuff through the pojos.
My problem is that I can not figure out how to deploy the hibernate project on jBoss in order for the web project to “see it”. Both compile fine in eclipse, however, I get ClassNotFound errors (for hibernate classes) when I try to run the web project.
Is my whole approach wrong? Should the web (vaadin) project and the hibernate project be one?
Thanks in advance for any assistance.
Best Regards