Symptom

When adding a Runtime or a Log Database in Analytics, the following error occurs: "Connection to the data source could not be established - Reason : Could not connect to the data source".


Possible cause 1:

The JDBC driver corresponding to the Runtime log database is not properly set in <STAMBIA_WEBAPP_HOME>/jdbc directory.


Solution

Install the JDBC drivers for the Runtime log database, into the <STAMBIA_WEBAPP_HOME>/jdbc directory:

[~/analytics_webapp_home/]# ls -l
internal
jdbc
navigator
repositories
stambia.logs
temp
users

Reminder: the analytics's webapp home depends on your Application Server installation. This location can be controlled with the STAMBIA_WEBAPP_HOME environment variable. It is different from the webapp installation directory inside your application server (which contains META-INF and WEB-INF folders). 



Possible cause 2:


An "Illegal character in authority" error may occur when there is a backslash inside the url defined at the "userLogRdbmsUrl" log parameter in the runtime engineParamters.xml file.

For exemple:

[engineParamters.xml]

<parameter name="userLogRdbmsUrl" value="jdbc:sqlserver://localhost\LOCALMSSQLSERVER;sendStringParametersAsUnicode=false"/>


This is because backslashes back inside the URLs.



Solution

Specify the instance using, for example

jdbc:sqlserver://localhost;instance=LOCALMSSQLSERVER

instead of

jdbc:sqlserver://localhost\LOCALMSSQLSERVER

in the connection url in the engineParameters.xml file on runtime's side.