I have followed a working JPA example to retrieve Category objects as such:
return (ArrayList<Category>) getEntityManager().createQuery("from Category").getResultList();