Skip Headers
Oracle TopLink Developer's Guide
10g Release 3 (10.1.3)
B13593-01
  Go To Documentation Library
Home
Go To Product List
Solution Area
Go To Table Of Contents
Contents
Go To Index
Index

Previous
Previous
Next
Next
 

Configuring the TopLink Workbench Environment

TopLink Workbench reads its environment variables from the setenv script in the <TOPLINK_HOME>\bin directory.

Before you launch TopLink Workbench, you must configure its environment as follows:

  1. Use a text editor to open the <TOPLINK_HOME>\bin\setenv script.

    • For Windows, open the setenv.cmd file.

    • For UNIX, open the setenv.sh file.

  2. Ensure that the JAVA_HOME environment variable is set:

    • For Windows: set JAVA_HOME=C:/j2sdk1.4.2_04

    • For UNIX: JAVA_HOME=/usr/local/packages/java; export JAVA_HOME

  3. Update the DRIVER_CLASSPATH environment variable to add the location of the following (if necessary):


    Note:

    Do not include any Java classes for your persistent business objects in the DRIVER_CLASSPATH variable. Instead, add these persistent business objects in your TopLink Workbench project classpath (see "Configuring Project Classpath").

    • JDBC drivers - if you are using relational projects (see "Relational Projects").

    • J2EE Connector Architecture (J2C) adapters - if you are using EIS projects (see "EIS Projects").

    • J2C connector.jar file - if you are using EIS projects (see "EIS Projects").

      The connector.jar file contains javax.resource.cci and javax.resource.spi interfaces that TopLink EIS uses. By default, TopLink Workbench updates its classpath to include the Java 1.5 connector.jar file from <TOPLINK_HOME>/j2ee/home/lib. If this version of the connector.jar file is incompatible with your environment, edit the workbench.cmd or workbench.sh file in <TOPLINK_HOME>/bin to change the path to this file.

      At runtime, this connector.jar file (or its equivalent) must be on your application or application server classpath.

    • Oracle Database ORACLE_HOME/rdbms/jlib/xdb.jar file - if you are using direct-to-XMLType mappings with an Oracle9i or higher database (see "Direct to XMLType Mapping").

    • Custom Collection class that you use to override the default Collection class that TopLink uses with a mapping container policy (see "Configuring Container Policy").

    Example 5-1 shows how to set the DRIVER_CLASSPATH variable for Windows and Example 5-2 for UNIX.

    Example 5-1 Setting DRIVER_CLASSPATH on Windows

    set DRIVER_CLASSPATH=C:\OraHome2\jdbc\lib\ojdbc14.jar;C:\Attunity\Connect\Java\lib\attunityResourceAdapter.jar;C:\OraHome2\rdbms\jlib\xdb.jar
    
    

    Note:

    If the path to your driver(s) contains spaces, you must enclose the path in double-quotes in the setenv.cmd file. For example:
    set DRIVER_CLASSPATH="C:\Program Files\some directory\driver.jar\"
    

    Example 5-2 Setting DRIVER_CLASSPATH on UNIX

    DRIVER_CLASSPATH=/OraHome2/jdbc/lib/ojdbc14.jar;/attunity/connect/java/lib/attunityResourceAdapter.jar;/OraHome2/rdbms/jlib/xdb.jar; export JDBC_CLASSPATH
    
    
  4. Save and close the setenv script.