3 Replies Latest reply on Sep 20, 2007 3:06 AM by kumanan_jboss

    org.apache.openjpa.persistence.ArgumentException: Could not

    kumanan_jboss

      Hi,

      I am getting exception in the following line of code.

      userData = (em.createQuery("select u from Users u where u.email= ?1").setParameter(1, "mail@mailid.com")).getResultList();

      userData : is a List object,
      em : is a EntityManager object
      Users : is a table

      Exception Message
      ============

      Exception caught is : <4|true|0.9.7> org.apache.openjpa.persistence.ArgumentException:
      Could not locate metadata for the class using alias "Users".

      Persistent.xml
      =========
      <persistence-unit name="userDatabase" transaction-type="RESOURCE_LOCAL">
      org.apache.openjpa.persistence.PersistenceProviderImpl
      <exclude-unlisted-classes>false</exclude-unlisted-classes>






      </persistence-unit>


      Please let me know if someone had already faced this issue and found a resolution for it.

      - Kumanan