• General |
    Tuesday, January 29, 2013

Java EE 7 and NetBeans IDE - Early Support Available (TOTD #199)

NetBeans IDE provides the best
out-of-the-box experience for Java EE development, deployment, and
debugging. href="http://bertram2.netbeans.org:8080/job/web-main-javaee7/">Early
builds of NetBeans have already started providing support for
Java EE 7 features such as
  • Registering GlassFish 4
  • Creating Java EE 7 application
  • Wizard for JAX-RS 2 Filters/Interceptors
  • Initial support for Faces Flow
  • Loading templates from a resource library
  • Non-persistent EJB timers in Web profile
  • Wizard for WebSocket endpoints

provide a complete list of features slated for the release and the
builds can be downloaded from href="http://bertram2.netbeans.org:8080/job/web-main-javaee7/">bertram2.netbeans.org:8080/job/web-main-javaee7.
Here are some snapshots of the work completed so far.

Creating a Java EE 7 Web application and using GlassFish 4

height="243" width="431">

Creating a WebSocket endpoint

height="195" width="427">

Wizard for creating WebSocket endpoint

height="319" width="523">

The generated code looks like:

public class NewWSEndpoint {

public String onMessage(String message) {
return null;


Creating a JAX-RS 2 Filter

height="221" width="475">

Wizard for creating a JAX-RS 2 Filter

height="444" width="517">

By default it is a server-side filter but can be made client-side
filter too.

Wizard for creating a JAX-RS 2 Interceptor

height="438" width="513">

Creating a RESTful Java Client using JAX-RS 2 Client APIs

height="320" width="483">

Wizard for creating a JAX-RS 2 Client

height="507" width="515">

This is a very early work-in-progress so any href="mailto:nbusers@netbeans.org">feedback is welcome.

Download href="http://dlc.sun.com.edgesuite.net/glassfish/4.0/promoted/">GlassFish
4.0 promoted build, register it with NetBeans IDE and take it
for a test drive!

Join the discussion

Comments ( 16 )
  • Sebastián Roberto Garcia Tuesday, January 29, 2013

    It would be very nice if Netbeans comes with a visual facesFlow Editor like faces-config already have. Something like JDeveloper have for ADF-Task-Flows. With something like this you can see the flow very easy. Sorry for my english!

  • guest Tuesday, January 29, 2013

    It would be very nice if Netbeans comes with a visual facesFlow Editor like faces-config already have. Something like JDeveloper have for ADF-Task-Flows. With something like this you can see the flow very easy. Sorry for my english!

  • Petr Jiricka Wednesday, January 30, 2013

    @Sebastián, thanks for the suggestion, it is an interesting one! This is not something we can do in the short term (next few months - we already have very many things on our todo list), but we'll keep it in mind so we can implement it in a future release.

  • Arun Gupta Thursday, January 31, 2013
  • guest Monday, February 11, 2013

    Hi Arun,

    I downloaded the netbeans IDE Dev with JaveeEE 7 which comes with JSF 2.2 and tried to create a POC web application with facesFlow.

    It didn't recognize "@FlowDefinition", so I added latest version of java-faces-api on the classpath. Also, I have the latest glassfish 4 as the backend server.

    When I run the application, it gives "WELD-001303 No active contexts for scope type javax.faces.flow.FlowScoped" error . How to fix this?

    BTW, I am using the same flow example you have presented in other maven project sample (https://blogs.oracle.com/arungupta/entry/jsf_2_2_faces_flow).

    Also I can see a list of exceptions in gf console viz.

    org.jboss.weld.resources.spi.ResourceLoadingException: Error loading class com.sun.faces.scripting.groovy.GroovyHelperImpl$MojarraGroovyClassLoader

    org.jboss.weld.resources.spi.ResourceLoadingException: Error loading class com.sun.faces.vendor.GlassFishInjectionProvider

    which ultimately leads to

    Caused by: java.lang.ClassNotFoundException: com.sun.enterprise.InjectionException not found by org.glassfish.javax.faces [95]

    I thought probably the issue is with javax.faces.jar in the gf/module. So even replaced this with the latest javax.faces.jar from the repository. Still I am not able to fix the issue.

    Any direction? Thanks

  • Arun Gupta Tuesday, February 12, 2013

    Did you try using the GlassFish build specified in the sample ? Did you also replace the JARs as mentioned right after the screencast ?


  • sarad Tuesday, February 12, 2013

    Thanks Arun, I was using glassfish 4 build 74 . I switched back to build 72 and it worked. Looking forward for the beta version now.

  • Arun Gupta Friday, February 15, 2013

    Glad it worked for you again!

  • Vimal Thursday, March 7, 2013

    Hi Arun,

    I have installed NetBeans-dev-web-main-javaee7-142-on-20130306-full.zip and glassfish-4.0-b78.zip. I have also registered GF 4 with Netbeans. I am trying to create a Maven web project to generate a web project. The trouble is during generation it tries to download a version of archetype that doesn't even exist in repo (webapp-javaee7:0.2-SNAPSHOT) and it fails.

    Failed to execute goal org.apache.maven.plugins:maven-archetype-plugin:2.2:generate (default-cli) on project standalone-pom: The desired archetype does not exist (org.codehaus.mojo.archetypes:webapp-javaee7:0.2-SNAPSHOT) -> [Help 1]

    In your TOTD #201 (https://blogs.oracle.com/arungupta/entry/java_ee_7_maven_archetype) also you use a version which actually exists in the repo.

    Is there any way to edit the Maven Web Project Template in Netbeans to force it to look for the correct version?



  • Petr Jiricka Thursday, March 7, 2013

    Hi Vimal,

    sorry about this, the truth is that build 142 is flawed and this functionality is temporarily broken. We will fix within a day or so. In the meantime, please use build 136, that one works fine.

  • Vimal Thursday, March 7, 2013

    Thx Petr. By any chance would you know which build will it be fixed in.



  • guest Sunday, May 12, 2013
  • Petr Jiricka Monday, May 13, 2013

    Sorry about that, the link has changed to http://bertram2.netbeans.org:8080/job/javaee7/

  • guest Thursday, August 29, 2013

    while redeploying "hello1"; Failed to execute goal org.codehaus.cargo:cargo-maven2-plugin:1.4.2:redeploy (deploy) on project hello1: Execution deploy of goal org.codehaus.cargo:cargo-maven2-plugin:1.4.2:redeploy failed: Failed to create deployer with implementation class org.codehaus.cargo.container.glassfish.GlassFish4xInstalledLocalDeployer for the parameters (container [id = [glassfish4x]], deployer type [installed]). InvocationTargetException: The container configuration directory "c://glassfish4/glassfish/domains" does not exist. Please configure the container before attempting to perform any local deployment. Read more on: http://cargo.codehaus.org/Local+Configuration -> [Help 1]

    NOTICE DIRECTORY USED "c://GLASSFISH4"; GLASSFISH IS ON "E:\...". Couldn't find where it is set.

  • guest Saturday, August 31, 2013


    Couldn't find where it is set


    More research;

    "Hello1" (and Hello2) POM model,profiles;windows;Properties;glassfish.home.prefix:c:/[hard coded to "C" drive],using "E" drive. Redeploy fails, deploy works

  • Arun Gupta Monday, September 2, 2013

    Not sure if the error is related to this blog entry above ?

Please enter your name.Please provide a valid email address.Please enter a comment.CAPTCHA challenge response provided was incorrect. Please try again.Captcha