NetBeans Forums

 FAQFAQ   SearchSearch   MemberlistMemberlist   RegisterRegister   ProfileProfile   Log in to check your private messagesLog in to check your private messages   Log inLog in 
  

Can't deploy/run - EE 6 with Maven - NB 7.0.1

 
Post new topic   Reply to topic    NetBeans Forums -> Java EE Users
View previous topic :: View next topic  
Author Message
vjenks



Joined: 09 Dec 2009
Posts: 10
Location: USA

PostPosted: Fri Dec 23, 2011 8:03 pm    Post subject: Can't deploy/run - EE 6 with Maven - NB 7.0.1 Reply with quote

I'm having the problem found in this (supposedly) fixed bug:

https://netbeans.org/bugzilla/show_bug.cgi?id=186223

I created a Maven Enterprise project w/ an EJB and web project. I created an empty Stateless bean and a single Entity in the EJB project, along w/ the persistence unit needed for my DB.

The fix described in the report is already present, by default, in the pom.xml of my EAR project. Here's what I found:

Code:

      <plugin>
        <groupId>org.apache.maven.plugins</groupId>
        <artifactId>maven-ear-plugin</artifactId>
        <version>2.4.2</version>
        <configuration>
            <version>6</version>
            <defaultLibBundleDir>lib</defaultLibBundleDir>
        </configuration>
      </plugin>


When I deploy, I'm having the exact same problem as described in the aforementioned bug report. I can't get rid of this error:

Quote:

Completed initial distribution of FinancialsAppEAR
Initializing...
deploy?DEFAULT=D:\Projects\NetbeansProjects\FinancialsApp\FinancialsAppEAR\target\gfdeploy\com.myapp_FinancialsAppEAR_ear_1.0-SNAPSHOT&name=com.myapp_FinancialsAppEAR_ear_1.0-SNAPSHOT&force=true failed on GlassFish Server 3.x
Error occurred during deployment: Exception while deploying the app [com.myapp_FinancialsAppEAR_ear_1.0-SNAPSHOT] : Invalid ejb jar [FinancialsAppEJB-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, @Singleton), please check server.log to see whether the annotations were processed properly.. Please see server.log for more details.
The module has not been deployed.
at org.netbeans.modules.j2ee.deployment.devmodules.api.Deployment.deploy(Deployment.java:210)
at org.netbeans.modules.maven.j2ee.ExecutionChecker.performDeploy(ExecutionChecker.java:173)
at org.netbeans.modules.maven.j2ee.ExecutionChecker.executionResult(ExecutionChecker.java:125)
at org.netbeans.modules.maven.execute.MavenCommandLineExecutor.run(MavenCommandLineExecutor.java:203)
at org.netbeans.core.execution.RunClassThread.run(RunClassThread.java:153)


In Netbeans, the little warning icon won't go away. When I click "Show and Resolve Problems", I'm prompted to download some org.eclipse eclipselink jars. It succeeds, but the icon doesn't disappear and it doesn't appear that it actually worked, since I can do this ad infinitum...it never goes away.

Quite frustrating, as I'm not familiar w/ Maven and just trying to get a simple app to deploy to GF 3.x. I never had this mess w/ the default Ant-based Enterprise type of project.

Can anyone help me out? Is Maven just a bad choice for Java EE 6 projects in Netbeans? I don't have time to hassle with build problems and learn yet another framework for something I feel should be automated and out-of-sight. I never had to deal with Ant before and hopefully never will. I just need to write some code!

Thanks!
Back to top
ken.ganfield



Joined: 18 Aug 2008
Posts: 31

PostPosted: Thu Jan 05, 2012 5:34 pm    Post subject: Re: Can't deploy/run - EE 6 with Maven - NB 7.0.1 Reply with quote

Try taking a look at this document to see if it helps.
http://netbeans.org/kb/docs/javaee/maven-entapp.html

On 2312//11 21:03 , vjenks wrote:
Quote:
I'm having the problem found in this (supposedly) fixed bug:

https://netbeans.org/bugzilla/show_bug.cgi?id=186223

I created a Maven Enterprise project w/ an EJB and web project. I created an empty Stateless bean and a single Entity in the EJB project, along w/ the persistence unit needed for my DB.

The fix described in the report is already present, by default, in the pom.xml of my EAR project. Here's what I found:


Code:

<plugin>
<groupId>org.apache.maven.plugins</groupId>
<artifactId>maven-ear-plugin</artifactId>
<version>2.4.2</version>
<configuration>
<version>6</version>
<defaultLibBundleDir>lib</defaultLibBundleDir>
</configuration>
</plugin>




When I deploy, I'm having the exact same problem as described in the aforementioned bug report. I can't get rid of this error:


Quote:
Completed initial distribution of FinancialsAppEAR
Initializing...
deploy?DEFAULT=D:\Projects\NetbeansProjects\FinancialsApp\FinancialsAppEAR\target\gfdeploy\com.myapp_FinancialsAppEAR_ear_1.0-SNAPSHOT&name=com.myapp_FinancialsAppEAR_ear_1.0-SNAPSHOT&force=true failed on GlassFish Server 3.x
Error occurred during deployment: Exception while deploying the app [com.myapp_FinancialsAppEAR_ear_1.0-SNAPSHOT] : Invalid ejb jar [FinancialsAppEJB-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, @Singleton), please check server.log to see whether the annotations were processed properly.. Please see server.log for more details.
The module has not been deployed.
at org.netbeans.modules.j2ee.deployment.devmodules.api.Deployment.deploy(Deployment.java:210)
at org.netbeans.modules.maven.j2ee.ExecutionChecker.performDeploy(ExecutionChecker.java:173)
at org.netbeans.modules.maven.j2ee.ExecutionChecker.executionResult(ExecutionChecker.java:125)
at org.netbeans.modules.maven.execute.MavenCommandLineExecutor.run(MavenCommandLineExecutor.java:203)
at org.netbeans.core.execution.RunClassThread.run(RunClassThread.java:153)


In Netbeans, the little warning icon won't go away. When I click "Show and Resolve Problems", I'm prompted to download some org.eclipse eclipselink jars. It succeeds, but the icon doesn't disappear and it doesn't appear that it actually worked, since I can do this ad infinitum...it never goes away.

Quite frustrating, as I'm not familiar w/ Maven and just trying to get a simple app to deploy to GF 3.x. I never had this mess w/ the default Ant-based Enterprise type of project.

Can anyone help me out? Is Maven just a bad choice for Java EE 6 projects in Netbeans? I don't have time to hassle with build problems and learn yet another framework for something I feel should be automated and out-of-sight. I never had to deal with Ant before and hopefully never will. I just need to write some code!

Thanks!



Back to top
Display posts from previous:   
Post new topic   Reply to topic    NetBeans Forums -> Java EE Users All times are GMT
Page 1 of 1

 
Jump to:  
You cannot post new topics in this forum
You cannot reply to topics in this forum
You cannot edit your posts in this forum
You cannot delete your posts in this forum
You cannot vote in polls in this forum
You can attach files in this forum
You can download files in this forum


Powered by phpBB
By use of this website, you agree to the NetBeans Policies and Terms of Use. © 2012, Oracle Corporation and/or its affiliates. Sponsored by Oracle logo