1 Reply Latest reply: Jan 12, 2012 11:49 AM by Prasad Deshpande RSS

    automatic entity scanning in hibernate 4/JBoss AS 7.1

    Peter Fry Newbie

      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).