users@glassfish.java.net

createQuery() NPE

From: Jason Lee <lee_at_iecokc.com>
Date: Tue, 6 Jun 2006 15:02:58 -0500

Well, I thought I could whip this one on my own, but I'm just not having
a very good day so far. :P I have the EM now injected correctly, but
when I call em.createQuery("select j from Job j"); i get a NPE. Job is
an annotated class (@Entity, @Table, @Id and Serializable, fwiw) in the
same package as the PU file, which also references the class explicitly.
em.isOpen() returns true, but any other call on the object results in an
NPE. It has to be something subtle I'm missing, as some working code we
have looks extremely similar. I'm just having trouble tracking it down.
Anyone have any quick hints off the top of their head? Thanks!
 
--
Jason Lee
Programmer/Analyst