I am currently creating my entities and DAOs using Hibernate Tools and reverse engineering. My configuration is Eclipse Indigo, JBoss AS7, Hibernate Tools 3.4 and Hibernate 4. The problem is that I am trying to deploy my .jar for JBoss AS7. I get this:
http://pastebin.com/1hvHBM7z
Or rather:
Cannot find persistence block named null in deployment "BusinessLayer.jar"
Now I was looking for this problem and it suggests that I should have a persistence.xml file in META-INF. The fact is that the generation did nothing regarding this file (even turned off its generation when I checked annotations, not JPA during console configuration), and when I look at the samples, I'm not sure what to specify ... Another question: from what I understand, this file is necessary for EntityManager, but why do I need it if all the necessary data is already in my hibernate.cfg.xml (because I mean that the two files look similar ... )?
LMeyer
source share