4 Replies Latest reply on Mar 5, 2010 5:45 AM by Ranganathan Kaliyur Mannar

    EntityManager in AbstractResource throws not mapped exception

    Ranganathan Kaliyur Mannar Newbie

      Hi,
      I have developed a simple and complete seam application. Now, I am attempting to integrate the JasperReports reports into the application. I have developed the reports with EJBQL.
      Now, when integrating them, I use an AbstractResource. In the abstract resource:


      1) Get the EntityManager by


      EntityManager entityManager = (EntityManager)(Component.getInstance("entityManager"));


      2) Use the EntityManager to execute a query like "Select exam from EXAM exam"


      When I run this, I get QuerySyntaxException saying "EXAM is not mapped".


      This Exam component is working fine in the normal part of the Seam application (i.e seam-generated part).



      Ranga.