Getting NetBeans 6.0 Ready for Seam Development

| Simple DataTable & Conversation Example

I’m starting a series of tutorials on web application development using the JBoss Seam framework. However, before I go on to that i’ll like to get started with setting up my favourite IDE – NetBeans for Seam development (sorry Eclipse folks, but I’m an addict. Just wishing that JBoss will see sense in working on a NetBeans version of the excellent JBoss Tools).

The following will be needed to follow this setup process
JDK 5 (6 is way faster to use) – http://java.sun.com
NetBeans 6.0 – http://www.netbeans.org
JBoss Seam 2.0 – http://labs.jboss.com/projects/download
JBoss Application Server (JBoss AS) 4.2.x – http://labs.jboss.com/projects/download
Seam plugin for NetBeans & Facelets Support – http://nbfaceletssupport.dev.java.net

I’ll assume that both the JDK and NetBeans are already installed. I’ll also assume that JBoss AS has been extracted into a suitable location, the JBOSS_HOME environment variable set and it has been added to your PATH variable.

In NetBeans, click the “Services” tab and right-click the “Servers” tree for the “Add Server” option.
NetBeans 6.0 Services Tab
Clicking that causes a “Add Server Instance” dialogue box to open up. This same result can be gained by selecting the “Tools” menu and selecting the “Servers” menu option, followed by the “Add Server” button. Select “JBoss Application Server” and in the Name field add the full name of the version of JBoss AS installed. This helps differentiate different instances of JBoss AS you might install. Currently mine reads “JBoss Application Server 4.2.1.GA”, reflecting the currently installed instance.
Supported servers in NetBeans
Clicking “Next” takes you to the next step to specify the location of the server. Mine is as shown below.
Location of Installed Server in NetBeans 6.0
The next step is to specify server configuration. The “default” domain is good enough for us and we’ll click “Finish” to conclude JBoss AS setup.
Configuring your instance of the server
Next is to add the Seam plugin for NetBeans. This is done by selecting the “Plugins” option from the “Tools” menu. NetBeans will scan all your installed plugins as well as establish an internet connection to find out available plugins. On the downloaded tab, click the “Add plugins” button. Navigate to the location of the Seam plugin for netbeans and click “Open” to add it. Click the “Install” button to install the Seam plugin.
Installing Seam plugin for NetBeans
Now specify where the Seam package you downloaded from have been extracted to. This saves you the trouble of having to specify it every time you use the Seam Generator to create a project. This can be done by selecting “Options” from the “Tools” menu and selecting the “Miscellaneous” icon. The “Seam Gen Framework” tab will allow to specify the location of Seam.

Seam Gen Configuration

The last thing to do is to install the NetBeans Facelets Support. Extract the nbfacelets-support. Following the previously described process, select all the nbm files included in nbfacelets-support zip archive.
Installing Facelets plugin for NetBeans
This ends the preparatory setup of NetBeans for Seam applications development. We’ll tackle some simple applications next on this series after this short commercial break.

16 Responses to “Getting NetBeans 6.0 Ready for Seam Development”

  1. JBoss/Seam tutorial series « Keeping it Small and Simple Says:

    [...] kicked off a while ago with a post showing how to set up NeBeans 6.0 for Seam development. Just today he posted a second part where he gets into actual Seam [...]

  2. bliggi.com Says:

    Getting NetBeans 6.0 Ready for Seam Development

    Getting NetBeans 6.0 Ready for Seam Development,I’m starting a series of tutorials on web application development using the JBoss Seam framework. However, before I go on to that i’ll like to get started with setting up my favourite IDE – NetBe…

  3. Stefan Says:

    Hi!

    Thx for a nice tutorial on the netbeans seam setup. I followed the tutorial and my setup is currently jboss AS 4.2.2GA, Seam 2.0.1GA, latest jdk6 latest netbeans 6 all downloaded today. I downloaded the facelets plugin and the nbseamgenintegration plugin.

    My problem is when I try to generate the seamproject at the last step(4) and click finsih the generator fails with an error that says that it cant run target “copy-lib” because somhow the path gets wrong.

    I read that the seamintegration plugin only is made for the seam 1.2.x version. Can this be the cause of the problem. The ant script tries to copy libs from from the root catalog instead of the correct relative path. Somehow the statement at row 598 in the build.xml script ” ” uses the root path.

    Any suggestions?

    Cheers Stefan N

  4. Edem Morny Says:

    Hi,
    I think this particular problem arises as a result of spaces in the path. Check that the path you provided for where jboss seam is installed does not have spaces in between eg. “c:\program files”. This also holds for the path to the JDBC connector being used to connect to the database and generate the entities.

    As far as i know the seam plugin works with Seam 2.0 as well. Hope this helps

    Cheers

  5. sd Says:

    When will the next in this series be released?

  6. Edem Morny Says:

    Check out the Seam category. U’ll find that I’ve made some other posts on Seam since this one.

  7. Stefan Says:

    Hi again

    Your assumption on the paths problem was probably correct but I could get things to work ayway. I found this solution.
    On Michael yuans blog
    http://www.michaelyuan.com/blog/2007/04/17/first-release-of-seam-plugin-for-netbeans/ anither person had the same problem. The easisest solution was to simply create the C:\modules\ext directory then everything worked.

    BTW I use windows XP

    Thx for great tutorials! keep it up.

    Stefan

  8. sd Says:

    BTW I find seamgen to be pretty much useless for NBs for what we are doing. We are working with GlassFish and making use of the Enterprise Application project format within NB for development. The project format produced by seamgen does work with NB but since it is not of the Enterprise Application format all the great context aware options are either missing or disabled when navigating the source. I think this is more the fault of NBs though.

  9. Seam: Simple Data Table & Conversation Example « Edem Morny’s Tech Blog Says:

    [...] Simple Data Table & Conversation Example Getting NetBeans 6 … | Using @RequestParameter and @Observer [...]

  10. EMOC Says:

    The following “add the Seam plugin for NetBean”does not work in NetBeans 6.1:

    click the “Add plugins” button. Navigate to the location of the Seam plugin for netbeans and click “Open” to add it.

    No *.nbm file is found, so no modules are selected.

  11. Bernard Says:

    am using netbeans 6.0 and dont have nbfacelets plugin installed yet i still get facelet functionalities. Also lately every time generate seam apps in netbeans it fails to generate,
    giving me an error. “jboss seam 2.0.x/seam gen/build.xml 577 C:/modules/ext not found”.
    this error ocurs when netbeans is copying files to the “../project name/lib”

  12. t0in Says:

    Bernard i have the same problem:
    “C:\modules\ext not found.”
    and i still don’t have resolved… did you [or anyone] find a way to “fix” this?
    thanks

  13. Mohamed El-Kalioby Says:

    Excellent Start

  14. TAG Says:

    t0in:

    The problem for me was the directory I was attempting to install my SeamGen project TO. By default NetBeans creates the “NetBeansProjects” folder in your “My Documents” directory, usually in the “Documents and Settings” folder. As stated before, the spaces in my path were causing SeamGen fits.

    My solution was to install my project to a new directory that was free of spaces (eg. C:\Development\Projects ) and it worked like a charm!

    I’m using NetBeans 6.5 Beta and so far I’m having no problems. All the Facelets issues with 6.1 seemed to clear up so far too! Highly recommended!

  15. Edem Morny Says:

    @t0in

    Thanks for putting up this solution. It’s a big help for some folks.

  16. michal Says:

    for the problems with “c:/modules/ext not found” there is simple workaround. Just create those dirs and leave empty. No errors anymore with that.

Leave a Reply