I recently completed this tutorial: “http://static.springsource.org/docs/Spring-MVC-step-by-step/“, but now I want it to work with Hibernate and annotations. I know I’m close but I’ve hit a roadblock and I can’t figure it out. I’ve posted my code on the Spring forums here. I would greatly appreciate ANY help. Thanks
I’m trying to incorporate annotations and hibernate into it, but I’ve run into a problem and I can’t figure it out. I keep getting errors of “No persistence unit with name ‘product’ found”. ANY help would be greatly appreciated.
You need a
META-INF/persistence.xml, with<persistence-unit name="product">. See here(I usually put it in
WEB-INF/classes/META-INF. As noted in the comments, with maven you can place it insrc/main/resources/META-INF)