persistence@glassfish.java.net

Re: new to glassfish and EJB3- problem with EntityManager

From: Sanjeeb Kumar Sahoo <Sanjeeb.Sahoo_at_Sun.COM>
Date: Mon, 26 Jun 2006 08:41:43 +0530

Thanks for that output. I am trying to find out why that warning
appeared. Can you please do a jar tf on VDCPrototype.ear and send the
output? Secondly, do you have an ejb-jar.xml in VDCPrototype-ejb.jar?
What is *version* attribute set there? Is it 3.0 or not?

Thanks,
Sahoo

Bob Treacy wrote:
> 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
>>>
>>>