hello Eric,
I believe I have had an issue like this before and it took me some time to resolve it. I believe it happens when you create a ejb module and it does not contain an entity or stateful or stateless - just what everybody mentioned. Or if you do not state the required annotation. Or if you do not package it well.
In my persistence unit - I firstly create a connection in my connection pool under JDBC node, inside the admin console. Then after it pins, I create the jdbc connection with the JNDI name. When I create my persistence unit, I provide the JNDI name under:
<jta-data-source>jdbc/LIGHTINGSPECdb</jta-data-source>
so it becomes my Datasouce for the whole application. I find that with all this, I do not have to add details of my ejbs ( entity, stateful & stateless classes) to the persistence unit and every thing works fine. I do, however, provide the persistence unit name to the Persistence context of my implementation class. Once that is done, everything works fine; provided that I don't make any other mistake.
The problem you are having could be due the fact that the ejbs are not package in the required package, i.e, could you make you do not place it in the default packaging but you give it it's own packaging.
In the mean time, I will try and find out how I got such a similar message and how I resolved it. I hope I have document it somewhere.
eve
> Date: Fri, 16 Nov 2007 19:45:48 +0530
> From: Sahoo_at_Sun.COM
> To: ejb_at_glassfish.dev.java.net
> Subject: Re: Ejb-jar File Requirements
>
> You won't find that requirement explicitly stated in the EJB spec,
> because JPA entities are *not* EJBs; they are just POJOs. It is an
> implicit requirement. When you designate a jar as ejb-jar, it must
> contain at least one EJB. May I know why you want to designate a jar
> file as ejb-jar when it does not contain any EJB? When I say EJB, I mean
> one of Stateful, Stateless, MDB, or Entity Bean (EJB 1.x/2.x).
>
> Thanks,
> Sahoo
>
> Hubert, Eric wrote:
> > Hello all!
> >
> > During an EAR deployment Glassfish v2 b58g complaints if one declares an
> > EJB module which only contains EJB 3.0 style entities (annotated POJOs)
> > and forces one to package them as a Java library. Is there really a need
> > to do that according to confirm with the EJB 3.0 spec? I ask as other
> > implementations don't force the application assembler to package his
> > application in this way.
> > The output in server.log states "A valid ejb jar requires at least one
> > session, entity (1.x/2.x style), or message driven bean."
> >
> > Could someone please point me to the source of this requirement in the
> > EJB 3.0 spec! I couldn't find it. Although I agree it is perfectly fine
> > to package those annotated POJOs in a plain java library and reference
> > it in persistence.xml I don't understand why to force the application
> > provider to do it in this way.
> >
> > Regards,
> > Eric
> >
> > --
> > Eric Hubert
> > Software Architect
> > Associate Director Research & Development
> >
> > ---------------------------------------------------------------------
> > To unsubscribe, e-mail: ejb-unsubscribe_at_glassfish.dev.java.net
> > For additional commands, e-mail: ejb-help_at_glassfish.dev.java.net
> >
> >
>
> ---------------------------------------------------------------------
> To unsubscribe, e-mail: ejb-unsubscribe_at_glassfish.dev.java.net
> For additional commands, e-mail: ejb-help_at_glassfish.dev.java.net
>
_________________________________________________________________
Get free emoticon packs and customisation from Windows Live.
http://www.pimpmylive.co.uk