users@glassfish.java.net

Help deploying EAR to Glassfish

From: <glassfish_at_javadesktop.org>
Date: Thu, 02 Apr 2009 11:29:47 PDT

Hi all. I have been trying to build an EAR to deploy on glassfish v2.1. I am able to deploy if I deploy from an directory. That is usually i would deploy to a local GF server from netbeans 6.5. This explodes the EAR into the /dist/gfdeploy folder. This deploys locally just fine as well as moving the folder contents over to the target server box, and deploying to that machines GF install from again the folder. But any attempt to deploy the EAR file (that is built in NB) to the GF server results in this exception

In the exploded folder view of the EAR, I have 5 libraries under the /, including the appserver-rt.jar mentioned below. As well as 1 ejb folder and 1 war folder containing the ejb and war files that belong to the EAR. And of course 1 META-inf folder also in the / of that ear archive. Also in the meta-inf folder, is the sun-application.xml that I generated through NB to map a security role and custom realm. So my question is why is this happening, what am I doing wrong?

        
Apr 2, 2009 13:16:01.562
Log Level
        
SEVERE
Logger
        
javax.enterprise.system.tools.deployment
Name-Value Pairs
        
_ThreadID=23;_ThreadName=Thread-744;_RequestID=fa1bf825-1067-463c-a9c0-d0e7760c3a26;
Record Number
        
768
Message ID
        
Exception occured in J2EEC Phasejava.lang.IllegalArgumentException
Invalid ejb jar [appserv-rt.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. com.sun.enterprise.deployment.backend.IASDeploymentException: Error loading deployment descriptors for module [Oper8EA] -- Invalid ejb jar [appserv-rt.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 com.sun.enterprise.deployment.backend.Deployer.loadDescriptors(Deployer.java:406) at com.sun.enterprise.deployment.backend.AppDeployerBase.loadDescriptors(AppDeployerBase.java:359) at com.sun.enterprise.deployment.backend.AppDeployer.explodeArchive(AppDeployer.java:303) at com.sun.enterprise.deployment.backend.AppDeployer.deploy(AppDeployer.java:207) at com.sun.enterprise.deployment.backend.AppDeployer.doRequestFinish(AppDeployer.java:148) at com.sun.enterprise.deployment.phasing.J2EECPhase.runPhase(J2EECPhase.java:208) at com.sun.enterprise.deployment.phasing.DeploymentPhase.executePhase(DeploymentPhase.java:108) at com.sun.enterprise.deployment.phasing.PEDeploymentService.executePhases(PEDeploymentService.java:966) at com.sun.enterprise.deployment.phasing.PEDeploymentService.deploy(PEDeploymentService.java:283) at com.sun.enterprise.deployment.phasing.PEDeploymentService.deploy(PEDeploymentService.java:835) at com.sun.enterprise.management.deploy.DeployThread.deploy(DeployThread.java:187) at com.sun.enterprise.management.deploy.DeployThread.run(DeployThread.java:225) Caused by: java.lang.IllegalArgumentException: Invalid ejb jar [appserv-rt.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 com.sun.enterprise.deployment.util.EjbBundleValidator.accept(EjbBundleValidator.java:95) at com.sun.enterprise.deployment.util.ApplicationValidator.accept(ApplicationValidator.java:82) at com.sun.enterprise.deployment.EjbBundleDescriptor.visit(EjbBundleDescriptor.java:730) at com.sun.enterprise.deployment.Application.visit(Application.java:1819) at com.sun.enterprise.deployment.archivist.ApplicationArchivist.validate(ApplicationArchivist.java:520) at com.sun.enterprise.deployment.backend.Deployer.loadDescriptors(Deployer.java:382) ... 11 more

Thanks All for the time, any help or hints would be greatly appreciated.
[Message sent by forum member 'javajoe83' (javajoe83)]

http://forums.java.net/jive/thread.jspa?messageID=340333