You are viewing the documentation for Blueriq 14. Documentation for other versions is available in our documentation directory.


A JDBC driver (Java Database Connectivity) is a way for Java programs to connect to databases. When you run the Blueriq installer, a H2 JDBC driver is configured out-of-the-box. While this driver is great for development, we don't recommend to use this database in a production environment. On this page you find instructions how to install a JDBC driver for your database and application server.

Supported JDBC Drivers

All supported database platforms can be found on the Platform support page.

Microsoft SQL Server

For Microsoft SQL Server, we recommend using the Microsoft JDBC Driver 7.4. This driver can be found on the Microsoft Download center https://www.microsoft.com/en-us/download/details.aspx?id=58505

Oracle

For Oracle, we recommend to use the ojdbc8 driver: ojdbc8.jar version 19.3.0.0. The ojdbc8 driver can be downloaded from the Oracle website.

Application servers

Tomcat

On Tomcat, the JDBC driver is usually placed in the $CATALINA_HOME\lib folder.

https://tomcat.apache.org/tomcat-9.0-doc/jndi-datasource-examples-howto.html

JBoss EAP

For JBoss EAP the JDBC drivers should be added as a module.

https://access.redhat.com/documentation/en-us/red_hat_jboss_enterprise_application_platform/7.2/html/configuration_guide/datasource_management#jdbc_drivers

Websphere Liberty Core

When using Websphere Liberty Core as an application server all the configuration needs to be done inside the Server.xml that is created when you create a server with Liberty Core. It can be found inside the installation directory of Websphere Liberty Core → wlp → usr → servers → <ServerName>

JDBC Driver configuration

When configuring the JDBC drivers for blueriq, a library xml element needs to be added to the server.xml, the library xml elements needs to contain an "id" attribute which is used as reference later on. In the fileset element the dir attribute must be set to the directory containing designated support driver. In this example oracle is used.

JDBC
<library id="oracle-lib">
    <fileset dir="C:\drivers" includes="ojdbc8.jar"/>
</library>

Once the library element is added it can be used inside the application element to add the library to the application classloader. Inside the classloader element the attribute "commonLibraryRef" is set the newly created id of the library element.

Classloader
<application id="Blueriq" location="blueriq-runtime-application-12.0.0.0.war" name="Blueriq" context-root="runtime" autoStart="true">
	<classloader commonLibraryRef="oracle-lib"/>
</application>

JNDI datasources configuration

JDNI datasources are drivers specifc, in the examples only the supported drivers are shown.

Oracle

In the xml element jdbcDriver, the libraryRef attribute is set to the library id. In the properties.oracle element the connection URL, user and password attributes need to be set in order to create a database connection. Fill in the blanks at <...> with your own configuration.

JNDI Oracle
<dataSource id="CustomerDataSource" jndiName="jdbc/customer">
	<jdbcDriver libraryRef="oracle-lib"/>
	<properties.oracle URL="jdbc:oracle:<driverType>:@<server_name>:<port>:<SID>" user="user" password="password"/>
</dataSource>
Microsoft SQL Server

In the xml element jdbcDriver the libraryRef attribute is set to the library id. In the properties.microsoft.sqlserver element, fill in the attributes with your own configuration.

JNDI MSSQL
<dataSource id="CustomerDataSource" jndiName="jdbc/customer">
	<jdbcDriver libraryRef="mssql-lib"/>
	<properties.microsoft.sqlserver databaseName="database" portNumber="portnr" serverName="server" user="user" password="password"/>
</dataSource>

1 Comment

  1. Tip: In my case, where I use Microsoft SQL Server as database for my customerdata aggregates, I had to copy the jdbc driver file (mssql-jdbc-7.4.1.jre11.jar) to the folder C:\Program Files\Blueriq 14\tools\tomcat\lib. That was a small but essential detail to get it working.