Sun Java System Portal Server 7.1 Configuration Guide

ProcedureTo Prepare the Oracle Database

  1. Prepare Oracle.

    1. Install Oracle 10g Release 2.

    2. Create a database instance named portal (the SID is portal).

    3. Log in to Oracle Enterprise Manager (http://hostname:5500/em) as SYSTEM.

    4. Create a tablespace communitymc_portal-id for example, communitymc_portal1.


      Note –

      For Wiki, FileSharing, and Surveys portlets, the tablespace and user accounts are created during the deployment of the Oracle configured portlet.


    5. Create a user account with the following information:

      Username:

      portal

      Password:

      portal

      Default Tablespace

      communitymc_portal-id

      Assign roles

      CONNECT and RESOURCE

  2. Prepare the web container for the New Database

    1. Locate the Oracle JDBC driver ojdbc14.jar.

      $ORACLE_HOME/jdbc/lib/ojdbc14.jar

      Alternatively, you can download the JDBC driver from the Oracle web site. Ensure that you download the version that is compatible with the Oracle RDBMS you use.

    2. Using the administration console or the CLI, add the JDBC driver ojdbc14.jar to the JVM classpath by adding the following JVM option: -Djdbc.drivers=oracle.jdbc.OracleDriver

      • For Web Server 7.0:

        1. Log in to Web Server 7 administrator console.

        2. Click the Configuration tab and select the respective configuration.

        3. Click the java tab and add the location of the ojdbc14.jar to the classpath suffix.

        4. Click the JVM Settings tab.

        5. Replace any existing -Djdbc.drivers entry as below:

          -Djdbc.drivers=oracle.jdbc.OracleDriver

        6. If the -Djdbc.drivers entry does not exit, add the following:

          -Djdbc.drivers=oracle.jdbc.OracleDriver

        7. Click Save.

        8. Click Deploy Pending and deploy the changes.

      • For Application Server 8.2

        1. Log in to Application Server administrator console.

        2. Click Configurations > server-config (Admin Config) > JVM Settings > Path Settings > Path Settings.

        3. Add the location of the ojdbc14.jar to the classpath suffix.

        4. Click the JVM Settings tab.

        5. Replace any existing -Djdbc.drivers entry as below:

          -Djdbc.drivers=oracle.jdbc.OracleDriver

        6. If the -Djdbc.drivers entry does not exit, add the following:

          -Djdbc.drivers=oracle.jdbc.OracleDriver

        7. Click Save.

  3. Configure Community Membership and Configuration.

    1. Edit the communitymc file database configuration file.


      % vi portal-data-dir/portals/portal-id/config/portal.dbadmin
      db.driver=oracle.jdbc.OracleDriver
      db.driver.classpath=JDBC-driver-path/ojdbc14.jar
      url=jdbc:oracle:thin:@oracle-host:oracle-port:portal
    2. Remove or comment out the following property from the communitymc configuration file.


      % vi portal-data-dir/portals/portal-id/config/communitymc.properties
      #javax.jdo.option.Mapping=derby
    3. Load community schema onto the Oracle database.


      % cd portal-data-dir/portals/portal-id/config
      % ant -Dportal.id=portal-id -f config.xml configure 
    4. Edit the JDBC and communitymc JDBC resource to point to Oracle.

      • For Web Server 7.0

        1. Log in to the Web Server administration console.

        2. Click the Configuration tab and select the respective configuration.

        3. Click the java tab > Resources and add a new JDBC resource.

        4. Click jdbc/communitymc and edit the Datasource Class Name.

        5. Set the Datasource classname to oracle.jdbc.pool.OracleDataSource

        6. Set the following properties: user: portal and password: portal.

        7. Delete the following derby properties: Database Name, Port Number, and Server Name.

        8. Add the following property: url: jdbc:oracle:thin:@oracle-host:oracle-port:portal

        9. Click Save.

        10. Click Deploy Pending and deploy the changes.

      • For Application Server

        1. Log in to the Application Server administration console.

        2. Click Resources > JDBC > Connection Pools > communitymcPool

        3. Set the Datasource classname to oracle.jdbc.pool.OracleDataSource

        4. Set the following properties: user: portal and password: portal.

        5. Delete the following derby properties: Database Name, Port Number, and Server Name.

        6. Add the following property: url: jdbc:oracle:thin:@oracle-host:oracle-port:portal

        7. Click Save.

  4. Configure and install Portlet applications.

    1. Run the filesharing script.


      portal-data-dir/portals/portal-id/portletapps/filesharing
    2. Configure tokens_ora.properties to load information when initially loading the schema.

      DB_ADMIN_DRIVER_CLASSPATH

      $ORACLE_HOME/jdbc/lib/ojdbc14.jar

      DB_JNDI_NAME

      OracleFileSharingDB

      DB_ADMIN_URL

      jdbc:oracle:thin:@<ORACLE_ HOST>:<ORACLE_PORT>:portal

      DB_ADMIN_USER

      <ORACLE_SYSTEM_USER>

      DB_ADMIN_PASSWORD

      <ORACLE_SYSTEM_PASSWORD>

      DB_URL

      jdbc:oracle:thin:@<ORACLE_ HOST>:<ORACLE_PORT>:portal

      DB_USER

      portalfs

      DB_PASSWORD

      portalfs

      DB_DRIVER_JAR

      $ORACLE_HOME/jdbc/lib/ojdbc14.jar

      DB_TABLESPACE_NAME

      Filesharingdb_<PORTAL_ID>

      DB_TABLESPACE_DATAFILE

      filesharingdb_<PORTAL_ID>

      DB_TABLESPACE_INIT_SIZE

      100M

    3. Using the administration console or the command-line tool provided by the web container, create the JDBC resource using the values from the tokens_ora.properties.

      • For Web Server 7.0:

        1. Create a JDBC Resource with the following properties:

          Resource JNDI Name

          jdbc/OracleFilesharingDB

          This value must match DB_JNDI_NAME in tokens_ora.properties.

          Datasource Class Name

          oracle.jdbc.pool.OracleDataSource

          This value must match DB_DATASOURCE in tokens_ora.properties.

          User

          portalfs

          This value must match DB_USER in tokens_ora.properties.

          Password

          portalfs

          This value must match DB_PASSWORD in tokens_ora.properties.

          URL

          jdbc:oracle:thin:@<ORACLE_ HOST>:<ORACLE_PORT>:portal

          This value must match DB_URL in tokens_ora.properties.

      • For Application Server:

        1. Create a new connection pool with the following properties:

          Name

          OracleFilesharingDBPool

          This value must match DB_JNDI_NAME in tokens_ora.properties.

          Resource Type

          javax.sql.DataSource

          Datasource Class Name

          oracle.jdbc.pool.OracleDataSource

          This value must match DB_DATASOURCE in tokens_ora.properties.

        2. In the Properties list, delete all the default properties and add the following:

          User

          portalfs

          This value must match DB_USER in tokens_ora.properties.

          Password

          portalfs

          This value must match DB_PASSWORD in tokens_ora.properties.

          URL

          jdbc:oracle:thin:@<ORACLE_ HOST>:<ORACLE_PORT>:portal

          This value must match DB_URL in tokens_ora.properties.

        3. Create a JDBC resource with the following value:

          Resource JNDI Name

          jdbc/OracleFilesharingDB

          This value must match DB_JNDI_NAME in tokens_ora.properties.

          Connection Pool

          OracleFilesharingDBPool

          This value must match the pool that is created in the previous step.

        4. Add the available target to the Selected list. Click OK.

    4. Undeploy existing portlets that use Java DB Database as a datastore.


      /opt/SUNWportal/bin/psadmin undeploy-portlet -u \
      uid=amadmin,ou=people,dc=acme,dc=com -f password-file \
      -p portal-id -i portal-instance-id
      
    5. Deploy the newly configured file sharing portlet.


      cd portal-data-dir/portals/portal-id/portletapps/filesharing
      ant -Dapp.version=ora

      This ant command performs several tasks including regenerating the war image, loading up the schema onto the database, and deploying the newly built portlet. If the ant command fails and you want to unload schema, use the following command:

      ant -Dapp.version=ora unconfig_backend


      Note –

      During deployment provide the Access Manager administrator password.

      If the ant -Dapp.version=ora command fails with the following error, “Error: Password file does not exist or is not readable,” run ant deploy from command line to deploy the portlet.


    6. Repeat this procedure for the other portlet applications, such as Surveys and Wiki.