users@glassfish.java.net

GlassFish not recognizing entities using annotations

From: <glassfish_at_javadesktop.org>
Date: Wed, 15 Oct 2008 00:11:28 PDT

We have an application where all entities are defined in orm.xml. We are creating an add-on which includes a couple of new entities. We would like to avoid touching the orm.xml file (since not all installations will use the add-on, and the orm.xml file is consistent across all installations). We decided to use annotations on the new entities so that GlassFish would find the new entities based on annotations, and the 'old' entities based on orm.xml

It doesn't seem though that GF reads these annotations. We have included named queries in these entities, but when a named query is called upon, GF complains that it cannot find it. If we add xml configuration for the entities (but leave the named queries as annotations only), GF finds the queries.

Please point us in the right direction!

Marius Waldal
[Message sent by forum member 'mariusw' (mariusw)]

http://forums.java.net/jive/thread.jspa?messageID=307276