Skip Headers

Oracle® Application Server Upgrade and Compatibility Guide 10g Release 3 (10.1.3) Part No. B25585-01 |
| Home | Solution Area | Contents | Index

Previous | Next |

# 2 Step-By-Step Upgrade Examples

This chapter provides detailed examples of upgrading from previous versions of Oracle Application Server to 10g Release 3 (10.1.3).

In each example, the FAQApp sample application is used to provide an example of how to redeploy an application on 10g Release 3 (10.1.3).

Refer to the following for more information:

- Upgrading FAQApp on a Single Oracle Application Server Instance

- Upgrading FAQApp in a Clustered Environment

## 2.1 Upgrading FAQApp on a Single Oracle Application Server Instance

The following sections provide an example of upgrading to 10g Release 3 (10.1.3) and redeploying an existing application on a single 10g Release 3 (10.1.3) OC4J instance:

- Starting Point for the FAQApp Upgrade

- Overview of the FAQApp Upgrade Procedure

- The FAQApp Upgrade Procedure

### 2.1.1 Starting Point for the FAQApp Upgrade

This procedure assumes the following starting point for the FAQApp upgrade:

- You have installed and configured a single 10g Release 2 (10.1.2) middle-tier Oracle home.

  Note: This procedure describes specifically how to upgrade from 10g Release 2 (10.1.2), but the procedure is also valid if you are using 10g (9.0.4) as your starting point.

- You have optionally made some site-specific changes to the Oracle HTTP Server configuration file (`httpd.conf`).

- You have successfully deployed the FAQApp sample application to the 10g Release 2 (10.1.2) middle tier.

  The FAQApp is available for download from the following location on Oracle Technology Network (OTN):

      http://www.oracle.com/technology/tech/java/oc4j/demos/904/index.html

  See Also: "Configuring the FAQ Application Demo" in the Oracle Application Server Containers for J2EE User's Guide in the 10g Release 2 (10.1.2) documentation library, which is available from the following location on the Oracle Technology Network (OTN):
      http://www.oracle.com/technology/documentation/appserver.html

- You now want to deploy the same FAQApp application on an instance of Oracle Application Server 10g Release 3 (10.1.3).

- You have installed and configured Apache Ant, which is a Java-based build tool that is included in the following directory of your 10g Release 3 (10.1.3) Oracle home:

      (UNIX) 1013_ORACLE_HOME/ant/
      (Windows) 1013_ORACLE_HOME\ant\

  Apache Ant, as well as documentation for using the tool, is also available from the following Web site:

      http://ant.apache.org/

### 2.1.2 Overview of the FAQApp Upgrade Procedure

The steps in the following procedure involve installing a new 10g Release 3 (10.1.3) Oracle home, modifying and rebuilding FAQApp, and then redeploying FAQapp on the new 10g Release 3 (10.1.3) OC4J instance, as shown in Figure 2-1.

Figure 2-1 Overview of the FAQApp Upgrade Procedure

Description of "Figure 2-1 Overview of the FAQApp Upgrade Procedure"

### 2.1.3 The FAQApp Upgrade Procedure

The following sections describe the steps you can follow to install and configure a new 10g Release 3 (10.1.3) Oracle home and then recompile and redeploy the FAQApp on the new installation:

- Step 1: Install 10g Release 3 (10.1.3)

- Step 2: Apply Any Site-Specific Oracle HTTP Server Configuration Settings

- Step 3: Configure the FAQApp Data Source in the 10g Release 3 (10.1.3) Instance

- Step 4: Rebuild the FAQApp EAR File With Required JSP Library Archives

- Step 5: Deploy the Modified FAQApp EAR File on 10g Release 3 (10.1.3)

- Step 6: Test the FAQApp Sample Application on 10g Release 3 (10.1.3)

#### 2.1.3.1 Step 1: Install 10g Release 3 (10.1.3)

Use the following steps to install a new 10g Release 3 (10.1.3) Oracle home. In this particular example, you will install a combined 10g Release 3 (10.1.3) Web server and OC4J instance in a single Oracle home:

1. Log in to the host computer and start Oracle Universal Installer.

   You can install the 10g Release 3 (10.1.3) Oracle home on the same host as the 10g Release 2 (10.1.2) J2EE and Web Cache Oracle home, or on a different host.

   See Also: "Starting the Oracle Universal Installer" in the Oracle Application Server Installation Guide

2. On the Oracle Application Server 10g 10.1.3.0.0 Installation Screen, select Basic Installation Mode and select the options described in Table 2-1.

   This installation type installs a combined Web server and OC4J Instance in a single Oracle home.

   See Also: 'Recommended Topologies" in the Oracle Application Server Installation Guide for more information about this and other 10g Release 3 (10.1.3) recommended topologies.

   Table 2-1 Options to Select on the Installation Screen

   Option | Description
   --- | ---
   Installation Directory | Enter the directory where you want install Oracle Application Server.
   Basic Installation Mode | Select this option to install the combined Web server and OC4J instance in a single Oracle home.
   Instance Name | The instance name identifies this Oracle Application Server instance. If you have more than one Oracle Application Server instance on the same host, the instances must have unique names.
   Administration Username | The administration username for Oracle Application Server instances is set to `oc4jadmin` and cannot be changed. To manage Oracle Application Server instances using Oracle Enterprise Manager, log in as the `oc4jadmin` user.
   Administration Password | Enter a password for the `oc4jadmin` user.
   Confirm Password | Enter the password again to confirm that you entered it correctly.

3. Click Install and then follow the instructions on each screen to advance through the installation procedure.

   The installation is complete when the End of Installation Screen appears. This screen tells you whether or not your installation was successful. It also provides information about the default Oracle HTTP Server port, as well as the URL you can use to access the 10g Release 3 (10.1.3) Application Server Control Console.

#### 2.1.3.2 Step 2: Apply Any Site-Specific Oracle HTTP Server Configuration Settings

If you have made any site-specific configuration changes to the Oracle HTTP Server `httpd.conf` configuration file in the 10g Release 2 (10.1.2) Oracle home, apply those changes to the `httpd.conf` file in the 10g Release 3 (10.1.3) Oracle home.

Like the 10g Release 2 (10.1.2) release, the 10g Release 3 (10.1.3) Oracle HTTP Server is based on the on Apache 1.3 Web Server. As a result, you can copy any configuration changes (such as modifications to the `httpd.conf` file) directly to the 10g Release 3 (10.1.3) Oracle home.

#### 2.1.3.3 Step 3: Configure the FAQApp Data Source in the 10g Release 3 (10.1.3) Instance

The FAQApp uses a data source that consists of an Oracle database where the FAQ schema has been installed. This procedure assumes that you have successfully deployed and configured the FAQApp in a previous Oracle Application Server release. As a result, the FAQ schema already exists in an existing Oracle database.

However, before you deploy the FAQApp on the new 10g Release 3 (10.1.3) instance, use the following procedure to configure the `OracleDS` data source, which is required by the FAQApp application, in the new 10g Release 3 (10.1.3) OC4J container.

Note: This procedure modifies the existing `OracleDS` datasource that is defined as part of the default application, which means that the datasource is available to all appliations desployed on this instance. Alternatively, you could define the data source using a `data-sources.xml` file within the FAQApp EAR file. For more information about defining JDBC data sources, see the Oracle Containers for J2EE Services Guide.

1. Use your browser to display the 10g Release 3 (10.1.3) Application Server Control Console.

   The URL for the Application Server Control Console is shown on the End of Installation Screen. This information is also saved to the following file in the 10g Release 3 (10.1.3) Oracle home:

       (UNIX) ORACLE_HOME/install/readme.txt
       (Windows) ORACLE_HOME\install\readme.txt

   The first page that appears in the Application Server Control Console is the Cluster Topology page.

2. In the Members section of the Cluster Topology page, click home to display the OC4J Home page for the default `home` instance.

3. From the OC4J Home page, click Administration.

4. On the OC4J Administration page, click the task icon in the JDBC Resources row of the task table.

   Note that an "OracleDS" data source is created during the Oracle Application Server installation. However, this data source is a managed data source that relies on the "Example Connection Pool" to make its connections to the data base.

5. Click Example Connection Pool to display the Edit Connection Pool page.

6. Enter the JDBC URL that provides a connection to the Oracle database that hosts the FAQ schema and click Apply.

   Use the following format for the connection URL:

       jdbc:oracle:thin:@hostname:port:sid

   For example:

       jdbc:oracle:thin:@appserv1.acme.com:1521:orcl

   Hint: If you have trouble constructing the JDBC connection URL, you can optionally do the following: Click Create in the Connection Pool section of the JDBC Resources page to create a new connection pool. On the Connection Pool - Application page, select the default application, and then select New Connection Pool. Click Continue to display the Create Connection Pool page. On this page, you can enter information about your database and Application Server Control will construct the JDBC URL for you automatically. From this page, you can also test the connection to be sure it is working before you proceed. Delete the existing `OracleDS` data source and create a new `OracleDS` data source that uses the connection pool you just created.

7. Navigate to the Cluster Topology page and restart the OC4J instance to load the new connection URL for the JDBC connection pool.

   Note that when you restart the `home` instance, Application Server Control is also restarted. As a result, you must wait a few seconds and then enter the URL for the Application Server Control Console again. You can then log into the restarted Application Server Control Console.

#### 2.1.3.4 Step 4: Rebuild the FAQApp EAR File With Required JSP Library Archives

The FAQApp requires the JavaServer Pages (JSP) Standard Tag Libraries. In previous versions of Oracle Application Server, these libraries were automatically available as part of the OC4J instance. In 10g Release 3 (10.1.3), if an application requires the JSP tag libraries, then these two jar files must be included as part of the application EAR file before you deploy the application.

See Also: Section 3.2.2, "New Location for JavaServer Pages (JSP) Standard Tag Libraries (JSTL)"

Use the following procedure to locate the JSP Standard Tag Libraries in your existing 10g Release 3 (10.1.3) Oracle home and include them in the FAQApp EAR file:

1. If you have not done so already, unpack the `FAQApp.ear` file into a temporary, working directory.

   Note that a copy of the `FAQApp.ear` file that you deployed on 10g Release 2 (10.1.2) should be available in the following directory in the 10g Release 2 (10.1.2) Oracle home:

       (UNIX) 1012_ORACLE_HOME/j2ee/OC4J_Instance/applications/FAQApp/FAQApp.ear
       (Windows) 1012_ORACLE_HOME\j2ee\OC4J_Instance\applications\FAQApp\FAQApp.ear

   In this example, replace 1012_ORACLE_HOME with the complete path to the 10g Release 2 (10.1.2) Oracle home, and replace OC4J_Instance with the name of the 10g Release 2 (10.1.2) OC4J instance that you used to deploy the FAQApp application.

2. Locate the following archives in the Oracle home of a 10g Release 3 (10.1.3) installation:

   UNIX:

       1013_ORACLE_HOME/j2ee/home/default-web-app/WEB-INF/lib/standard.jar
       1013_ORACLE_HOME/j2ee/home/default-web-app/WEB-INF/lib/jstl.jar

   Windows:

       1013_ORACLE_HOME\j2ee\home\default-web-app\WEB-INF\lib\standard.jar
       1013_ORACLE_HOME\j2ee\home\default-web-app\WEB-INF\lib\jstl.jar

3. Copy these two .jar files to the following directory in the FAQApp working directory:

       faq/lib/

4. Delete any existing archives (.ear, .war, or other files) from the FAQApp working directory:

       faq/dist/

   Note that this step is important because the `ant all` command (which you run in the next step) will not remove or overwrite any existing archive files in the `dist` directory. As a result a new EAR file will not be created if a previous version of the EAR file exists in the `faq/dist` directory.

5. Use Apache Ant to rebuild the jar file using the following command:

       ant all

   When you enter this command, Apache Ant compiles and builds the FAQApp application EAR file, based on the information provided in the `build.xml` file that is included in the `faq` directory.

   See Also: Apache Ant Project Web Site at:
       http://ant.apache.org/

   Note: This example uses Apache Ant to rebuild the `FAQApp.ear` file. In fact, you can use other tools to perform this task. For more information, see the Oracle Containers for J2EE Deployment Guide.

6. Locate the new FAQApp EAR file in the following location in the FAQApp working directory:

       faq/dist/FAQApp.ear

#### 2.1.3.5 Step 5: Deploy the Modified FAQApp EAR File on 10g Release 3 (10.1.3)

Use the following procedure to deploy the modified FAQApp sample application on your new 10g Release 3 (10.1.3) OC4J instance.

Note: This procedure describes how to use the Application Server Control Console to deploy the FAQApp sample application. Note, however, that OC4J 10g Release 3 (10.1.3) provides a number of options for deploying your applications. For more information, see "Deployment Tool Options Provided with OC4J" in the Oracle Containers for J2EE Deployment Guide.

1. Navigate to the OC4J Home page in the 10g Release 3 (10.1.3) Application Server Control Console.

2. Click Applications to display the Applications page.

3. Click Deploy.

4. On the Deploy: Select Archive page, click Browse and select the modified `FAQApp.ear` file.

   Do not change the other default settings on the page.

5. On the Deploy: Application Attributes page, enter `FAQApp` in the Application Name field.

   Do not change the other default settings on the page.

6. On the Deploy: Deployment Settings page, click Deploy to deploy the FAQApp application on the 10g Release 3 (10.1.3) OC4J instance.

   Application Server Control displays the progress of the deployment and then displays a message indicating whether or not the deployment was successful.

   If the deployment was not successful, review the progress messages for any specific error messages.

   If any error messages mention SQL or database connections, the problem is likely with the data source configuration. Review the steps you performed in Section 2.1.3.3, "Step 3: Configure the FAQApp Data Source in the 10g Release 3 (10.1.3) Instance". Verify that the data source is valid and that the FAQ schema exists in the database. Verify that the database user name you used to connect to the database has accesss rights to the FAQ schema.

#### 2.1.3.6 Step 6: Test the FAQApp Sample Application on 10g Release 3 (10.1.3)

If the deployment was successful, you can verify that the FAQApp application is working properly by accessing the following URL in your Web browser:

    http://host.domain:port/FAQApp/

For example:

    http://appserv1.acme.com:7779/FAQApp/

The FAQApp prompts you for a username and password. It is assumed you configured the users and roles for the application when you deployed FAQApp on your previous Oracle Application Server installation.

Enter `faq` as the username and `faq` as the password. The FAQApp home page should appear as shown in Figure 2-2. If the application does not display, note any error messages that appear in the browser window.

If any error messages mention SQL or database connections, the problem is likely with the data source configuration. Review the steps you performed in Section 2.1.3.3, "Step 3: Configure the FAQApp Data Source in the 10g Release 3 (10.1.3) Instance". Verify that the data source is valid and that the FAQ schema exists in the database. Verify that the database user name you used to connect to the database has accesss rights to the FAQ schema.

Figure 2-2 Successfully Deployed FAQApp Sample Application

Description of "Figure 2-2 Successfully Deployed FAQApp Sample Application"

## 2.2 Upgrading FAQApp in a Clustered Environment

The following sections provide an example of upgrading to a 10g Release 2 (10.1.2) clustered environment and redeploying an existing application on a new 10g Release 3 (10.1.3) cluster:

- Starting Point for Upgrading FAQApp in a Clustered Environment

- Overview of Upgrading FAQApp in a Clustered Environment

- The FAQApp Upgrade Procedure in a Clustered Environment

### 2.2.1 Starting Point for Upgrading FAQApp in a Clustered Environment

This procedure assumes the following starting point for the FAQApp upgrade:

- You have installed and configured a 10g Release 2 (10.1.2) OracleAS Farm and created an OracleAS Cluster within that farm.

  Note: This procedure describes specifically how to upgrade from 10g Release 2 (10.1.2), but the procedure is also valid if you are using 10g (9.0.4) as your starting point.

- You have successfully deployed the FAQApp sample application to the 10g Release 2 (10.1.2) OracleAS Cluster.

  The FAQApp is available for download from the following location on Oracle Technology Network (OTN):

      http://www.oracle.com/technology/tech/java/oc4j/demos/904/index.html

  See Also: "Configuring the FAQ Application Demo" in the Oracle Application Server Containers for J2EE User's Guide in the 10g Release 2 (10.1.2) documentation library

- You now want to deploy the same FAQApp application on a similar, Oracle Application Server 10g Release 3 (10.1.3) clustered environment.

- You have installed and configured Apache Ant, which is a Java-based build tool that is included in the following directory of your 10g Release 3 (10.1.3) Oracle home:

      (UNIX) 1013_ORACLE_HOME/ant/
      (Windows) 1013_ORACLE_HOME\ant\

  Apache Ant, as well as documentation for using the tool, is also available from the following Web site:

      http://ant.apache.org/

### 2.2.2 Overview of Upgrading FAQApp in a Clustered Environment

The steps in the following procedure involve installing a new 10g Release 3 (10.1.3) Oracle home, modifying and rebuilding FAQApp, and then redeploying FAQapp on the new 10g Release 3 (10.1.3) OC4J instance, as shown in Figure 2-3.

Figure 2-3 Overview of Upgrading FAQApp in a Clustered Environment

Description of "Figure 2-3 Overview of Upgrading FAQApp in a Clustered Environment"

### 2.2.3 The FAQApp Upgrade Procedure in a Clustered Environment

The following sections describe the steps you can follow to install and configure a 10g Release 3 (10.1.3) clustered environment and then redeploy the FAQApp on the new cluster:

- Step 1: Install and Configure a 10g Release 3 (10.1.3) Cluster

- Step 2: Apply Any Site-Specific Oracle HTTP Server Configuration Settings

- Step 3: Create an FAQApp Group

- Step 4: Configure the FAQApp Data Source for the Group

- Step 5: Rebuild the FAQApp EAR File With Required JSP Library Archives

- Step 6: Deploy FAQApp and Configure Application Clustering

- Step 7: Test the FAQApp Sample Application on 10g Release 3 (10.1.3)

#### 2.2.3.1 Step 1: Install and Configure a 10g Release 3 (10.1.3) Cluster

Use the following steps to install a new 10g Release 3 (10.1.3) clustered environment:

Note: The following procedure describes how to install one of the recommended topologies, which are documented in more detail in the Oracle Application Server Installation Guide. Specifically, this procedure describes how to install the topology described in the section, "Installing Multiple Combined Web Server and OC4J Instances to Form a Cluster" in the Oracle Application Server Installation Guide.

1. For the first middle tier Oracle home, install an Administration OC4J instance.

   After you start Oracle Universal Installer, select Advanced Installation Mode and then select Integrated Web Server, J2EE Server and Process Management.

   See Also: "Installing Integrated Web Server, J2EE Server and Process Management" in the Oracle Application Server Installation Guide

   During the installation procedure, follow the prompts, ensuring you do the following:

   - In the Administration Instance Settings page, select Configure this as an Administration OC4J Instance.

   - In the Administration Settings page, make a note of the `oc4jadmin` password you enter in the Administrator Account Password fields; you will need that password later.

   - In the Cluster Topology Configuration screen, select Configure this HTTP Server instance to be part of an Oracle Application Server cluster topology and specify a multicast discovery address for the cluster.

     Make a note of the address and port that you enter on this page; you will need it later.

     The multicast address you enter must be within the valid address range, which is `224.0.0.1` to `239.255.255.255`.

2. For the second middle tier, perform another Integrated Web Server, J2EE Server and Process Management advanced installation.

   See Also: "Installing Integrated Web Server, J2EE Server and Process Management" in the Oracle Application Server Installation Guide

   During the installation procedure, follow the prompts, ensuring you perform the following:

   - In the Administration Instance Settings page, deselect Configure this as an Administration OC4J Instance.

   - In the Administration Settings page, enter the same `oc4jadmin` password in the Administrator Account Password fields that you entered in Step 1.

     It is important that you enter the same `oc4jadmin` password that you entered during the first installation. In order to use groups, each OC4J instance in the group must have the same `oc4jadmin` password. If they do not, then you will have to reset the password after the installation.

   - In the Cluster Topology Configuration screen, select Configure this HTTP Server instance to be part of an Oracle Application Server cluster topology and enter the same multicast address and port you entered in Step 1. Instances that share the same multicast address are automatically configured as a cluster.

   See Also: "Configuring Multiple OC4J Middle Tiers in a Cluster," in the Oracle Application Server Administrator's Guide for further information about configuring this topology

3. Verify that the installation and formation of the cluster was successful; do this by using your Web browser to display the 10g Release 3 (10.1.3) Application Server Control Console.

   The URL for the Application Server Control Console is shown on the End of Installation Screen. This information is also saved to the following file in the 10g Release 3 (10.1.3) Oracle home:

       (UNIX) ORACLE_HOME/install/readme.txt
       (Windows) ORACLE_HOME\install\readme.txt

   When you first display the Application Server Control Console, both of the 10g Release 3 (10.1.3) installations should appear on the Cluster Topology page.

   See Also: Section 5.1, "Using the Cluster Topology Instead of an OracleAS Farm"

#### 2.2.3.2 Step 2: Apply Any Site-Specific Oracle HTTP Server Configuration Settings

If you have made any site-specific configuration changes to the Oracle HTTP Server `httpd.conf` configuration file in the 10g Release 2 (10.1.2) OracleAS Cluster, apply those changes to the `httpd.conf` file in each of the 10g Release 3 (10.1.3) Oracle homes.

Like the 10g Release 2 (10.1.2) release, the 10g Release 3 (10.1.3) Oracle HTTP Server is based on the on Apache 1.3 Web Server. As a result, you can copy any configuration changes (such as modifications to the `httpd.conf` file) directly to the 10g Release 3 (10.1.3) Oracle homes.

See Also: Oracle HTTP Server Administrator's Guide

#### 2.2.3.3 Step 3: Create an FAQApp Group

Within a 10g Release 3 (10.1.3) cluster, you can organize multiple OC4J instances into a single group. You can then perform specific deployment and configuration tasks on the group.

To create an group for the FAQApp:

1. Enter the following command in each of your new 10g Release 3 (10.1.3) Oracle homes:

       (UNIX) 1013_ORACLE_HOME/bin/createinstance -instanceName FAQApp
       (Windows) 1013_ORACLE_HOME\bin\createinstance -instanceName FAQApp

   Note the following important considerations when creating the new OC4J instances:

   - Be sure to use the same OC4J instance name (`FAQApp`) in each Oracle home. When you use the same name for two OC4J instances in your cluster (one in each Oracle home), Oracle Application Server automatically creates a group with that name.

   - When prompted for the OC4J administrator's password, be sure to enter the same administrator password you used when you installed both 10g Release 3 (10.1.3) Oracle homes in Section 2.2.3.1; otherwise, you will not be able to perform group-wide operations.

2. In each 10g Release 3 (10.1.3) Oracle home, reload `opmn.xml` to load the new instance configuration, then restart OPMN to start the new instance. For example, on Windows:

       1013_ORACLE_HOME\opmn\bin\opmnctl reload
       1013_ORACLE_HOME\opmn\bin\opmnctl startall

3. Verify that the FAQApp OC4J instances were created, and that the FAQApp group was formed; do this by displaying the Cluster Topology page in the Application Server Control Console.

   A new FAQApp group should appear in the list of Groups on the Cluster Topology page. If the group does not appear, review the previous steps in this section to be sure you performed each step accurately.

#### 2.2.3.4 Step 4: Configure the FAQApp Data Source for the Group

The FAQApp uses a data source that consists of an Oracle Database where the FAQ schema has been installed. This procedure assumes that you have successfully deployed and configured the FAQApp in a previous Oracle Application Server release. As a result, the FAQ schema already exists in an existing Oracle database.

However, before you deploy the FAQApp on the 10g Release 3 (10.1.3) group, you must use the following procedure to configure the `OracleDS` data source, which is required by the FAQApp application.

Use the following procedure to define the data source for all the OC4J instances in the FAQApp group:

1. From the Cluster Topology page in the Application Server Control Console, scroll to the Groups section of the page.

2. Click the name of the FAQApp group.

3. From the Group page, click Administration.

4. On the Group Administration page, click the task icon in the JDBC Resources row of the task table.

   Note that an "OracleDS" data source has already been created. However, this data source is a managed data source that relies on the "Example Connection Pool" to make its connections to the data base.

5. Click Example Connection Pool to display the Edit Connection Pool page.

6. Enter the JDBC URL that provides a connection to the Oracle database that hosts the FAQ schema and click Apply.

   Use the following format for the connection URL:

       jdbc:oracle:thin:@hostname:port:sid

   For example:

       jdbc:oracle:thin:@appserv1.acme.com:1521:orcl

   Hint: If you have trouble constructing the JDBC connection URL, you can optionally do the following: Click Create in the Connection Pool section of the JDBC Resources page to create a new connection pool. On the Connection Pool - Application page, select the default application, and then select New Connection Pool. Click Continue to display the Create Connection Pool page. On this page, you can enter information about your database and Application Server Control will construct the JDBC URL for you automatically. From this page, you can also test the connection to be sure it is working before you proceed. Delete the existing OracleDS data source and create a new `OracleDS` data source that uses the connection pool you just created.

7. Restart the FAQApp group to load the new JDBC connection pool URL:

   1. Navigate to the Cluster Topology page.

   2. Select the FAQApp group.

   3. Click Stop.

   4. After Application Server Control confirms that the group has been stopped, select the FAQApp group again and click Start.

#### 2.2.3.5 Step 5: Rebuild the FAQApp EAR File With Required JSP Library Archives

The FAQApp requires the JavaServer Pages (JSP) Standard Tag Libraries. In previous versions of Oracle Application Server, these libraries were automatically available as part of the OC4J instance. In 10g Release 3 (10.1.3), if an application requires the JSP tag libraries, then these two jar files must be included as part of the application EAR file before you deploy the application.

See Also: Section 3.2.2, "New Location for JavaServer Pages (JSP) Standard Tag Libraries (JSTL)"

Use the following procedure to locate the JSP Standard Tag Libraries in your existing 10g Release 3 (10.1.3) Oracle home and include them in the FAQApp EAR file:

1. If you have not done so already, unpack the `FAQApp.ear` file into a temporary, working directory.

   Note that a copy of the FAQApp.ear file that you deployed on 10g Release 2 (10.1.2) should be available in the following directory in the 10g Release 2 (10.1.2) Oracle home:

       (UNIX) 1012_ORACLE_HOME/j2ee/OC4J_Instance/applications/FAQApp/FAQApp.ear
       (Windows) 1012_ORACLE_HOME\j2ee\OC4J_Instance\applications\FAQApp\FAQApp.ear

   In this example, replace 1012_ORACLE_HOME with the complete path to the 10g Release 2 (10.1.2) Oracle home, and replace OC4J_Instance with the name of the OC4J instance that you used to deploy the FAQApp application.

2. Locate the following archives in the Oracle home of a 10g Release 3 (10.1.3) installation:

   UNIX:

       1013_ORACLE_HOME/j2ee/home/default-web-app/WEB-INF/lib/standard.jar
       1013_ORACLE_HOME/j2ee/home/default-web-app/WEB-INF/lib/jstl.jar

   Windows:

       1013_ORACLE_HOME\j2ee\home\default-web-app\WEB-INF\lib\standard.jar
       1013_ORACLE_HOME\j2ee\home\default-web-app\WEB-INF\lib\jstl.jar

3. Copy these two .jar files to the following directory in the FAQApp working directory:

       faq/lib/

4. Delete any existing archives (.ear, .war, or other files) from the FAQApp working directory:

       faq/dist/

   Note that this step is important because the `ant all` command (which will be used in the next step) will not remove or overwrite any existing archive files in the dist directory. As a result a new EAR file will not be created if a previous version of the EAR file exists in the `faq/dist` directory.

5. Use Apache Ant to rebuild the jar file using the following command:

       ant all

   When you enter this command, Apache Ant compiles and builds the FAQApp application EAR file, based on the information provided in the build.xml file that is included in the `faq` directory.

   See Also: Apache Ant Project Web Site at:
       http://ant.apache.org/

   Note: This example uses Apache Ant to rebuild the `FAQApp.ear` file. In fact, you can use other tools to perform this task. For more information, see the Oracle Containers for J2EE Deployment Guide.

6. Locate the new FAQApp EAR file in the following location in the FAQApp working directory:

       faq/dist/FAQApp.ear

#### 2.2.3.6 Step 6: Deploy FAQApp and Configure Application Clustering

Use the following procedure to deploy the modified FAQApp sample application on the 10g Release 3 (10.1.3) FAQApp group.

During the deployment, you can also configure application clustering for the FAQApp, which enables session state replication across the application instances in the cluster. Examples of session state information include whether or not a user is logged in and the contents of a shopping cart.

Oracle Application Server 10g Release 3 (10.1.3) offers three protocols for session state replication. In this example, you enable the peer-to-peer replication protocol. When you select this protocol, OPMN automatically replicates state information to the other OC4J instances in the 10g Release 3 (10.1.3) cluster.

See Also: Section 5.3, "Using Application Clustering for State Replication"

To deploy the FAQApp on the FAQApp group and configure application clustering:

1. Navigate to the Cluster Topology page in the 10g Release 3 (10.1.3) Application Server Control Console.

2. Click the name of the FAQApp group to display the FAQApp Group page.

3. Click Applications to display the Group Applications page.

4. Click Deploy.

5. On the Deploy: Select Archive page, click Browse and select the updated `FAQApp.ear` file.

   Do not change the other default settings on the page.

6. On the Deploy: Application Attributes page, enter `FAQApp` in the Application Name field.

   Do not change the other default settings on the page.

7. On the Deploy: Deployment Settings page, click Configure Clustering and use the resulting page to enable session state replication for the FAQApp application:

   1. Select Override parent application clustering settings.

   2. Select Enable from the Clustering drop-down menu.

   3. Select Peer-Peer Replication; do not enter a value in the Bind Address field unless the host computer has multiple network cards.

   4. Click OK.

8. Click Deploy to deploy FAQApp to both OC4J instances in the FAQApp group.

   Application Server Control displays the progress of the deployment and then displays a message indicating whether or not the deployment was successful.

   If the deployment was not successful, review the progress messages for any specific error messages.

   If any error messages mention SQL or database connections, the problem is likely with the data source configuration. Review the steps you performed in Section 2.2.3.4, "Step 4: Configure the FAQApp Data Source for the Group". Verify that the data source is valid and that the FAQ schema exists in the database. Verify that the database user name you used to connect to the database has accesss rights to the FAQ schema.

#### 2.2.3.7 Step 7: Test the FAQApp Sample Application on 10g Release 3 (10.1.3)

If the deployment was successful, you can verify that the FAQApp application is working properly by accessing the following URL in your Web browser:

    http://host.domain:port/FAQApp/

For example:

    http://appserv1.acme.com:7779/FAQApp/

The FAQApp prompts you for a username and password. It is assumed you configured the users and roles for the application when you deployed FAQApp on your previous Oracle Application Server installation.

Enter `faq` as the username and `faq` as the password. The FAQApp home page should appear as shown in Figure 2-2. If the application does not display, note any error messages that appear in the browser window.

If any error messages mention SQL or database connections, the problem is likely with the data source configuration. Review the steps you performed in Section 2.2.3.4, "Step 4: Configure the FAQApp Data Source for the Group". Verify that the data source is valid and that the FAQ schema exists in the database. Verify that the database user name you used to connect to the database has accesss rights to the FAQ schema.