aspose file tools*
The moose likes EJB Certification (SCBCD/OCPJBCD) and the fly likes EAR Deployment Failed - Glassfish v3 Big Moose Saloon
  Search | Java FAQ | Recent Topics | Flagged Topics | Hot Topics | Zero Replies
Register / Login
JavaRanch » Java Forums » Certification » EJB Certification (SCBCD/OCPJBCD)
Bookmark "EAR Deployment Failed - Glassfish v3" Watch "EAR Deployment Failed - Glassfish v3" New topic
Author

EAR Deployment Failed - Glassfish v3

Sai Surya
Ranch Hand

Joined: Feb 08, 2006
Posts: 459

Dear All,

I wanted to test DI so I prepared an EAR with a web module and with an ejb module. When I try to deploy this EAR to Glassfish v3 server, I am getting the following exception.

Exception while deploying the app : java.lang.IllegalArgumentException: Invalid ejb jar [ActionBazarEJB.jar]: it contains zero ejb. Note: 1. A valid ejb jar requires at least one session, entity (1.x/2.x style), or message driven bean. 2. EJB3+ entity beans (@Entity) are POJOs and please package them as library jar. 3. If the jar file contains valid EJBs which are annotated with EJB component level annotations (@Stateless, @Stateful, @MessageDriven, @Singleton), please check server.log to se..

From the above I understood that Glassfish is somehow not recognizing my EJB eventhough I have annotations. Do I need to have a vendor specific xml DD (sun-ejb-jar.xml in this case)?

Please clarify.


Sai Surya, SCJP 5.0, SCWCD 5.0, IBM 833 834
http://sai-surya-talk.blogspot.com, I believe in Murphy's law.
Lalit mishra
Ranch Hand

Joined: Sep 01, 2005
Posts: 99
I think dependency injection is failing due to which the ejb is not loaded could you please share the source code

Thanks,
Lalit.
Sai Surya
Ranch Hand

Joined: Feb 08, 2006
Posts: 459

Hi Lalit,

I managed to deploy EAR successfully. I got this error intermittently when I deployed EAR built using Ant. However, I used export in Eclipse and I could deploy it without any errors.

Thanks for responding
 
It is sorta covered in the JavaRanch Style Guide.
 
subject: EAR Deployment Failed - Glassfish v3