I have a Maven project that uses Hibernate and PostgreSQL, and it's working fine on it's own. Now I want to use some classes from this project (essentially the database) in a servlet, but now things break.
I get a java.lang.NoClassDefFoundError: javax/persistence/Persistence
error when accessing the servlet in Tomcat.
I'm thinking that somehow the Maven dependencies don't get "forwarded" to the servlet project, but I don't know what to do about it. I've added the Maven project to the servlet build path, and also to its "Web Deployment Assembly"... what more do I need to do?