The following simple code throws exception:
entityManager.createQuery("SELECT c FROM Customer c");
But if I write
entityManager.createNativeQuery("SELECT c.* FROM Customer c", Customer.class)
then it works without any error. What might be wrong? I use GlassFish v2.1 with Toplink-essentials.