Why application failed with Error "Failed to find or create the JDBC driver : com.sybase.jdbc2.jdbc.SybDriver"?

Why application failed with Error "Failed to find or create the JDBC driver : com.sybase.jdbc2.jdbc.SybDriver"?

book

Article ID: KB0084269

calendar_today

Updated On:

Products Versions
TIBCO ActiveMatrix BusinessWorks 5.x

Description

When starting an application which connects to Sybase DB using native jconn2.jar, it works fine. But when trying to use jconn4.jar, it fails with the following  stack trace in the application .log file,
++++++++++++++++++++
caused by: "Failed to find or create the JDBC driver : com.sybase.jdbc2.jdbc.SybDriver"
        at com.tibco.plugin.jdbc.JDBCActivity.loadJDBCConfigInfo(Unknown Source)
        at com.tibco.plugin.jdbc.JDBCActivity.init(Unknown Source)
        at com.tibco.plugin.jdbc.JDBCGeneralActivity.init(Unknown Source)
        at com.tibco.pe.core.TaskImpl.init(Unknown Source)
        at com.tibco.pe.core.WorkflowBuilder.a(Unknown Source)
        at com.tibco.pe.core.WorkflowBuilder.a(Unknown Source)
        at com.tibco.pe.core.WorkflowBuilder.build(Unknown Source)
        at com.tibco.pe.core.WorkflowLoader.setWorkflows(Unknown Source)
        at com.tibco.pe.core.WorkflowLoader.loadWorkflows(Unknown Source)
        at com.tibco.pe.core.JobPoolConfigurator.a(Unknown Source)
        at com.tibco.pe.core.JobPoolConfigurator.if(Unknown Source)
        at com.tibco.pe.core.JobPool.<init>(Unknown Source)
        at com.tibco.pe.core.JobPoolCreator.init(Unknown Source)
        at com.tibco.pe.core.JobPoolCreator.<init>(Unknown Source)
        at com.tibco.pe.PEMain.a(Unknown Source)
        at com.tibco.pe.PEMain.do(Unknown Source)
        at com.tibco.pe.PEMain.a(Unknown Source)
        at com.tibco.pe.PEMain.<init>(Unknown Source)
        at com.tibco.pe.PEMain.main(Unknown Source)
++++++++++++++++++++

BW is unable to locate the correct driver name with respect to the driver JAR used in BW applications or that is available in the classpath. When the Sysbase driver selected on the JDBC connect resource from the available drop-down, the driver is "com.sybase.jdbc2.jdbc.SybDriver" which is compatible or available with jconn2.jar. But when same driver name is used with jconn4.jar, BW is unable to locate the driver name and version in the driver JAR and it fails.
 

Issue/Introduction

Application fails with the error, "caused by: "Failed to find or create the JDBC driver : com.sybase.jdbc2.jdbc.SybDriver" when using the jconn4.jar driver and using jconn2.jar.

Environment

All

Resolution


Go to JDBC Connection Resource. Click on the JDBC Driver text box present at left side of the drop down, which is editable. Edit and change the JDBC driver to "com.sybase.jdbc4.jdbc.SybDrive" and save the change.

Test the JDBC connection.

Recreate the EAR (if required). Then deploy and test the application at runtime.