5 Replies Latest reply on Sep 27, 2013 8:41 AM by Tiago Wanke Marques

    EntityManager getMetamodel() getEntities() is empty with Persistence.createEntityManagerFactory()

    Jonathan Clarke Newbie

      Dear All,


      Please see a skeleton application that I'm using to test all the functions I need through a combination of Seam 2.3.0.Final and AS7.1.1.Final, in order to migrate from  Seam 2.2.2.Final and JBoss 5.1.0.GA. This project has come out of problems described in https://community.jboss.org/thread/218262.


      As well as using EntityHome, generated by the seam-gen process, I also use the Persistence.createEntityManagerFactory approach for server-side threading using Quartz. However, when I use the latter technique, the entity types found in EntityManager.getMetamodel().getEntities() is empty, and hence I get errors such as "Unknown entity," as demonstrated by the offending code in SkeletonSystem.java. I can view the database objects and query them using the EntityHome object, but I am confining the EntityHome to the UI controllers. This code works under Seam 2.2.2.Final and JBoss 5.1.0.GA.


      I would very much appreciate your help on this matter.