geronimo-user mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From dbrenck <>
Subject Re: maven - geronimo 2.0 example build problem
Date Fri, 05 Oct 2007 08:01:47 GMT

djencks wrote:
> I haven't looked at the phonebook example in great detail but it  
> looks to me like the "entity" uses jpa and is not an ejb 2.x entity  
> bean.  As such, if there are no session beans in the jar, it's no  
> longer an ejb jar.  If there's an application.xml in the ear that  
> claims it is, geronimo will probably object.  If you want to use it  
> as a persistence unit referenced from the war I think you need to put  
> the jar in the ears lib directory or include a manifest classpath  
> entry in the war's META-INF/MANIFEST.MF pointing to the jar.
> Hope I'm right and that this helps :-)

Yes, and no :-)

We got an EntityBean 3.0 class, a SessionBean class and an Interface
implemented by the SessionBean class.

JPA is used by the SesionBean (not(!) by the EntityBean)

This thing works, cause the EntityBean is found/read and written by the
SessionBean which uses JPA.

Because the EntityBean uses @Entity and other persistance annotations, it
should be alright to just remove the SessionBean from the jar (as well as
it's interface class) and deploy the jar then then.
When trying/doing so, the deployer crashes with the given (2 posts above)
(Yes, i removed the <class> entry from the persistance.xml too, which
mentions the SessionBean.
You can then remove the persistance unit definition, cause no class depends
on it. I tried both ways: remained it and removed it - no difference.)


Apart from the example mentioned above, the deployment exception always
occurs if an ejb.jar that is to be deployed ONLY contains EntityBeans. Maybe
that s a hint where I'm going wrong - although I didn't see something in the
specs for j2ee 5 which sais that any ejb.jar must at least contain one
SessionBean (if u do add just one SessionBean to the ejb.jar the deployer
works fine again).

If someone can setup an example of a simple ejb.jar with just one simple 3.0
EntityBean class which deploys on his geronimo, I would be happy if he made
it available for me. So I can check what s wrong with my own ejb.jar or with
my server.

Btw. - I'm running this:

cheers, dirk
View this message in context:
Sent from the Apache Geronimo - Users mailing list archive at

View raw message