



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:- Ensure that the WebSphere Commerce non-root user has read and execute permission on the Oracle libraries.
- 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:
You should be able to invoke "sqlplus" by using the non-root user.Oracle_home_dir/.profile
- Validate the values in the profile for the following environment settings:
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.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
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):
- Execute sqlplus user/password@net_service_name
- Execute the following command: SELECT * FROM V$VERSION
- Ensure that there are no errors.
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
../concepts/cig_use_oracle_RAC_aix.html
../concepts/cig_use_oracle_RAC_linux.html
../concepts/cig_use_oracle_RAC_solaris.html
Note: Although the WebSphere Data Source can be updated to use a SERVICE, Instance Creation and
Feature Enablement require the use of a SID: