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) –
NetBeans 6.0 –
JBoss Seam 2.0 –
JBoss Application Server (JBoss AS) 4.2.x –
Seam plugin for NetBeans & Facelets Support –

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 thoughts on “Getting NetBeans 6.0 Ready for Seam Development

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

  2. Pingback:

  3. 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. 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


  5. 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.

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

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

  8. 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”

  9. 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?

  10. 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!

  11. 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

Fill in your details below or click an icon to log in: Logo

You are commenting using your account. Log Out / Change )

Twitter picture

You are commenting using your Twitter account. Log Out / Change )

Facebook photo

You are commenting using your Facebook account. Log Out / Change )

Google+ photo

You are commenting using your Google+ account. Log Out / Change )

Connecting to %s