Search This Blog

2009-11-15

Netbeans 6.8beta, Glassfish V2.1, EJB 3.0 Deployment Problems

Hi alltogether,
Within the last few weeks I sometimes had to face with the following exception, which appeared out of nothing.

Exception occured in J2EEC Phasejava.lang.IllegalArgumentException: Invalid ejb jar [...EJB-1.1-SNAPSHOT.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), please check server.log to see whether the annotations were processed properly.

At first, I thought it was a problem with changing the snapshot version (see this post)) but this actually wasn't the problem. Maybe, it's a problem of Netbeans 6.8beta version. Anyway, I still haven't figured out the source of the problem, I can only tell you what you have to do to make it work again. Recreate your glassfish domain. Here is a how to link

I hope this is helpful for you. It took me some hours to fix the problem, which was very annoying.

No comments:

Post a Comment