This Bugzilla instance is a read-only archive of historic NetBeans bug reports. To report a bug in NetBeans please follow the project's instructions for reporting issues.
netbeans-5_5-daily-bin-200605050500-5_May_2006_0500.zip Just downloaded and installed the daily buidl (above) and made a new J2EE5 project. Created stateless and stateful sesion beans. sun-ejb-jar.xml was not updated to include them. deploy failed because com.sun.enterprise.deployment.backend.IASDeploymentException: Error loading deployment descriptors for module [GeneralServer] -- Invalid ejb jar GeneralServer-ejb.jar: it contains zero ejb. A valid ejb jar requires at least one session/entity/message driven bean. at com.sun.enterprise.deployment.backend.Deployer.loadDescriptors(Deployer.java:362) at com.sun.enterprise.deployment.backend.AppDeployerBase.loadDescriptors(AppDeployerBase.java:327) at com.sun.enterprise.deployment.backend.AppDeployer.explodeArchive(AppDeployer.java:332) at com.sun.enterprise.deployment.backend.AppDeployer.deploy(AppDeployer.java:182) at com.sun.enterprise.deployment.backend.AppDeployer.doRequestFinish(AppDeployer.java:129) at com.sun.enterprise.deployment.phasing.J2EECPhase.runPhase(J2EECPhase.java:169) at com.sun.enterprise.deployment.phasing.DeploymentPhase.executePhase(DeploymentPhase.java:95) at com.sun.enterprise.deployment.phasing.PEDeploymentService.executePhases(PEDeploymentService.java:871) at com.sun.enterprise.deployment.phasing.PEDeploymentService.deploy(PEDeploymentService.java:266) at com.sun.enterprise.deployment.phasing.PEDeploymentService.deploy(PEDeploymentService.java:739) at com.sun.enterprise.management.deploy.DeployThread.deploy(DeployThread.java:174) at com.sun.enterprise.management.deploy.DeployThread.run(DeployThread.java:210) Caused by: java.lang.IllegalArgumentException: Invalid ejb jar GeneralServer-ejb.jar: it contains zero ejb. A valid ejb jar requires at least one session/entity/message driven bean. at com.sun.enterprise.deployment.util.EjbBundleValidator.accept(EjbBundleValidator.java:81) at com.sun.enterprise.deployment.util.ApplicationValidator.accept(ApplicationValidator.java:69) at com.sun.enterprise.deployment.EjbBundleDescriptor.visit(EjbBundleDescriptor.java:669) at com.sun.enterprise.deployment.Application.visit(Application.java:1734) at com.sun.enterprise.deployment.archivist.ApplicationArchivist.validate(ApplicationArchivist.java:457) at com.sun.enterprise.deployment.backend.Deployer.loadDescriptors(Deployer.java:342) ... 11 more |#] maybe related to issue 57684 ?
just made a new MsgDrivenBean... looks like the sun-ejb-jar.xml was totally overwritten with an empty descriptor, killing the manual edits that had been made.
If you have an EJB module that has no EJB's, changing the contents of sun-ejb-jar.xml directly will not impact this and in fact, it is possible that such manual edits to this file to change properties of a non-existent EJB will disappear due to our JSR-88 implementation. The correct way to solve the problem is to make sure that you have at least one EJB and that it is properly annotated or otherwise specified in the standard deployment descriptor.
I think you are saying... 1. do not manually edit the sun-ejb-jar.xml 2. make new EJB's with the Netbeans wizard and it will take care of editing the descriptor for me and/or the descriptor need not be udpated because the EJB3 annotations on session/entity/mdb have everything that is needed? Please elaborate... I had manually edited the sun-ejb-jar.xml becuase 1. it was not updated by netbeans 2. I had made a Stateless session bean and MDB with the Netbeans wizards and deployed to glassfish as installed by glassfish-installer-v2-b01-nightly-06_may_2006.jar and glassfish (also jboss 4.04RC) complained there were no beans (as below)
Re 1. Not exactly. Most manual edits are fine and in fact if the system thought you had a session bean of a specific name and you added via the XML editor a correct entry into sun-ejb-jar.xml for that session bean, your edits would not have been removed. But if there is a bean entry in sun-ejb-jar.xml and no corresponding bean in ejb-jar.xml or annotations is found, the edits in sun-ejb-jar.xml can in fact be deleted. It's a side effect of the _real_ problem here. Re 2. If you make beans via the wizards they are supposed to be properly annotated. If they are not, it's a bug (and please file if you see this). However you should also be able to manually annotate beans and if you can't or by doing so you get into invalid or non-operational states when your code is correct, this is also a bug and should be filed. The situation you are describing here sounds like a bug and I'll check into it later today when I'm at the office. I wanted to clarify that the comment on sun-ejb-jar.xml is very possibly a red herring.
Reassigning, please evaluate.
I am not able to reproduce this problem with current daily builds. Closing as "works for me". Feel free to reopen if you upgrade to latest build and are still having difficulties.