Monday Jun 29, 2009

Running Netbean GlassFish V3 qa-functional Test

The GlassFish V3 plugin qa-functional test is running a little bit different than its previous GlassFish V2.x version which uses XTest for the harness.
Below is the procedure to check out the Netbean web-main, build and run with GlassFish V3 plugin qa-functional test.
Software requirements:
Mercurial hg, ant1.7.1, jdk1.5.0_17, jdk1.6.0_13. GlassFish V3 promoted build
Install Software (Solaris x86): 
Checkout, build and run-test
%hg clone
%cd web-main; ant
%ant -f glassfish.javaee/build.xml -Dtest-qa-functional-sys-prop.v3.server.path=/root/V3-B51-SDK/glassfish -Dtest-qa-functional-sys-prop.v3.server.javaExe=/usr/jdk/jdk1.6.0_12/bin/java test-qa-functional
Where: /root/V3-B51-SDK/glassfish is GlassFish V3 Server installed location
Generate report
%cd glassfish.javaee; ant test-generate-html
Fix the PermGem Memory Problem:
export ANT_OPTS="-Xmx512m -XX:MaxPermSize=128m"

Thursday Sep 04, 2008

PHP with Glassfish V3 and Netbean 6.5

Today I try configure and run PHP files with Glassfish V3 for both Quercus and Joomla (JavaBridge), and here is how I see.

1.  Joomla (JavaBridge) PHP
The simplest way for Joomla (JavaBridge) is just deploy the JavaBridege.war file to V3 server after unzip the file as shown in figure below:

Then, click launch to execute the JavaBridge PHP Sample index file as shown in the figurre below

Click the 1st link to execute test PHP info file, please see the result figure below:

If you want to customize the PHP application, unwar the JavaBridge.war file, do some cleanup then war the file back. For more instruction, please visist S├ębastien Dionne's article

2. For Quercus PHP
The same procedure applies to Quercus. Download Quercus zip file, unzip the file then war it. Use Glassfish Admin GUI console to deploy the app (in my case, I named it as Quercus.war). Please see figure below

3. If you want to use Netbean 6.5 IDE to write PHP files for mutiple applications, you can visit Arun Gupta's Blog for configuration steps. EXCEPT, copy all jars files to "GLASSFISH_HOME/glassfish/lib" directory" instead of "GLASSFISH_HOME/domains/domain/lib" likes in V2.

Friday Aug 29, 2008

Glassfish V3 Prelude Server with Netbean 6.5

Below is the simple steps to create and execute a sample Servlet Web Module with NB 6.5 for Glasfish V3 Server.

1.  Go to  download the latest 6.5 bits
2.  Install the Netbean IDE - by default Glassfish V2 and V3 sevrers were bunbdled with NB 6.5 as described in the figure below:

3. Start Netbean IDE (you can start from command line or from the Desktop icon)
    -If you click at Services tab > expand  the Servers node, you should see Glassfish V3 prelude server listed there
    -Right-click at Glassfish V3 node should allow you to start the server or view the server log or launch the  admin GUI console as described in the figure below:

4. To deploy a simple Servlet Web Project, click Project Tab > from File menu, select New Project > expand Samples > Java Web > select Servlets Example > click Next > choose a location for the project > click Finish button

5. Change server run time to Glassfish V3 Prelude (by default it's set to V2), right-click at ServletsExample project > select Run > change server from Glassfish V2 to Glassfish V3 > click OK

6. Right-click at ServletExamples project > select Run menu
       Glassfish V3 Server will be started (if not) > ServletExamples project is deployed and executed as shown in the figure below

Thursday Apr 17, 2008

Glassfish V3 with Netbean 6.1

Today, I just download Netbean 6.1 RC and try to see if it works with Glassfish V3 server. I'm impressed. It took me <5 minutes to have Glassfish V3 installed and configured with Netbean IDE. The procedure is so much simple and fast now.

It's required only 2 steps to configure Glassfish V3 with Netbean IDE. The Glassfish server was installed during the adding server process. View the screencast below to see how simple it is.
Steps to add Glassfish V3 to Netbean 6.x IDE

Wednesday Mar 19, 2008

Run Netbean Plugin Automation test with Glassfish V2 by using Jemmy/Jelly and XTest Tools

1. Requirements
      a. Software: Glassfish V2, Python 2.2.4 or later version and Mercurial 0.9.5
          Note: for Mercurial if you need to build it, please click here
      b. Netbean account (userID/password)
2. Getting a Copy of Netbean Repository
      a. Create a template working directory (nb_all)
          $mkdir nb_all
          $cd nb_all
      b. Run the mercurial command below to check out all netbean modules
         $hg clone http://hg.netbeans-DOT-org/main
     c. Configure your user name and write access to configuration files
         Edit ../main/.hg/hgrc and add lines
            username =
            host =
            default =
            default-push =
         (Replace jhacker with your username. Replace secretpass with your password and with your proxy server if you have one)
         For full mercurial instruction please visit
3. Build Netbean j2ee and xtest Modules
       To build  j2ee module
            $cd main
            $ant -f  nbbuild/build.xml  -Dcluster.config=j2ee
            $cd xtest
    Note: to fix the outOfMemory problem, for bash/ksh shell set (export ANT_OPTS="-Xms256m -Xmx256m";)
                fix PermGen OutOfMemory problem (export ANT_OPTS="-Xmx512m -XX:MaxPermSize=128m"
4. Execute Test (resources, webapp and ejb/jfs) Module
$cd  /opt/SUNWappserver/bin  (assume you installed Glassfish server at that directory)
$./asadmin start-domain domain1
           $copy  cfg-qa-functional.xml.cfg-res  to cfg-qa-functional.xml  (to run only resources and configuration test suite)
$cd ../main/j2ee.sun.appsrv81/test
           $ant  -Dsjsas.server.path=/opt/SUNWappserver




« April 2014