BEA Logo BEA WebLogic Portal Release 4.0

  BEA Home  |  Events  |  Solutions  |  Partners  |  Products  |  Services  |  Download  |  Developer Center  |  WebSUPPORT

 

   WebLogic Portal Documentation   |   Deployment Guide   |   Previous Topic   |   Next Topic   |   Contents   |   Index

Configuring WebLogic Portal for Oracle Databases

 

WebLogic Portal includes a set of scripts that create Oracle tables and other data objects for use in any WebLogic Portal environment. Depending on the database environment that you are defining, you can choose to load sample data that supports the reference applications.

Usually, a development environment loads the sample data and a staging or production environment does not. In some cases, you may need to modify the default scripts so that they load non-operational sample data (such as data for the product catalog).

This section covers two types of Oracle configurations:

 


Configuring for jDriver

Step 1: Install the Oracle Client Software

Install the Oracle Client software on the same host as WebLogic Portal. Configure the Oracle Net Service Name to specify the target Oracle database. Then test the connection with the database user name and password that your database administrator assigned to you.

For information on the Oracle releases that WebLogic Portal supports for your platform type, refer to Supported Platforms in the Installation Guide.

Step 2: Create WebLogic Portal Tablespaces and a Schema-Owner User Account

To separate its data from the Oracle data dictionary and from data that other applications use, WebLogic Portal uses the following tablespaces:

A script named create_tablespaces.sql creates the WLCS_DATA and WLCS_INDEX tablespaces. It locates both table data and indexes in the WLCS_DATA tablespace. If possible, each tablespace should be placed on a separate physical disk drive. In Step 6: Rebuild Indexes, you move the indexes to the WLCS_INDEX tablespace.

By default, the schema-owner user account for WebLogic Portal is named WEBLOGIC and the tablespace is WLCS_DATA with a temporary tablespace named TEMP. The sample script named create_users.sql creates the WEBLOGIC user with default tablespaces and grants the WEBLOGIC user appropriate database permissions.

If you need to locate multiple instances of the WebLogic Portal schema on a single database, you must use a different schema-owner user account for each instance. For example, if you need to locate development and test database schemas on the same database instance, you could create two schema owner user accounts named WL_DEV and WL_TEST.

Creating WLCS_DATA and WLCS_INDEX

Note: In this document, PORTAL_HOME refers to the directory into which you installed WebLogic Portal.

To create the WLCS_DATA and WLCS_INDEX tablespaces, do the following (usually, a Database Administrator must complete these tasks):

  1. From the host on which you installed the Oracle client and WebLogic Portal, open a UNIX shell or MS-DOS command prompt window and change directories to PORTAL_HOME/db/oracle/817/admin.

  2. Make a backup copy of create_tablespaces.sql.

  3. In a text editor, open create_tablespaces.sql and modify the pathnames for the DATA_PATHNAME and INDEX_PATHNAME variables to match your own local directory path structures. For example, on a UNIX system, if two disks are mounted as /usr1 and /usr2 and the Oracle SID is PROD, use the following pathnames:
    DEFINE DATA_PATHNAME=/usr1/oradata/PROD
    DEFINE INDEX_PATHNAME=/usr2/oradata/PROD

  4. If you want to use a schema-owner user account other than the default WEBLOGIC, do the following:

    1. Make a backup copy of create_users.sql.

    2. In a text editor, open create_users.sql and change WEBLOGIC to the schema owner user account of your choice.

  5. Enter the following command to start a SQL*Plus session:

    sqlplus username/password@net_service_name

    where username is system or a user with privileges to create tablespaces,
    password is the system (or other users) password, and
    net_service_name is the Net Service name that you defined for the Oracle database.

  6. Enter the following to create tablespaces:

    @create_tablespaces.sql

    Output from executing create_tablespaces.sql will be written to a file named CREATE_TABLESPACES.LOG. Verify the results of running create_tablespaces.sql before you continue.

  7. Enter the following to create a schema-owner user account:

    @create_users.sql

    Output from executing create_users.sql will be written to a file named CREATE_USERS.LOG. Verify the results of running create_users.sql before you continue.

  8. Exit SQL*Plus.

Determining the Size of the WebLogic Portal Tablespaces

Monitoring the growth and usage of database resources and data files is a critical task that a Database Administrator must do on a regular basis. By default, the WLCS_DATA and WLCS_INDEX tablespaces are 100 Megabytes each. Any of the following factors might require you to adjust these default sizes:

To determine the amount of disk space that you need in your production environment, a Database Administrator can analyze the usage of the database tables in the development environment. Based on the number of users, groups, personalization data and data from other services, the Database Administrator can project estimates for disk space requirements.

Step 3: Configure Properties and Environment Variables for Oracle

When you install WebLogic Portal, it is configured to support a Cloudscape demonstration database. This section describes how to modify the default Cloudscape properties to support an Oracle database.

To configure properties files and environment variables for Oracle, complete the following tasks in the order indicated below:

  1. Start the WebLogic Server Administration Console

  2. Configure JDBC Connection Pools for Oracle

  3. Update Settings for the RDBMS Security Realm

  4. Configure the JDBC Helper Service

  5. Stop the Server

  6. Update Environment Variables for the Server

Start the WebLogic Server Administration Console

To configure a WebLogic Portal server to support Oracle, start the server and access the WebLogic Server Administration Console for the server's domain.

For example, you want to configure myServer (which listens on port 7501). Start myServer on your local host and then enter the following URL in a browser:
http://[host]:[port]/console

For more information on starting the WebLogic Server Administration Console, refer to "WebLogic Server Administration Console" in the WebLogic Portal Architectural Overview.

Configure JDBC Connection Pools for Oracle

Connection pools provide ready-to-use pools of connections to your RDBMS. The application server creates the pools during server startup, thus eliminating the overhead of your enterprise application having to establish database connections for each transaction. For more information about connection pools, refer to "Overview of Connection Pools" in the WebLogic Server Programming WebLogic JDBC guide.

This section contains the following subsections:

Configure commercePool for Oracle Databases

To configure commercePool for Oracle, do the following:

  1. In the left pane of the WebLogic Server Administration Console, click Services -> JDBC -> Connection Pools.

  2. Under the Connection Pools folder, click commercePool.

  3. On the General tab, enter the following values:

  4. To save your entries, click Apply.

  5. Next to Password, click change.

  6. On the Change Password page, enter and confirm the password of the user account. Then click Apply.

    The WebLogic Server Administration Console keeps this password in an encrypted format.

  7. To save your updated password, on the commercePool page, click Apply.

Configure dataSyncPool for Oracle Databases

Configure a JDBC connection pool named dataSyncPool by doing the following:

  1. In the left pane of the WebLogic Server Administration Console, click Services -> JDBC -> Connection Pools.

  2. Under the Connection Pools folder, click dataSyncPool.

  3. On the General tab, enter the following values:

  4. To save your entries, click Apply.

  5. Next to Password, click change.

  6. On the Change Password page, enter and confirm the password of the user account. Then click Apply.

    The WebLogic Server Administration Console keeps this password in an encrypted format.

  7. To save your updated password, on the dataSyncPool page, click Apply.

Update Settings for the RDBMS Security Realm

If you are using the RDBMS security realm, you must change the RDBMSRealm settings to match the database type that stores the user information. If you are using LDAP or some other security realm, you can ignore these settings.

To change these settings, do the following:

  1. In the left pane of the WebLogic Server Administration Console, click Security -> Realms -> wlcsRealm.

    Note: If you named your RDBMS realm something other than wlcsRealm, click the realm that you created.

  2. In the right pane, click the Database tab and enter the following values:

  3. To save your entries, click Apply.

  4. Next to Password, click change. (See Figure 9-1.)

    Figure 9-1 Modify Values on the Database Tab (jDriver Example)


     

  5. On the Change Password page, enter and confirm the password of the user account. Then click Apply.

    The WebLogic Portal Administration Tools keeps this password in an encrypted format.

  6. To save your password, on the wlcsRealm page, click Apply.

  7. Click the Schema tab and enter the following properties:

    user=@ORACLE_USER@<Enter>
    weblogic.t3.waitForConnection=true<Enter>
    weblogic.t3.waitSecondsForConnection=999999999999,weblogic.jts.waitSecondsForConnectionSecs=999999999999,verbose=false<Enter>
    server=@ORACLE_NET_SERVICE_NAME@

    where <Enter> denotes that you must press the Enter key after you type the line of text,
    @ORACLE_USER@ is the name of the Oracle user account (WEBLOGIC by default) and
    @ORACLE_NET_SERVICE_NAME@ is the name of the Oracle net service..

  8. Click Apply.

Configure the JDBC Helper Service

The JDBC Helper Service enables services to explicitly establish a database connection and to coordinate the processing of CLOB data. To configure the JDBC Helper service for Oracle, do the following for each deployed application that uses JDBC services:

Note: Since the data synchronization framework uses the Personalization enterprise application, you will need to use the following procedure for the Personalization application as well as all other deployed applications.

  1. In the left pane of the WebLogic Server Administration Console, click Deployment -> Applications -> MyApplication -> Service Configuration -> JDBC Helper Services.

  2. In the right pane, on the Configuration tab, enter the following values:

  3. To save your entries, click Apply.

  4. Repeat these steps for each application that uses JDBC services and that you have deployed on this server instance.

Note: For information on setting the JDBC Helper Service for Sybase, DB2, and SQL Server 7, see step 2.4 of the section "Update Settings for the JDBC Helper Service" in the <PORTAL_HOME>/db/readme.html file. No Delegate Class Name is required for Cloudscape databases.

Configure the JDBC Helper Service when Migrating an Application

When migrating an application, including Petflow or the Avitek demonstration, the Service Configuration folder is not automatically created and therefore cannot be used to set up the Helper Service. To set up the Helper Service when migrating an application, do the following:

Note: This procedure configures the JDBC Helper Service for the jDriver for Oracle, it will not create a Service Configuration folder in the console.

  1. In WLP_HOME/config/config.xml, enter the following within the <application> tag:
                  <ApplicationConfiguration Name="<YourAppName>" Targets="<yourappServername>" 
                  URI="META-INF/application-config.xml"/>

  2. Create an application-config.xml file under WLP_HOME/applications/<YourAppName>/META-INF

  3. In the Application-config.xml file input the following:
                  <ApplicationConfiguration>
    <JdbcHelper
    JdbcHelperDelegate="com.bea.p13n.util.jdbc.internal.OracleJDriverJdbcHelperDelegate"
    MaxRetries="-1"
    MaxWaitTime="-1"
    Name="JdbcHelper"
                      />
    </ApplicationConfiguration>

Stop the Server

Stop the server to complete the remainder of Step 3: Configure Properties and Environment Variables for Oracle.

For information on stopping the server, refer to Shutting Down a Server.

Update Environment Variables for the Server

To update environment variables, do the following:

  1. Make a backup copy of PORTAL_HOME\bin\win32\set-environment.bat (Windows) or
    PORTAL_HOME/bin/unix/set-environment.sh (UNIX).

  2. Open the file in a text editor and find the line WLCS_ORACLE_HOME=@ORACLE_HOME@

    The WLCS_ORACLE_HOME variable adds Oracle-client Java classes and libraries to the Java classpath and to the system path.

  3. Substitute @ORACLE_HOME@ with the absolute pathnames of the directory in which you installed the Oracle client software. For example, Listing 9-1 shows a Windows environment in which the Oracle client software is installed in C:\oracle\ora81.

    Listing 9-1 Set @ORACLE_HOME@

    SET PORTAL_HOME=c:\bea\Portal4.0
    SET JDK_HOME=c:\bea\jdk1.3
    SET WLCS_ORACLE_HOME=C:\oracle\ora81
    SET BEA_HOME=c:\bea
    SET WEBLOGIC_HOME=c:\bea\wlserver6.1

To specify the database driver, under the section titled
-------- Specify which database to use --------, do one of the following:

Step 4: Create the Database Schema for Oracle

WebLogic Portal includes a script, create_all.bat (create_all.sh for UNIX), that calls a series of other scripts to create the WebLogic Portal schema and install sample data. You can modify the script to create the database without loading sample data.

This step includes the following tasks:

Note: If you use the Event and Behavior Tracking Service, you must use a separate set of scripts to create the Event and Behavior Tracking schema objects. For more information, refer to "Scripts" under "Persisting Behavior Tracking Data" in the Guide to Events and Behavior Tracking.

Set Variables in create_all and databaseload.properties

To set variables in create_all, do the following:

  1. Create a backup copy of PORTAL_HOME/db/create_all.bat (create_all.sh on UNIX).

  2. Open the file in a text editor.

  3. Find the following statements, which are near the beginning of the file:

    REM To be set by user
    set SAMPLEDATA=Y
    set USER_ID=myUser
    set PASSWORD=myPassword
    set SERVER=myServer
    REM End of set by user

  4. Supply the following values for each statement:

    Note: USER_ID and PASSWORD are case sensitive. You must use the same case in databaseload.properties as you used when you created the database user (for example, WEBLOGIC, not weblogic).

  5. Save create_all.

To set up databaseload.properties, do the following:

  1. Create a backup copy of PORTAL_HOME/db/databaseload.properties.

  2. Open databaseload.properties in a text editor.

  3. Disable the Cloudscape statements by placing a pound character (#) at the beginning of each line:

    #------Cloudscape--------------------------------#
    #jdbcdriver=COM.cloudscape.core.JDBCDriver
    #connection=jdbc:cloudscape:Commerce
    #dblogin=none
    #dbpassword=none

  4. Enable the statements for the Oracle driver by removing the pound character (#) from the beginning of each line. For example, the following lines specify the WebLogic jDriver for Oracle:

    #------Oracle OCI jDriver------------------------#
    jdbcdriver=weblogic.jdbc.oci.Driver
    connection=jdbc:weblogic:oracle:@ORACLE_NET_SERVICE_NAME@
    dblogin=@ORACLE_USER@
    dbpassword=@ORACLE_PASSWORD@

  5. In the Oracle statements, replace @ORACLE_USER@ with the name of the Oracle user account. Replace @ORACLE_PASSWORD@ with the password for the user account and replace @ORACLE_NET_SERVICE_NAME@ with the name of the net service that hosts the WebLogic Portal database.

  6. Save databaseload.properties.

Note: You cannot use the Oracle driver when loading sample data via create_all. Instead, use jDriver for this step and in set-environment use SET DATABASE=ORACLE_OCI while running create_all. Refer to the Release Notes for more information.

Run create_all

Caution: Before it creates tables, create_all.bat runs SQL statements that drop any existing WebLogic Portal tables. If you run create_all.bat for a database that already contains WebLogic Portal data, you will lose any WebLogic Portal data that is in the database.

To create the WebLogic Portal schema, do the following:

  1. Open a UNIX shell or MS-DOS command prompt window and change directories to the PORTAL_HOME/db directory.

  2. Enter the following command:
    PORTAL_HOME/db/create_all.bat (create_all.sh on UNIX)

    The script logs its actions in several log files, which it locates in the PORTAL_HOME/db directory.

  3. View the following log files to verify that there are no errors:

For a description of the tables, indexes, and constraints, see the following topics:

Step 5: Load Sample Data

You can load additional sample data that demonstrates ad placeholders and other Campaign services.

Note: You must load sample data in order to run the WebLogic Portal sample applications with Oracle. If you did not want to run the sample applications, then you can skip this step.

If you do not load the sample data and then try to bring up the portal tools (http://host:7501/portalTools/index.jsp) after starting the server, the following error message appears in the console:

<Error> <Webflow> <Error while parsing uri /portalTools/application, path null, query string namespace=admin_main - Webflow XML does not exist, is not loaded properly, or you do not have a configuration-error-page defined.Exception[com.bea.p13n.appflow.exception.ConfigurationException: The configuration-error-page node was not found in the webflow xml file. for webapp [tools], namespace [admin_main]. While trying to display CONFIGURATION ERROR: [Exception[com.bea.p13n.appflow.exception.ConfigurationException: Bad Namespace - namespace [admin_main] is not available for webflow execution. Make sure the [admin_main.wf] file is deployed in webapp [tools].]],]

To load sample data, do the following:

  1. Start the server that you want to use the sample data. For information on starting servers, refer to Starting and Shutting Down a Server..

  2. Open a command shell and enter the following command:
    PORTAL_HOME\bin\platform-type\loadSampleData.bat

  3. Shut down WebLogic Portal. For information on stopping the server, refer to Shutting Down a Server.

The loadSampleData script does the following:

Step 6: Rebuild Indexes

The create_all script places the WebLogic Portal indexes in the default tablespace (WLCS_DATA). To locate and rebuild the indexes in the WLCS_INDEX tablespace, do the following:

  1. From the host on which you installed the Oracle client and WebLogic Portal, open a UNIX shell or MS-DOS command prompt window and change directories to PORTAL_HOME/db/oracle/817/admin.

  2. Enter the following command to start a SQL*Plus session:

    sqlplus username/password@net_service_name

    where username is the name of the Oracle user account (WEBLOGIC by default),
    password is the password for the Oracle user account, and
    net_service_name is the Net Service name that you defined for the Oracle database.

  3. Enter the following command to rebuild indexes:
    @rebuild_indexes.sql

 


Configuring for Thin Driver

Thin Driver is certified with the Service Pack 2 Installation.

Step 1: Install the Oracle Client Software

Install the Oracle Client software on the same host as WebLogic Portal. Configure the Oracle Net Service Name to specify the target Oracle database. Then test the connection with the database username and password that your database administrator assigned to you.

For information on the Oracle releases that WebLogic Portal supports for your platform type, refer to Supported Platforms in the Installation Guide.

Step 2: Create WebLogic Portal Tablespaces and a Schema-Owner User Account

To separate its data from the Oracle data dictionary and from data that other applications use, WebLogic Portal uses the following tablespaces:

A script named create_tablespaces.sql creates the WLCS_DATA and WLCS_INDEX tablespaces. It locates both table data and indexes in the WLCS_DATA tablespace. If possible, each tablespace should be placed on a separate physical disk drive. In Step 6: Rebuild Indexes, you move the indexes to the WLCS_INDEX tablespace.

By default, the schema-owner user account for WebLogic Portal is named WEBLOGIC and the tablespace is WLCS_DATA with a temporary tablespace named TEMP. The sample script named create_users.sql creates the WEBLOGIC user with default tablespaces and grants the WEBLOGIC user appropriate database permissions.

If you need to locate multiple instances of the WebLogic Portal schema on a single database, you must use a different schema-owner user account for each instance. For example, if you need to locate development and test database schemas on the same database instance, you could create two schema owner user accounts named WL_DEV and WL_TEST.

Creating WLCS_DATA and WLCS_INDEX

Note: In this document, PORTAL_HOME refers to the directory into which you installed WebLogic Portal.

To create the WLCS_DATA and WLCS_INDEX tablespaces, do the following (usually, a Database Administrator must complete these tasks):

  1. From the host on which you installed the Oracle client and WebLogic Portal, open a UNIX shell or MS-DOS command prompt window and change directories to PORTAL_HOME/db/oracle/817/admin.

  2. Make a backup copy of create_tablespaces.sql.

  3. In a text editor, open create_tablespaces.sql and modify the pathnames for the DATA_PATHNAME and INDEX_PATHNAME variables to match your own local directory path structures. For example, on a UNIX system, if two disks are mounted as /usr1 and /usr2 and the Oracle SID is PROD, use the following pathnames:
    DEFINE DATA_PATHNAME=/usr1/oradata/PROD
    DEFINE INDEX_PATHNAME=/usr2/oradata/PROD

  4. If you want to use a schema-owner user account other than the default WEBLOGIC, do the following:

    1. Make a backup copy of create_users.sql.

    2. In a text editor, open create_users.sql and change WEBLOGIC to the schema owner user account of your choice.

  5. Enter the following command to start a SQL*Plus session:

    sqlplus username/password@net_service_name

    where username is system or a user with privileges to create tablespaces,
    password is the system (or other users) password, and
    net_service_name is the Net Service name that you defined for the Oracle database.

  6. Enter the following to create tablespaces:

    @create_tablespaces.sql

    Output from executing create_tablespaces.sql will be written to a file named CREATE_TABLESPACES.LOG. Verify the results of running create_tablespaces.sql before you continue.

  7. Enter the following to create a schema-owner user account:

    @create_users.sql

    Output from executing create_users.sql will be written to a file named CREATE_USERS.LOG. Verify the results of running create_users.sql before you continue.

  8. Exit SQL*Plus.

Determining the Size of the WebLogic Portal Tablespaces

Monitoring the growth and usage of database resources and data files is a critical task that a Database Administrator must do on a regular basis. By default, the WLCS_DATA and WLCS_INDEX tablespaces are 100 Megabytes each. Any of the following factors might require you to adjust these default sizes:

To determine the amount of disk space that you need in your production environment, a Database Administrator can analyze the usage of the database tables in the development environment. Based on the number of users, groups, personalization data and data from other services, the Database Administrator can project estimates for disk space requirements.

Step 3: Configure Properties and Environment Variables for Oracle

When you install WebLogic Portal, it is configured to support a Cloudscape demonstration database. This section describes how to modify the default Cloudscape properties to support an Oracle database.

To configure properties files and environment variables for Oracle, complete the following tasks in the order indicated below:

  1. Start the WebLogic Server Administration Console

  2. Configure JDBC Connection Pools for Oracle

  3. Update Settings for the RDBMS Security Realm

  4. Configure the JDBC Helper Service

  5. Stop the Server

  6. Update Environment Variables for the Server

Start the WebLogic Server Administration Console

To configure a WebLogic Portal server to support Oracle, start the server and access the WebLogic Server Administration Console for the server's domain.

For example, you want to configure myServer (which listens on port 7501). Start myServer on your local host and then enter the following URL in a browser:
http://[host]:[port]/console

For more information on starting the WebLogic Server Administration Console, refer to "WebLogic Server Administration Console" in the WebLogic Portal Architectural Overview.

Configure JDBC Connection Pools for Oracle

Connection pools provide ready-to-use pools of connections to your RDBMS. The application server creates the pools during server startup, thus eliminating the overhead of your enterprise application having to establish database connections for each transaction. For more information about connection pools, refer to "Overview of Connection Pools" in the WebLogic Server Programming WebLogic JDBC guide.

This section contains the following subsections:

Configure commercePool for Oracle Databases

To configure commercePool for Oracle, do the following:

  1. In the left pane of the WebLogic Server Administration Console, click Services -> JDBC -> Connection Pools.

  2. Under the Connection Pools folder, click commercePool.

  3. On the General tab, enter the following values:

  4. To save your entries, click Apply.

  5. Next to Password, click change.

  6. On the Change Password page, enter and confirm the password of the user account. Then click Apply.

    The WebLogic Server Administration Console keeps this password in an encrypted format.

  7. To save your updated password, on the commercePool page, click Apply.

Configure dataSyncPool for Oracle Databases

Configure a JDBC connection pool named dataSyncPool by doing the following:

  1. In the left pane of the WebLogic Server Administration Console, click Services -> JDBC -> Connection Pools.

  2. Under the Connection Pools folder, click dataSyncPool.

  3. On the General tab, enter the following values:

  4. To save your entries, click Apply.

  5. Next to Password, click change.

  6. On the Change Password page, enter and confirm the password of the user account. Then click Apply.

    The WebLogic Server Administration Console keeps this password in an encrypted format.

  7. To save your updated password, on the dataSyncPool page, click Apply.

Update Settings for the RDBMS Security Realm

If you are using the RDBMS security realm, you must change the RDBMSRealm settings to match the database type that stores the user information. If you are using LDAP or some other security realm, you can ignore these settings.

To change these settings, do the following:

  1. In the left pane of the WebLogic Server Administration Console, click Security -> Realms -> wlcsRealm.

    Note: If you named your RDBMS realm something other than wlcsRealm, click the realm that you created.

  2. In the right pane, click the Database tab and enter the following values:

  3. To save your entries, click Apply.

  4. Next to Password, click change. (See Figure 9-1.)

  5. On the Change Password page, enter and confirm the password of the user account. Then click Apply.

    The WebLogic Portal Administration Tools keeps this password in an encrypted format.

  6. To save your password, on the wlcsRealm page, click Apply.

  7. Click the Schema tab and enter the following properties:

    user=@ORACLE_USER@<Enter>
    weblogic.t3.waitForConnection=true<Enter>
    weblogic.t3.waitSecondsForConnection=999999999999,weblogic.jts.waitSecondsForConnectionSecs=999999999999,verbose=false<Enter>

    where <Enter> denotes that you must press the Enter key after you type the line of text, @ORACLE_USER@ is the name of the Oracle user account (WEBLOGIC by default)

  8. Click Apply.

Configure the JDBC Helper Service

The JDBC Helper Service enables services to explicitly establish a database connection and to coordinate the processing of CLOB data. To configure the JDBC Helper service for Oracle, do the following for each deployed application that uses JDBC services:

Note: Since the data synchronization framework uses the Personalization enterprise application, you will need to use the following procedure for the Personalization application as well as all other deployed applications.

  1. In the left pane of the WebLogic Server Administration Console, click Deployment -> Applications -> MyApplication -> Service Configuration -> JDBC Helper Services.

  2. In the right pane, on the Configuration tab, enter the following values:

  3. To save your entries, click Apply.

  4. Repeat these steps for each application that uses JDBC services and that you have deployed on this server instance.

Note: For information on setting the JDBC Helper Service for Sybase, DB2, and SQL Server 7, see step 2.4 of the section "Update Settings for the JDBC Helper Service" in the <PORTAL_HOME>/db/readme.html file. No Delegate Class Name is required for Cloudscape databases.

Configure the JDBC Helper Service when Migrating an Application

When migrating an application, including Petflow or the Avitek demonstration, the Service Configuration folder is not automatically created and therefore cannot be used to set up the Helper Service. To set up the Helper Service when migrating an application, do the following:

Note: This procedure configures the JDBC Helper Service for the jDriver for Oracle, it will not create a Service Configuration folder in the console.

  1. In WLP_HOME/config/config.xml, enter the following within the <application> tag:
                  <ApplicationConfiguration Name="<YourAppName>" Targets="<yourappServername>" 
                  URI="META-INF/application-config.xml"/>

  2. Create an application-config.xml file under WLP_HOME/applications/<YourAppName>/META-INF

  3. In the Application-config.xml file input the following:
                  <ApplicationConfiguration>
    <JdbcHelper
    JdbcHelperDelegate="com.bea.p13n.util.jdbc.internal.OracleThinJdbcHelperDelegate"
    MaxRetries="-1"
    MaxWaitTime="-1"
    Name="JdbcHelper"
                      />
    </ApplicationConfiguration>

Stop the Server

Stop the server to complete the remainder of Step 3: Configure Properties and Environment Variables for Oracle.

For information on stopping the server, refer to Shutting Down a Server.

Update Environment Variables for the Server

To update environment variables, do the following:

  1. Make a backup copy of PORTAL_HOME\bin\win32\set-environment.bat (Windows) or
    PORTAL_HOME/bin/unix/set-environment.sh (UNIX).

  2. Open the file in a text editor and find the line WLCS_ORACLE_HOME=@ORACLE_HOME@

    The WLCS_ORACLE_HOME variable adds Oracle-client Java classes and libraries to the Java classpath and to the system path.

  3. Substitute @ORACLE_HOME@ with the absolute pathnames of the directory in which you installed the Oracle client software. For example, Listing 9-1 shows a Windows environment in which the Oracle client software is installed in C:\oracle\ora81.

    Listing 9-3 Set @ORACLE_HOME@

    SET PORTAL_HOME=c:\bea\Portal4.0
    SET JDK_HOME=c:\bea\jdk1.3
    SET WLCS_ORACLE_HOME=C:\oracle\ora81
    SET BEA_HOME=c:\bea
    SET WEBLOGIC_HOME=c:\bea\wlserver6.1

To specify the database driver, under the section titled
-------- Specify which database to use --------, do one of the following:

Step 4: Create the Database Schema for Oracle

WebLogic Portal includes a script, create_all.bat (create_all.sh for UNIX), that calls a series of other scripts to create the WebLogic Portal schema and install sample data. You can modify the script to create the database without loading sample data.

This step includes the following tasks:

Note: If you use the Event and Behavior Tracking Service, you must use a separate set of scripts to create the Event and Behavior Tracking schema objects. For more information, refer to "Scripts" under "Persisting Behavior Tracking Data" in the Guide to Events and Behavior Tracking.

Set Variables in create_all and databaseload.properties

To set variables in create_all, do the following:

  1. Create a backup copy of PORTAL_HOME/db/create_all.bat (create_all.sh on UNIX).

  2. Open the file in a text editor.

  3. Find the following statements, which are near the beginning of the file:

    REM To be set by user
    set SAMPLEDATA=Y
    set USER_ID=myUser
    set PASSWORD=myPassword
    set SERVER=myServer
    REM End of set by user

  4. Supply the following values for each statement:

    Note: USER_ID and PASSWORD are case sensitive. You must use the same case in databaseload.properties as you used when you created the database user (for example, WEBLOGIC, not weblogic).

  5. Save create_all.

To set up databaseload.properties, do the following:

  1. Create a backup copy of PORTAL_HOME/db/databaseload.properties.

  2. Open databaseload.properties in a text editor.

  3. Disable the Cloudscape statements by placing a pound character (#) at the beginning of each line:

    #------Cloudscape--------------------------------#
    #jdbcdriver=COM.cloudscape.core.JDBCDriver
    #connection=jdbc:cloudscape:Commerce
    #dblogin=none
    #dbpassword=none

  4. Enable the statements for the Oracle driver by removing the pound character (#) from the beginning of each line. For example, the following lines specify the WebLogic jDriver for Oracle:

    Note: You must use jDriver to run create_all and loadSampledata and switch back the Thin Driver. (See the Release Notes document for more information. )

    #------Oracle OCI jDriver------------------------#
    jdbcdriver=oracle.jdbc.driver.OracleDriver
    connection=jdbc:oracle:thin:@@ORACLE_SERVER@:@ORACLE_PORT@ORACLE_SID@
    dblogin=@ORACLE_USER@
    dbpassword=@ORACLE_PASSWORD@

  5. In the Oracle statements, replace @ORACLE_USER@ with the name of the Oracle user account. Replace @ORACLE_PASSWORD@ with the password for the user account and replace @ORACLE_NET_SERVICE_NAME@ with the name of the net service that hosts the WebLogic Portal database.

  6. Save databaseload.properties.

Note: You cannot use the Oracle Thin driver when loading sample data via create_all. Instead, use jDriver for this step and in set-environment use SET DATABASE=ORACLE_OCI while running create_all. Refer to the Release Notes for more information.

Run create_all

Caution: Before it creates tables, create_all.bat runs SQL statements that drop any existing WebLogic Portal tables. If you run create_all.bat for a database that already contains WebLogic Portal data, you will lose any WebLogic Portal data that is in the database.

To create the WebLogic Portal schema, do the following:

  1. Open a UNIX shell or MS-DOS command prompt window and change directories to the PORTAL_HOME/db directory.

  2. Enter the following command:
    PORTAL_HOME/db/create_all.bat (create_all.sh on UNIX)

    The script logs its actions in several log files, which it locates in the PORTAL_HOME/db directory.

  3. View the following log files to verify that there are no errors:

For a description of the tables, indexes, and constraints, see the following topics:

Step 5: Load Sample Data

You can load additional sample data that demonstrates ad placeholders and other Campaign services.

Note: You must load sample data in order to run the WebLogic Portal sample applications with Oracle. If you did not want to run the sample applications, then you can skip this step.

If you do not load the sample data and then try to bring up the portal tools (http://host:7501/portalTools/index.jsp) after starting the server, the following error message appears in the console:

<Error> <Webflow> <Error while parsing uri /portalTools/application, path null, query string namespace=admin_main - Webflow XML does not exist, is not loaded properly, or you do not have a configuration-error-page defined.Exception[com.bea.p13n.appflow.exception.ConfigurationException: The configuration-error-page node was not found in the webflow xml file. for webapp [tools], namespace [admin_main]. While trying to display CONFIGURATION ERROR: [Exception[com.bea.p13n.appflow.exception.ConfigurationException: Bad Namespace - namespace [admin_main] is not available for webflow execution. Make sure the [admin_main.wf] file is deployed in webapp [tools].]],]

To load sample data, do the following:

  1. Start the server that you want to use the sample data. For information on starting servers, refer to Starting and Shutting Down a Server..

  2. Open a command shell and enter the following command:
    PORTAL_HOME\bin\platform-type\loadSampleData.bat

  3. Shut down WebLogic Portal. For information on stopping the server, refer to Shutting Down a Server.

The loadSampleData script does the following:

Step 6: Rebuild Indexes

The create_all script places the WebLogic Portal indexes in the default tablespace (WLCS_DATA). To locate and rebuild the indexes in the WLCS_INDEX tablespace, do the following:

  1. From the host on which you installed the Oracle client and WebLogic Portal, open a UNIX shell or MS-DOS command prompt window and change directories to PORTAL_HOME/db/oracle/817/admin.

  2. Enter the following command to start a SQL*Plus session:

    sqlplus username/password@net_service_name

    where username is the name of the Oracle user account (WEBLOGIC by default),
    password is the password for the Oracle user account, and
    net_service_name is the Net Service name that you defined for the Oracle database.

  3. Enter the following command to rebuild indexes:
    @rebuild_indexes.sql

 

back to top previous page next page