I have installed WebSphere Application Server 8.5 on a new RHEL 6.8 server. After WAS installation I created the data source but when I tried to test the database connection for this data source it becomes failed with the message given below.
Problem
I got the below error message while performing Test Connection for a newly created data source.
Messages
The test connection operation failed for data source CRISDATASOURCE on server nodeagent at node PCPEPSRAPPNode01 with the following exception: java.lang.ClassNotFoundException: DSRA8000E: Java archive (JAR) or compressed files do not exist in the path or the required access is not allowed. Path: /ojdbc6.jar. View JVM logs for further details.
Reason
The connection failed because ORACLE_JDBC_DRIVER_PATH was not set in the WebSphere variables. The path was not set due to which jar file ojdbc6.jar (required for connection) was not accessible.
Solution
- Log in to WebSphere Integrated Solutions Console as admin user and go to Environment >> WebSphere Variables.
- Select the scope from the dropdown as Cell/Node and search for the variable ORACLE_JDBC_DRIVER_PATH.
- Click on variable name ORACLE_JDBC_DRIVER_PATH and assign the value /opt/IBM/WebSphere/AppServer/universalDriver/lib to this variable.
- If variable ORACLE_JDBC_DRIVER_PATH is not available under a scope then create the variable and assign the value.
- Click on Apply button and review it.
- Click on the OK button.
- Now go to data sources and run the Test Connection it will be successful.
Note: I faced the above problem on WebSphere Application Server 8.5 while trying to connect the Oracle Database 11g.
Viji
Helped me to solve the issue. Thanks