Tomcat Startup Error in RDM

Reported for version 10

Problem

At a start of Tomcat for RDM application, there is the following error.

Cannot create JDBC driver of class '' for connect URL 'null'...
Cannot create JDBC driver of class '' for connect URL 'null'
Cause:
org.apache.tomcat.dbcp.dbcp.SQLNestedException: Cannot create JDBC driver of class '' for connect URL 'null'
at org.apache.tomcat.dbcp.dbcp.BasicDataSource.createConnectionFactory(BasicDataSource.java:1452)
at org.apache.tomcat.dbcp.dbcp.BasicDataSource.createDataSource(BasicDataSource.java:1371)
at org.apache.tomcat.dbcp.dbcp.BasicDataSource.getConnection(BasicDataSource.java:1044)
at com.ataccama.dqc.commons.sql.DataSourceImpl.getRawConnection(DataSourceImpl.java:95)
at com.ataccama.dqc.commons.sql.DataSourceImpl.getNonTransactionalConnection(DataSourceImpl.java:63)
at com.ataccama.dqc.io.jdbc.Connector.getConnector(Connector.java:273)
at com.ataccama.rdm.manager.persistence.DbTablesChecker.checkTable(DbTablesChecker.java:48)
at com.ataccama.rdm.manager.config.provider.RdmDBFileSystemProvider.ensureTable(RdmDBFileSystemProvider.java:277)
at com.ataccama.rdm.manager.config.provider.RdmDBFileSystemProvider.<init>(RdmDBFileSystemProvider.java:73)
at com.ataccama.rdm.manager.config.provider.RdmDBFileSystemProvider.<init>(RdmDBFileSystemProvider.java:66)
at com.ataccama.rdm.proxy.RdmCoreInitializer$ConfigRepoSetupPhase.createFileSystemProvider(RdmCoreInitializer.java:332)
at com.ataccama.rdm.proxy.RdmCoreInitializer$ConfigRepoSetupPhase.run(RdmCoreInitializer.java:318)
at com.ataccama.rdm.manager.startup.PhaseInfo.run(PhaseInfo.java:25)
at com.ataccama.rdm.manager.startup.AbstractRunContext.run(AbstractRunContext.java:35)
at com.ataccama.rdm.manager.startup.RdmStartupManager.runContext(RdmStartupManager.java:98)
at com.ataccama.rdm.manager.startup.RdmStartupManager.access$1(RdmStartupManager.java:96)
at com.ataccama.rdm.manager.startup.RdmStartupManager$1.run(RdmStartupManager.java:83)
at java.lang.Thread.run(Unknown Source)
Caused by: java.lang.NullPointerException
at sun.jdbc.odbc.JdbcOdbcDriver.getProtocol(Unknown Source)
at sun.jdbc.odbc.JdbcOdbcDriver.knownURL(Unknown Source)
at sun.jdbc.odbc.JdbcOdbcDriver.acceptsURL(Unknown Source)
at java.sql.DriverManager.getDriver(Unknown Source)
at org.apache.tomcat.dbcp.dbcp.BasicDataSource.createConnectionFactory(BasicDataSource.java:1437)

Solution

The error may be caused by two possible reasons. The reason may either lay in the wrong configuration of RDM deployment descriptor or in Tomcat not loading the context descriptor properly. Therefore there are several quests which need to be taken into consideration and accomplished properly. 

Firstly, verify the location of the file containing RDM deployment descriptor and JDBC driver file. RDM deployment descriptor should be located in [RDM]/tomcat/conf/Catalina/localhost/rdm.xml. The file contains definitions of two resources - jdbc/rdm and jdbc/rdm_repository.

jdbc/rdm and jdbc/rdm_repository...
<Resource name="jdbc/rdm" auth="Container"
type="javax.sql.DataSource" driverClassName="org.apache.derby.jdbc.ClientDriver"
url="jdbc:derby://localhost:1527/rdm;create=true"
username="rdm" password="rdm" maxActive="20" maxIdle="10"
maxWait="-1"/>

<Resource name="jdbc/rdm_repository" auth="Container"
type="javax.sql.DataSource" driverClassName="org.apache.derby.jdbc.ClientDriver"
url="jdbc:derby://localhost:1527/rdm;create=true"
username="rdm" password="rdm" maxActive="20" maxIdle="10"
maxWait="-1"/>

If the rdm.xml file is located in the desired area, verify whether there is correct JDBC driver in [RDM]/tomcat/lib directory. If the driver is missing, copy it from [RDM]/runtime/lib/jdbc/mssql/sqljdbc4.jar to [RDM]/tomcat/lib.

If the error still remains although file containing RDM deployment descriptor and file with JDBC driver are in the proper areas, the procedure underneath could present a solution. The cause of the error is associated with Tomcat not loading the context descriptor properly. Switching off automatic deployment of web applications may provide a fix. To repair the issue, follow the steps below:

  1. Stop Tomcat.
  2. In [RDM]/tomcat/conf/server.xml, change the autoDeploy attribute of the element Host to false.

    <Host name="localhost" appBase="webapps"
    unpackWARs="true" autoDeploy="false">

  3. Make sure that the [RDM]/tomcat/conf/Catalina/localhost/rdm.xml is still present.


Tomcat should now work correctly.