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.

Bug 162052 - Can't Run Maven EAR
Summary: Can't Run Maven EAR
Status: RESOLVED WORKSFORME
Alias: None
Product: javaee
Classification: Unclassified
Component: Maven (show other bugs)
Version: 6.x
Hardware: All All
: P1 blocker (vote)
Assignee: Milos Kleint
URL:
Keywords:
Depends on:
Blocks:
 
Reported: 2009-04-06 16:05 UTC by Jaroslav Pospisil
Modified: 2009-04-06 16:46 UTC (History)
0 users

See Also:
Issue Type: DEFECT
Exception Reporter:


Attachments
ejb's pom.xml (1.99 KB, text/xml)
2009-04-06 16:30 UTC, Jaroslav Pospisil
Details
ear's pom.xml (1.56 KB, text/xml)
2009-04-06 16:32 UTC, Jaroslav Pospisil
Details

Note You need to log in before you can comment on or make changes to this bug.
Description Jaroslav Pospisil 2009-04-06 16:05:52 UTC
Build 200904051400,Win Vista,JDK1.6.0_13

1) Start IDE with new userdir
2) Create new JAVAEE5 EAR (everything default)
3) Build ear with dependencies
4) Run it....ERROR in Glassfish v2.1 log:

WEB0302: Starting Sun-Java-System/Application-Server.
JBIFW0010: JBI framework ready to accept requests.
WEB0712: Starting Sun-Java-System/Application-Server HTTP/1.1 on 8080
WEB0712: Starting Sun-Java-System/Application-Server HTTP/1.1 on 8181
WEB0712: Starting Sun-Java-System/Application-Server HTTP/1.1 on 4848
SMGT0007: Self Management Rules service is enabled
Application server startup complete.
Exception occured in J2EEC Phasejava.lang.IllegalArgumentException: Invalid ejb jar
[mavenproject7-ejb-1.0-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.
com.sun.enterprise.deployment.backend.IASDeploymentException: Error loading deployment descriptors for module
[com.mycompany_mavenproject7-ear_ear_1.0-SNAPSHOT] -- Invalid ejb jar [mavenproject7-ejb-1.0-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 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.deploy(AppDeployer.java:226)
        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 [mavenproject7-ejb-1.0-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 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.archivist.ApplicationArchivist.openArchive(ApplicationArchivist.java:840)
        at com.sun.enterprise.deployment.archivist.ApplicationArchivist.openArchive(ApplicationArchivist.java:794)
        at com.sun.enterprise.deployment.backend.Deployer.loadDescriptors(Deployer.java:365)
        ... 10 more
Comment 1 Jaroslav Pospisil 2009-04-06 16:30:44 UTC
Created attachment 79543 [details]
ejb's pom.xml
Comment 2 Jaroslav Pospisil 2009-04-06 16:32:40 UTC
Created attachment 79544 [details]
ear's pom.xml
Comment 3 Milos Kleint 2009-04-06 16:36:20 UTC
have you added an ejb to the ejb module? if not, then the message is correct AFAIK. The application server doesn't allow
you to deploy an ejb module without ejbs. 

closing as worksforme, please reopen if you have created an ejb, rebuilt the module and it still doesn't work.
Comment 4 Jaroslav Pospisil 2009-04-06 16:46:14 UTC
Yup,that was the issue,I haven't remember that little detail.Thanks for help,at least we have confirmed this works
correctly;-)