# Oracle9iAS Portal Developer Kit (PDK)
PDK-Java v2: Upgrading From Release 9.0.2.0.x to Release 9.0.2.4.0 and later

Creation Date: | October 29, 2002
Status: | Production
Version: | PDK Release 2 (9.0.2.4.0 and later)

### Contents

> Introduction
> Removing Old PDK-Java JAR Files
> Installing New PDK-Java JAR Files
> Add Library Path References using Oracle Enterprise Manager
> Add Library Path References Manually
> Testing the Upgrade

## Introduction

Previous releases of PDK-Java v2 recommended that the shared jar files pdkjava.jar and ptlshare.jar be packaged within your WAR files in the WEB-INF/lib directory. This was due to a bug in the LogManager class that resulted in log messages being written to a seemingly random application.log file (possibly belonging to different web applications).

This bug has now been fixed and we are recommending that the shared jar files being referenced as libraries of the web application rather than being packaged with each application. This also makes future PDK-Java upgrades easier since you only have to replace the shared libraries in one place rather than repackage and redeploy every single provider. It also reduces the disk footprint of providers.

## Removing Old PDK-Java JAR Files

Locate any existing copies of pdkjava.jar and ptlshare.jar and move them to a safe location so you can restore them if necessary. Usually these files are found in the following locations:

Oracle9iAS Instance

- $IAS_HOME/portal/jlib
- $IAS_HOME/portal/pdkjava/v2/lib
- $IAS_HOME/j2ee/<oc4j instance>/application/<application name>/WEB-INF/lib

Standalone OC4J Instance

- $OC4J_HOME/j2ee/home/application/<application name>/WEB-INF/lib

  Notes
  $IAS_HOME is the root directory of your Oracle9iAS installation. This may have been referred to as $ORACLE_HOME in your Oracle9iAS installation documentation.
  $OC4J_HOME is the root directory of your standalone OC4J installation.

## Installing New PDK-Java JAR Files

This step involves copying the shared jar files from the new PDK distribution to the target Oracle9iAS or standalone OC4J instance.

### Installing New PDK-Java JAR Files in an Oracle9iAS Instance

Copy the latest PDK-Java jar files to your Oracle9iAS home. The jar files are included in $unzip_directory/pdk/libcommon/portal/jlibs. The other jar files included in the libcommon directory are included for installation in a standalone OC4J instance. Oracle9iAS installations already include all the jar files needed by the PDK-Java

> copy $unzip_directory/pdk/libcommon/portal/jlib/* to $IAS_HOME/portal/jlib/
> copy $unzip_directory/pdk/libcommon/portal/jlib/* to $IAS_HOME/portal/pdkjava/v2/lib/
> Notes
> $unzip_directory denotes the directory where you have unzipped the pdk.zip.

### Installing New PDK-Java JAR Files in a Standalone OC4J Instance

Copy the latest PDK-Java jar files to your Oracle9iAS home. The jar files are included in $unzip_directory/pdk/libcommon/portal/jlibs. The other jar files included in the libcommon directory are included for installation in a standalone OC4J instance. Oracle9iAS installations already include all the jar files needed by the PDK-Java

> create the directory $OC4J_HOME/portal/lib if it does not already exist
> create the directory $OC4J_HOME/webcache/jlib if it does not already exist
> copy $unzip_directory/pdk/libcommon/portal/jlib/* to $OC4J_HOME/portal/jlib/
> copy $unzip_directory/pdk/libcommon/webcache/jlib/* to $OC4J_HOME/webcache/jlib/
> Notes
> $unzip_directory denotes the directory where you have unzipped the pdk.zip.

## Add Library Path References Using Oracle Enterprise Manager

#### This section assumes:

- you have Oracle9iAS installed with OEM or
- you have a stand-alone OC4J instance with OEM installed and configured to manage that instance.

If you do not have one of these configurations, either install and configure them according to their respective installation instructions or follow the instructions for adding library path references manually

1. Go to your OEM interface and login. You can usually access OEM at http://{server}:1810/
2. Click on the Oracle9iAS mid-tier where you have deployed your web provider application. You will see a list of all your system components in your mid-tier.
3. Click on the OC4J instance where you where you have deployed your web provider application.
4. Click on the web provider application you want to update. This will display a page containing information about that application.
5. Click General under the Administration : Properties section.
6. In the Library Paths section, you can add a library. To add a library path, click Add Another Row. Add the following library paths:

> ../../../../portal/jlib/pdkjava.jar
> ../../../../portal/jlib/ptlshare.jar
> ../../../../webcache/jlib/jawc.jar
> ../../jazn.jar

1. Click Apply.

Your web application will now use the jar files referenced in the library paths instead of those that were packaged in the WAR file.

## Add Library Path References Manually

#### This section assumes:

- you have a stand-alone OC4J instance without Oracle Enterprise Manager.

Shared library references must be added manually by editing the orion-application.xml file. To do this:

1. Stop your OC4J instance using the following command:

   java -jar admin.jar ormi://<host>:<port>/ admin <admin_password> -shutdown

2. Add the following dependent library references to the orion-application.xml file. This file is found at the following location:

   $OC4J_HOME/home/application-deployments/<application name>/orion-application.xml

> Dependent library references:

> <library path="../../../../portal/jlib/pdkjava.jar"/>
> <library path="../../../../portal/jlib/ptlshare.jar"/>
> <library path="../../../../webcache/jlib/jawc.jar"/>
> <library path="../../jazn.jar"/>

1. Start up the OC4J instance again by executing the following command:

   java -jar admin.jar ormi://<host>:<port>/ admin <admin_password> -startup

Your web application will now use the jar files referenced in the library paths instead of those that were packaged in the WAR file.

## Testing the Upgrade

Once you have removed the old jar files, installed the new jar files in the correct location and added the necessary library path references, you should be able to test your web provider by accessing portal pages that contain portlets from that provider.

If you encounter any problems, verify the location of the jar files and make sure you included the correct library path references either using OEM or by looking at the orion-application.xml file.

Revision History: |
Revision No | Last Update
1.0 | October 29, 2002

Oracle Corporation World Headquarters 500 Oracle Parkway Redwood Shores, CA 94065, USA http://www.oracle.com/ | Worldwide Inquiries: 1-800-ORACLE1 Fax 650.506.7200 | Copyright and Corporate Info