Can anyone provide some clarification around automatic entity scanning in Hibernate 4 / JBoss AS 7.1 CR1b?
I am getting stack traces containing
java.lang.IllegalArgumentException: Unknown entity:
By searching on the web you get
The last question suggests the work around
You need to list the classes you want to map with the EntityManager with a <class>
element.
So is it a bug or do I really have to manually specify each and every entity class in my persistence.xml file even though the entity classes are packaged in a persistence jar file which also has the persistence.xml file in it located in the META-INF directory?
Simlar to the experiences of the people asking questions stackoverflow, it worked previously (Hibernate 3.3 in JBoss 5.0.1).
Thanks,
Peter.
Are you using spring for JPA or JPA that comes with AS7.1? What is a structure of your application -- can you please post your server.log & persistence.xml?