Project WebSynergy Milestone 3 Getting Started Guide

Chapter 2 Installation and Configuration

This chapter explains how to get, install, and configure Project WebSynergy software.


Tip –

If you are a general user for whom WebSynergy software has already been installed by someone else, skip this chapter and jump ahead to Chapter 3, Using Project WebSynergy Software.


Before You Begin

Software and Hardware Requirements

Table 2–1 lists the operating system, Java platform, and system memory requirements for WebSynergy Milestone 3 software.

Table 2–1 Project WebSynergy Milestone 3 Software and Hardware Requirements

Operating Systems

  • OpenSolaris 2008.05 (x86/x64)

  • Solaris 10 or later (SPARC/x86)

  • Modern Linux operating systems (Ubuntu 8, SuSE 10, Red Hat 5)

  • Microsoft Windows XP Professional, Vista 32–bit

  • Mac OS X 10.4 or later

Java Platform

  • Java Runtime Environment 1.6.0_7 or later (1.5 or later on Mac OS X)

  • Java JDK 1.6.0_7 or later (1.5 or later on Mac OS X)

System Memory (RAM)

  • Solaris, Linux: 1 GB minimum, at least 2 GB recommended

  • Windows: 2 GB minimum, at least 3 GB recommended

  • MacOS X: 1 GB minimum, at least 2 GB recommended

Installation Directories

Project WebSynergy software is distributed in one of several different downloadable ZIP packages, depending on your operating system and the version of GlassFish Application Server software you choose to use. In general, the default WebSynergy installation directory is whatever directory you unzip the WebSynergy installation package into.

Throughout this document, the directory in which you have unzipped the WebSynergy package is referred to as ws_install_dir.

Platform-Specific Path Separators

The instructions and examples in this document use UNIX-style forward slash (/) path separators in file and command names. If WebSynergy is installed on a Windows system, be sure to use backslashes (\) instead of forward slashes; for example:

Getting Project WebSynergy Software

Project WebSynergy software is available for free as a downloadable ZIP package from the Project WebSynergy Milestone 3 Downloads page. There are several WebSynergy ZIP packages available, and the one you should choose depends on your operating system and the version of GlassFish Application Server software you want to use.

All WebSynergy ZIP packages include both WebSynergy Milestone 3 software and either GlassFish v3 or GlassFish v2 Application Server software.

Basic Installation

This section explains how to install Project WebSynergy software with either GlassFish v3 or GlassFish v2 Application Server software. Note that these instructions include some additional steps you need to perform when installing WebSynergy on systems running Mac OS X.

ProcedureTo Install WebSynergy Software With GlassFish v3

  1. (Mac OS X systems only) Configure your Java environment.

    • If using JDK 1.6, use the Java Preferences application to specify the correct JDK version.

      Also be sure to set JAVA_HOME to point to JDK 1.6.


      export JAVA_HOME=/System/Library/Frameworks/JavaVM.framework/Versions/1.6.0/Home
    • If using JDK 1.5, rename the 14compatibility.jar file.

      The 14compatibility.jar file includes some aspects of the Xalan XSLT processor and the Crimson XML parser that conflict with newer versions of the classes bundled with WebSynergy Milestone 3.

      Use the following commands to rename the 14compatibility.jar file:


      cd /System/Library/Frameworks/JavaVM.framework/Versions/1.5.0/ \
      Classes/.compatibility
      sudo mv 14compatibility.jar 14compatibility.jar.orig
      cd /System/Library/Frameworks/JavaVM.framework/Versions/A/Resources/.compatibility
      sudo mv 14compatibility.jar 14compatibility.jar.orig
  2. Download and unzip the websynergy-gfv3.zip package to the directory of your choice.

    For the remainder of these instructions, the directory in which you have unzipped the websynergy-gfv3.zip is referred to as ws_install_dir.

  3. Change to the ws_install_dir/glassfish/bin directory and start the GlassFish application server.


    cd ws_install_dir/glassfish/bin
    ./asadmin start-domain

    This starts the GlassFish server, bundled database server, and the WebSynergy sample site using the default configuration settings.


    Note –

    You may receive the following error when starting the server:


    Domain (domain1) did not respond in 90 seconds. It means it is still coming up or
    it has failed to come up. Check server.log for details.

    This message can in most cases be ignored, but it may indicate that there will be a delay of several minutes before the server is actually available.


  4. (Mac OS X systems only) Configure the domain.xml file 64–bit JVM.

    When running any 64-bit JVM such as JDK 1.6 (which runs by default in 64-bit mode on Mac OS X), you need to edit the domain.xml file in the GlassFish domain1/config directory.

    1. Stop the GlassFish domain1 server.


      cd ws_install_dir/glassfish/bin
      ./asadmin stop-domain
    2. Edit the domain.xml file for domain1, changing the PermSize and MaxPermSize property values.

      This domain.xml file is located in ws_install_dir/domains/domain1/config. Change the PermSize and MaxPermSize values as follows:

      • -XX:PermSize=192M to -XX:PermSize=256M

      • -XX:MaxPermSize=192M to -XX:MaxPermSize=256M

    3. Restart domain1.


      ws_install_dir/glassfish/bin/asadmin start-domain
  5. (All operating systems) Open the WebSynergy sample site.

    Point your Web browser to http://localhost:8080.


    Note –

    The page may take a long time to load the first time after server start. If you see the default GlassFish “Your site is installed” page or a mostly empty page with a single text link titled “Welcome,” wait a few minutes and then refresh the page. Subsequent page loads should proceed more rapidly.


ProcedureTo Install WebSynergy Software With GlassFish v2

  1. (Mac OS X systems only) Configure your Java environment.

    • If using JDK 1.6, use the Java Preferences application to specify the correct JDK version.

      Also be sure to set JAVA_HOME to point to JDK 1.6.


      export JAVA_HOME=/System/Library/Frameworks/JavaVM.framework/Versions/1.6.0/Home
    • If using JDK 1.5, rename the 14compatibility.jar file.

      The 14compatibility.jar file includes some aspects of the Xalan XSLT processor and the Crimson XML parser that conflict with newer versions of the classes bundled with WebSynergy Milestone 3.

      Use the following commands to rename the 14compatibility.jar file:


      cd /System/Library/Frameworks/JavaVM.framework/Versions/1.5.0/ \
      Classes/.compatibility
      sudo mv 14compatibility.jar 14compatibility.jar.orig
      cd /System/Library/Frameworks/JavaVM.framework/Versions/A/Resources/.compatibility
      sudo mv 14compatibility.jar 14compatibility.jar.orig
  2. Download the websynergy-gfv2-platform.zip file for the platform of your choice to the directory of your choice.

    For the remainder of these instructions, the directory in which the ZIP file is unpacked is referred to as ws_install_dir.

  3. (Solaris and Linux systems only) When installation is complete, change to the ws_install_dir directory and make the files in the ant/bin directory executable.


    cd ws_install_dir
    chmod -R 755 ./ant/bin
  4. Run the Ant setup.xml script.


    ws_install_dir/ant/bin/ant -f ws_install_dir/glassfish2/setup.xml

    The required GlassFish domain and database configuration proceeds. When the “BUILD SUCCESSFUL” message is displayed, the WebSynergy installation is complete.

  5. Change to the ws_install_dir/glassfish2/bin directory and start the GlassFish application server.


    cd ws_install_dir/glassfish2/bin
    ./asadmin start-domain

    This starts the GlassFish server, database server, and the WebSynergy sample site using the default configuration settings.


    Note –

    You may receive the following error when starting the server:


    Domain (domain1) did not respond in 90 seconds. It means it is still coming up or
    it has failed to come up. Check server.log for details.

    This message can in most cases be ignored, but it may indicate that there will be a delay of several minutes before the server is actually available.


  6. (Mac OS X systems only) Configure the domain.xml file 64–bit JVM.

    When running any 64-bit JVM such as JDK 1.6 (which runs by default in 64-bit mode on Mac OS X), you need to edit the domain.xml file in the GlassFish domain1/config directory.

    1. Stop the GlassFish domain1 server.


      cd ws_install_dir/glassfish/bin
      ./asadmin stop-domain
    2. Edit the domain.xml file for domain1, changing the PermSize and MaxPermSize property values.

      This domain.xml file is located in ws_install_dir/domains/domain1/config. Change the PermSize and MaxPermSize values as follows:

      • -XX:PermSize=192M to -XX:PermSize=256M

      • -XX:MaxPermSize=192M to -XX:MaxPermSize=256M

    3. Restart domain1.


      ws_install_dir/glassfish/bin/asadmin start-domain
  7. (All operating systems) Open the WebSynergy sample site.

    Point your Web browser to http://localhost:8080.


    Note –

    The page may take a long time to load the first time after server start. If you see the default GlassFish “Your site is installed” page or a mostly empty page with a single text link titled “Welcome,” wait a few minutes and then refresh the page. Subsequent page loads should proceed more rapidly.