2 Preparing for the Tutorial

This chapter tells you how to obtain the sample files and install the tutorial and Oracle WebCenter database schemas required for completing this tutorial. These files and database schemas are necessary for building the complete sample application. You must have administrator's access to the database where you'll install the database schemas.

Step 1: Obtain the Software

Ensure that you have installed Oracle JDeveloper 11g Release 1 (11.1.1) and the Oracle WebCenter extension (11.1.1). If you are not sure whether you have the WebCenter extension, you can verify this by opening Oracle JDeveloper, then choosing Help > About from the menu, then click the Extensions tab. On the Extensions list, sort by Identifier to locate the oracle.webcenter.* components. Figure 2-1 shows the Oracle WebCenter components listed in JDeveloper.

Figure 2-1 Oracle WebCenter Framework in Oracle JDeveloper

Description of Figure 2-1 follows
Description of "Figure 2-1 Oracle WebCenter Framework in Oracle JDeveloper"

If you do not see these components, you must install the WebCenter extension.

To install the WebCenter extension to Oracle JDeveloper using the Update Center:

  1. Launch Oracle JDeveloper.

  2. If the Select Default Roles dialog box displays, select Default Role to enable all technologies, and click OK.

  3. If a dialog box displays asking if you want to migrate settings from an earlier version, click No.

  4. In Oracle JDeveloper, choose Help > Check for Updates.

  5. On the Welcome page, click Next.

  6. Select Search Update Centers, then click Next.

  7. On the Updates page, search for the WebCenter extension, select it, then click Finish.

  8. When prompted, restart JDeveloper.

For more information on obtaining and installing Oracle WebCenter Framework, see the Oracle WebCenter page on OTN (http://webcenter.oracle.com).

Step 2: Download the Sample Tutorial Files

At various points throughout this tutorial, you'll be asked to include certain content and images in your application. This material is contained in a zip file, which you can download by following these instructions:

To download the sample tutorial files:

  1. Open a browser, and enter the following in the Address field:

  2. Open the ZIP file (webcentertutorial11gR1.zip).

  3. Unzip the file to a local drive, such as C.

    Figure 2-2 shows the file unzipped to: C:\TutorialContent.

    Figure 2-2 Sample Content ZIP File Unzipped

    Sample content file unzipped to the C drive
    Description of "Figure 2-2 Sample Content ZIP File Unzipped"

Step 3: Add the Tutorial Sample Schema to Your Database

Some examples we will use in this tutorial will access data using SQL. You must add the schema to your database to complete these lessons. However, if you do not have access to a database, you can still complete many of the other lessons in this tutorial.

You can either install the tutorial schema using SQL*Plus or by using Oracle JDeveloper. This section shows you how to create the database connection for the database where you will install the tutorial schema, then add the schema to the database, all within JDeveloper.

To complete the steps in this section, you will need the connection information (such as the location and port number) for your database containing the schema. Take note of this information for use later in the tutorial. Also, if the database is not on your local computer, you must modify the build script (buildFromJDev.sql or build.sql, depending on whether you are using JDeveloper or SQL*Plus to install the script) to specify the TNS alias when it reconnects.


If you see an error that says:

DROP USER FOD CASCADE*ERROR at line 1:ORA-01918: user 'FOD' does not exist,

you can ignore this message, as it means that the schema does not yet exist.

To add the sample schema to your database:

  1. In Oracle JDeveloper, choose Tools > SQL Worksheet, then click the green + sign to create a new connection.

  2. In the Create Database Connection dialog box, enter connection information for the system administrator of your database (Figure 2-3):

    • Connection Name: TutorialSchema

    • Connection Type: Oracle (JDBC)

    • User name: <your system administrator user ID>

    • Password: <your system administrator password>

    • Role: Choose a role from the Role list (SYSDBA or SYSOPER)

    • Host: <host name of your database> (for example, localhost)

    • JDBC Port: <port> (for example, 1521)

    • SID: <system identifier for the database with the same JDBC port> (for example, ORCL)

    Figure 2-3 Database Connection for the Tutorial Schema

    Description of Figure 2-3 follows
    Description of "Figure 2-3 Database Connection for the Tutorial Schema"

  3. Click OK to close the Create Database Connection dialog box, then click OK again to close the Select Connection dialog box.

  4. Choose Tools > SQL Worksheet, then select the newly created connection.

  5. Click OK.

  6. In the SQL Worksheet panel, create the schema by enter the following command:

    create user fod identified by fusion;
  7. Click the Execute Statement icon at the top of the panel.

  8. In the SQL Worksheet panel, enter the following command:

    grant connect, resource to fod identified by fusion;

    In doing so, you enable the credentials in the script we've provided to access the schema in your database.

  9. Click the Execute Statement icon (the green arrow) at the top of the panel.

    Figure 2-4 Execute Statement Icon

    Description of Figure 2-4 follows
    Description of "Figure 2-4 Execute Statement Icon"

  10. Choose Tools > SQL Worksheet again.

  11. In the Select Connection dialog box, click the pencil icon to edit the connection.

  12. Modify the connection to use the new credentials. Change the Username to fod and the Password to fusion, then click OK to close the Edit Database Connection dialog box.

  13. Click OK to close the Select Connection dialog box.

  14. Close the SQL Worksheet panel.

  15. Start a new SQL Worksheet using the new connection. Choose Tools > SQL Worksheet again.

  16. Create the schema objects by executing the buildFromJDev.sql script that's located in the Scripts folder (c:\TutorialContent\Scripts):


    You can ignore the warnings in the Log window:

    WARNING: java.io.PipedInputStream.checkStateForReceive(PipedInputStream.java:244)
    java.io.IOException: Pipe closed


You can also manually install the schema using SQL*Plus by using the script we've provided, c:\TutorialContent\Scripts\build.sql.

Step 4: Install the WebCenter Schema

To use the Tags service, you must have the WebCenter schema installed in your database. You can do this by using the built-in SQL Worksheet utility that you used in the previous step.

To install the WebCenter schema:

  1. From the Tools menu, select SQL Worksheet.

  2. In the Select Connection dialog box, click the pencil icon to edit the connection.

  3. Modify the connection to use an administrator username and password, such as system or sys, then click OK.

  4. Click OK to close the Select Connection dialog ox.

  5. Choose Tools > SQL Worksheet.

  6. Enter the following SQL statement in the SQL Worksheet panel:

  7. Click the Execute Statement icon, or press F9, to run the script.

  8. At the prompt, enter webcenter as the name for the schema and a password for the schema, such as welcome1. The name of the schema must be webcenter.

  9. If prompted for the Default Tablespace and Temporary Tablespaces, accept the defaults (users and temp).

Now that you've set up the files and the database for your environment, you're ready to begin!