KB Article #180267
Additional jdbc driver support
Problem
-- API Gateway officially support 4 jdbc drivers: oracle, sqlserver, mysql and db2, as mentioned in the documentation: https://docs.axway.com/bundle/APIGateway_77_Policy...
-- It's possible to use some external jars with other jdbc driver (teiid, postgresql, ...) by adding them in the ext/lib/ folder of your API Gateway installation or as runtime dependencies in Policy Studio, but doing this, when deploying, the following error occurs:
Caused by: java.lang.Error: No JDBC Driver found for the name: {driver_name}
at com.vordel.common.db.DbUtility.getJDBCDriver(DbUtility.java:99)
at com.vordel.common.db.DbConnection.<init>(DbConnection.java:164)
at com.vordel.common.db.DbConnectionCache.createDbConnection(DbConnectionCache.java:85)
at com.vordel.common.db.DbConnectionCache.getConnection(DbConnectionCache.java:64)
at com.vordel.circuit.attribute.AttributeExtractDbProcessor.filterAttached(AttributeExtractDbProcessor.java:56)
Resolution
- This is error happened because only the 4 mentioned drivers are supported and the class handling the drivers is looking for one of those 4 names.
- That's possible to add support for some other jdbc drivers with the following procedure:
1. Edit your current configuration using Entity Explorer (esexplorer, it can be found in the posix/bin/ folder of your API Gateway installation, but need a graphical interface to work, so you can use it from here using X11 forwarding, or, it is now also delivered in the in the tools for Windows in version 7.7, so you can install it from here: https://support.axway.com/en/downloads/download-details/id/1441791, even if it is version 7.7, Entity Explorer will be able to handle project from version 7.5.3). To open your configuration in Entity Explorer, from Store > Connect ... select the config.xml file in your project folder.
2. Once your project is opened, look for the entity folder JDBC Drivers, it will contains 4 entities, make a right click on one of them (select the one that looks the more like the one to handle your driver) and select copy in the contextual menu.
3. Right click on the entity folder JDBC Drivers, and select paste in the contextual menu.
4. Change the name of your copy to your_driver_name, and adapt the value of connValidationQuery, driverClass and productName for this entity (look for the documentation of your driver provider to know them).
5. Once your configuration is updated, you can reopen it in Policy Studio and deploy it in your instance, the driver jars will have to be available for them (runtime dependencies for Policy Studio, ext/lib/ folder for your instance).
- Keep in mind that there is no official support for jdbc drivers that are not mentioned in the documentation, so usage is at your own risk.