How to resolve the error "cs.jdbc.Driver.CompositeDriver not found" when connecting to TIBCO Data Virtualization using a java application running on IBM Websphere Liberty Application Server?

How to resolve the error "cs.jdbc.Driver.CompositeDriver not found" when connecting to TIBCO Data Virtualization using a java application running on IBM Websphere Liberty Application Server?

book

Article ID: KB0072580

calendar_today

Updated On:

Products

TIBCO Data Virtualization

Description

When connecting the IBM Websphere Liberty application server to a TDV instance using the JDBC Driver, the application might fail on startup with the below error and will not be able to initialize the connection with TDV:
-------
Caused by: java.util.ServiceConfigurationError: java.sql.Driver: Provider cs.jdbc.Driver.CompositeDriver not found
-------

Issue/Introduction

This article describes the steps to resolve the error "cs.jdbc.Driver.CompositeDriver not found" when connecting to TIBCO Data Virtualization using IBM Websphere.

Environment

All supported environments

Resolution

In order to resolve the issue, an implementation class needs to be added in the IBM Websphere Liberty application server's config after which the connection will work successfully. For reference, the below XML config can be used:

------------------------
<server>
<library id="tibco-lib">
<file name="D:/Workspace/Java/Programme/tibco/csjdbc8.jar"/>
</library>

<dataSource id="datasource" jndiName="jdbc/insight-srepDataSource"
type="javax.sql.DataSource">
<jdbcDriver libraryRef="tibco-lib"
javax.sql.DataSource="cs.jdbc.driver.CompositeDataSource"/>
<properties user="**" password="***"
url="jdbc:compositesw:dbapi@hostserver:9401?domain=composite&amp;dataSource=INSBF1T_srep&amp;unsupportedMode=silent"
/>
</dataSource>
</server>
---------------------------

Note: The "unsupportedMode=silent" parameter needs to be added in the URL to get rid of "The operation 'Properties getClientInfo()' is not supported" error message.