I'm currently creating my entities and DAO with Hibernate Tools and reverse engineering. My config is Eclipse Indigo, JBoss AS7, Hibernate Tools 3.4 and Hibernate 4. The problem is when I try to deploy my .jar to JBoss AS7 I get this :
And more precisely :
Can't find a persistence unit named null in deployment "businessLayer.jar"
Now, I searched about this issue and it suggests I should have a persistence.xml file under META-INF. The thing is, the generation didn't do anything regarding this file (it even disabled its generation when I checked annotations and not JPA during the console config) and when I look at the samples, I'm unsure what to specify... Another question : from what I understand, this file is necessary for the EntityManager, but why would I need this if all the required informations is already in my hibernate.cfg.xml (because I mean, the two files look kinda similar...) ?