Versions Compared

Key

  • This line was added.
  • This line was removed.
  • Formatting was changed.

...

Oracle is a commercial database available from http://www.oracle.com.
The Oracle FAQ is available from http://www.orafaq.com.

Obtaining a Driver

A Oracle JDBC driver is also available through http://www.oracle.com. Versions for Oracle 8i and Oracle 9i are available. The driver downloads as a single "zip" file (for example, classes12.zip). The file should be stored in a directory where it will be accessible from the uPortal build environment (for example /usr/local/java/oracle/lib/classes12.zip)

...

The uPortal build.properties will need to be modifed. Find the property called jdbcDriver and change it to point to the Oracle zip/jar file, for example:

Code Block

jdbcDriver.jar=/usr/local/java/lib/classes12.zip

The uPortal rdbm.properties file (in the properties/db directory) will need to modified to specify the driver properties. First, comment out the property definitions which are currently defined (most likely, for HypersonicSQL). The rdbm.properties file contains several sample entries. Uncomment the lines for the Oracle database and make whatever changes necessary to match your local database installation, For example:

Code Block
    ##### Oracle - example
    jdbcDriver=oracle.jdbc.driver.OracleDriver
    jdbcUrl=jdbc:oracle:thin:@localhost:1521:uportal
    jdbcUser=test
    jdbcPassword=mypass 

The dbloader.xml properties file (also in the properties/db directory) may also need to be modified. This file is used by the DbLoader tool to create the uPortal database tables and populate the database. It contains several sample entries which create db-type-mappings for different databases. Find the tags for an Oracle database and modify the db-version, driver-name, and driver-version as necessary. For example:

Code Block


   <db-type-mapping>
      <db-name>Oracle</db-name>
      <!-- Line break has to be here -->
      <db-version>Oracle8 Enterprise Edition Release 8.0.6.2.0 - Production
      PL/SQL Release 8.0.6.2.0 - Production</db-version>
      <driver-name>Oracle JDBC driver</driver-name>
      <driver-version>8.1.6.0.0</driver-version>
      <type><generic>TIMESTAMP</generic><local>DATE</local></type>
      <!-- map more types here -->
    </db-type-mapping> 

The PersonDirs.xml file (also in the properties directory) may need to be modified; This file is used if the database is to be used to provide user directory information.

Code Block

   
<!-- JDBC Properties -->
    <driver>oracle.jdbc.driver.OracleDriver</driver>
    <url>jdbc:oracle:thin:@localhost:1521:uportal</url>
    <logonid>test</logonid>
    <logonpassword>mypass</logonpassword>,
    <uidquery>SELECT FIRST_NAME||' '||LAST_NAME AS FIRST_LAST,
    FIRST_NAME, LAST_NAME, EMAIL FROM UP_PERSON_DIR WHERE USER_NAME=?></uidquery> 

Loading the Database

Loading the database requires a couple of steps

...