I created two entity classes from database:Users and Dictionary using the wizard. Next I was trying to query the DB. In another class, in the main method, I just typed in this code.
When I am running this class, I am getting an exception. Exception Description is
Most likely, you have either not registered the Users class with the persistence unit (ensure it is listed in your persistence.xml),
or have set the Users "name" to something other than "Users".
Please include your persistence.xml, and Users class.
James Sutherland wrote:Most likely, you have either not registered the Users class with the persistence unit (ensure it is listed in your persistence.xml)
Thanks. This worked. Users class was not registered in persistence unit. A silly mistake!
With a little knowledge, a cast iron skillet is non-stick and lasts a lifetime.