File APIs for Java Developers
Manipulate DOC, XLS, PPT, PDF and many others from your application.
http://aspose.com/file-tools
Win a copy of Clojure in Action this week in the Clojure forum!
  • Post Reply
  • Bookmark Topic Watch Topic
  • New Topic

EAR Deployment Failed - Glassfish v3

 
Sai Surya
Ranch Hand
Posts: 463
Eclipse IDE Java Tomcat Server
  • 0
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
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.
 
Lalit mishra
Ranch Hand
Posts: 100
  • 0
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
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
Posts: 463
Eclipse IDE Java Tomcat Server
  • 0
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
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
 
  • Post Reply
  • Bookmark Topic Watch Topic
  • New Topic