Issue
When adding a Runtime or a Log Database in Analytics, the following error occurs: Cannot connect to the data source.
Cause
The error may occur due to the JDBC driver for the Runtime log database not being properly set in the <XDI_ANALYTICS_WEBAPP_HOME>/jdbc directory.
Solution
- Ensure that the JDBC drivers for the Runtime log database are installed in the <XDI_ANALYTICS_WEBAPP_HOME>/jdbc directory:
[~/xdi_analytics_webapp_home/]# ls -l
internal
jdbc
navigator
repositories
logs
temp
users
Note: The XDI_ANALYTICS_WEBAPP_HOME location depends on your Application Server installation and can be controlled with the XDI_ANALYTICS_WEBAPP_HOME environment variable. This location is different from the webapp installation directory inside your application server (which contains META-INF and WEB-INF folders). - Check the engineParameters.xml file for the userLogRdbmsUrl parameter. An "Illegal character in authority" error may occur if there is a backslash in the URL.
For example:
<parameter name="userLogRdbmsUrl" value="jdbc:sqlserver://localhost\LOCALMSSQLSERVER;sendStringParametersAsUnicode=false"/> This issue arises due to backslashes in the URLs.

- Modify the connection URL in the engineParameters.xml file to specify the instance correctly. For example:
jdbc:sqlserver://localhost;instance=LOCALMSSQLSERVERinstead of:
jdbc:sqlserver://localhost\LOCALMSSQLSERVER
Information: Ensure that the JDBC driver is compatible with the database version you are using.