SolarisLinuxAIXWindows

Troubleshooting: Validating the Oracle Environment for use with WebSphere Commerce

WebSphere Commerce uses the Oracle type 2 (OCI) driver for tasks such as Instance Creation and Feature Enablement. The use of this driver requires the Oracle environment to be properly set for the WebSphere Commerce non-root user.

Problem

You might encounter some of the following error messages if the Oracle environment is not properly configured for use with WebSphere Commerce:
  • java.sql.SQLException: Closed Connection
  • java.lang.UnsatisfiedLinkError: no ocijdbc9 in java.library.path
  • java.sql.SQLException: Io exception: The Network Adapter could not establish the connection
  • java.sql.SQLException: ORA-12154: TNS:could not resolve
  • java.lang.UnsatisfiedLinkError: /u01/app/oracle/product/10.1.0/OH_10gClient/lib/libocijdbc10.so: load ENOEXEC on shared library(s).

Solution

Validate that the environment is configured properly:
  1. Ensure that the WebSphere Commerce non-root user has read and execute permission on the Oracle libraries.
  2. Ensure that the WebSphere Commerce non-root user's .profile file calls the Oracle installation owner's .profile file. The following line should exist in the WebSphere Commerce non-root user's .profile file:
    Oracle_home_dir/.profile
    You should be able to invoke "sqlplus" by using the non-root user.
  3. Validate the values in the profile for the following environment settings:
    ENVIRONMENT VARIABLE SETTING
    ORACLE_HOME Oracle home directory
    PATH Ensure that the PATH includes a line similar to the following example:
    $ORACLE_HOME/lib:$ORACLE_HOME/bin
    LIBPATH Ensure that LIBPATH includes a line similar to the following example:
    $ORACLE_HOME/lib:WC_installdir/bin
    LD_LIBRARY_PATH Ensure that the LD_LIBRARY_PATH includes a line similar to the following example:
    $ORACLE_HOME/lib:WC_installdir/bin
    Ensure that the paths point to the correct version of the libraries. For example, for 32-bit WebSphere Commerce and 64-bit Oracle, the path generally points to ORACLE_HOME/lib32 instead of $ORACLE_HOME/lib.
Validate the connection to the database. Use sqlplus to validate the connection to the database by using the WebSphere Commerce non-root user (OS) and the schema user (Oracle):
  1. Execute sqlplus user/password@net_service_name
  2. Execute the following command: SELECT * FROM V$VERSION
  3. Ensure that there are no errors.
You can also bypass the tnsnames.ora configuration, and specify the parameters directly in the sqlplus command line (for use during Instance Creation, Feature Enablement and utility execution):
sqlplus user/password@(DESCRIPTION=(ADDRESS=(PROTOCOL=TCP)(HOST=host)(PORT=port))(CONNECT_DATA=(SID=sid)))
If the WebSphere Data Source is updated to use a service name, execute the following command:
sqlplus user/password@(DESCRIPTION=(ADDRESS=(PROTOCOL=TCP)(HOST=host)(PORT=port))(CONNECT_DATA=(SERVICE_NAME=service_name)))
If the connection fails, consult with your Oracle database administrator for the correct connection parameters.

Oracle notes

For information about the Oracle versions that are supported, see WebSphere Commerce Version 7 software requirements.
For information about using Oracle RAC, see
Note: Although the WebSphere Data Source can be updated to use a SERVICE, Instance Creation and Feature Enablement require the use of a SID: