persistence@glassfish.java.net

Re: new to glassfish and EJB3- problem with EntityManager

From: Bob Treacy <bobtreacy_at_yahoo.com>
Date: Sun, 25 Jun 2006 20:00:50 -0700 (PDT)

BobTreacy:~/VDCPrototype/dist bobtreacy$
~/glassfish/bin/verifier VDCPrototype.ear
 WARNING: DPL5400:Exception occurred : error in
opening zip file.
 INFO: Verifying: [ VDCPrototype.ear ]
 INFO: Verifying: [ VDCPrototype-ejb_jar ]
Visiting non-standard Signature object
Visiting non-standard Signature object
 INFO: Verifying: [ VDCPrototype-war_war ]
 INFO: Compiling JSPs in [ VDCPrototype-war_war ]
Visiting non-standard Signature object
Visiting non-standard Signature object
 INFO:
# of Failures : 0
# of Warnings : 0
# of Errors : 0
 INFO: No errors found in the archive.
BobTreacy:~/VDCPrototype/dist bobtreacy$


--- Sanjeeb Kumar Sahoo <Sanjeeb.Sahoo_at_Sun.COM> wrote:

> Looks like entity manager was not injected at all.
> Have you verified
> your app? Run this command to verify:
> $GLASSFISH_HOME/bin/verifier <ear/jar/war file>
>
> Thanks,
> Sahoo
> Bob Treacy wrote:
> > I am just getting started with Glassfish and EJB3.
> > What could be causing the first line of findAll()
> > below to be generating a NullPointerException?
> >
> > @Stateless
> > public class StudyFacade implements
> StudyFacadeLocal {
> >
> > @PersistenceContext
> > private EntityManager em;
> > ...
> > public List findAll() {
> > Query q = em.createQuery("SELECT object(s)
> > from Study as s");
> > ..
> >
> > }
> >
> > Thanks,
> > Bob Treacy
> >
>