users@glassfish.java.net

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

From: <forums_at_java.net>
Date: Sat, 24 Dec 2011 13:05:05 -0600 (CST)

I'm having the problem found in this (supposedly) fixed bug:
https://netbeans.org/bugzilla/show_bug.cgi?id=186223 [1]
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:

      <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:

/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!


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

--
[Message sent by forum member 'zambizzi']
View Post: http://forums.java.net/node/877370