Multiple JDBC drivers for Oracle cause a problem when Oracle is the database for SAS® Shared Services


When you use an Oracle database for SAS Shared Services, SAS® Web Application Server might fail to start during initialization of the Shared Services JNDI data source. In this case, messages similar to the following are written to the web application server log:

ERROR (main) [org.apache.catalina.mbeans.GlobalResourcesLifecycleListener] Exception processing global JNDI Resources
javax.naming.NamingException: Error creating instance of: com.atomikos.jdbc.AtomikosDataSourceBean
...
Caused by: java.lang.NoClassDefFoundError: oracle/dms/console/DMSConsole
    at oracle.jdbc.driver.DMSFactory.<clinit>(DMSFactory.java:48) ~[ojdbc8dms_g.jar:19.21.0.0.0]
    at oracle.jdbc.driver.PhysicalConnection.createDMSSensors(PhysicalConnection.java:1771) ~[ojdbc8dms_g.jar:19.21.0.0.0]
...
Caused by: java.lang.ClassNotFoundException: oracle.dms.console.DMSConsole
    at java.net.URLClassLoader.findClass(URLClassLoader.java:476) ~[?:?]
    at java.lang.ClassLoader.loadClass(ClassLoader.java:589) ~[?:?]
...

This problem can occur when multiple Oracle JDBC driver JAR files are present in the directory specified in the SAS Deployment Wizard for the Oracle JDBC driver. During deployment, SAS® Deployment Wizard copies all JAR files from the specified directory into the web application server library path. When the web application server starts and initializes global JNDI resources, an unintended Oracle JDBC driver might be loaded, causing the Shared Services datasource to fail to initialize.

Solution

To prevent this problem, place only the required Oracle JDBC driver JAR file in a separate directory and specify that directory when SAS Deployment Wizard prompts for the Oracle JDBC driver location.

If you already completed the deployment, follow the instructions below. 

  1. Determine the correct Oracle JDBC driver JAR file for your environment.
  2. Remove all other Oracle JDBC driver JAR files from the web application server library directories and from the SAS configuration directory where the JDBC driver files were copied during deployment.

For SAS® 9.4 deployments, JDBC driver files are copied to the following:
<SASConfig>/Levn/Web/WebAppServer/SASServerX_Y/lib

For SAS® 9.3 and SAS® 9.2 deployments, JDBC driver files are copied to the following:

<SASConfig>/Lev1/Web/Applications/SASSharedServices9.2/JDBCDrivers/

JDBC driver files are copied to the following (when you use JBoss as the web application server):
<JBoss-home-directory>/server/SASServer1/lib