You can't use "normal" SQL in the createQuery method, you have to use JPA QL. 

So, try this:

List<User> users = em.createQuery("from "+User.class).getResultList();

You'll get a list of User objects and you can filter out the usernames from 
that.

View the original post : 
http://www.jboss.com/index.html?module=bb&op=viewtopic&p=4053097#4053097

Reply to the post : 
http://www.jboss.com/index.html?module=bb&op=posting&mode=reply&p=4053097
_______________________________________________
jboss-user mailing list
[email protected]
https://lists.jboss.org/mailman/listinfo/jboss-user

Reply via email to