TIBCO ActiveMatrix Adapter for Database instance fails to connect to Teradata Database even 'Test Connection' in TIBCO Business Studio works fine.

TIBCO ActiveMatrix Adapter for Database instance fails to connect to Teradata Database even 'Test Connection' in TIBCO Business Studio works fine.

book

Article ID: KB0092879

calendar_today

Updated On:

Products Versions
TIBCO ActiveMatrix BusinessWorks Plug-in for Database -
Not Applicable -

Description

Description:

In TIBCO Business Studio -> Windows -> Preferences -> TIBCO Adapter -> Adapter for Database -> JDBC Driver Path, the path of terajdbc4.jar has been specified.


In TIBCO Business Studio -> ADBConnections -> AdapterForDatabase.sharedadbc, click "Test Connection". There is information that the connection has been created successfully.


While starting TIBCO ActiveMatrix Adapter for Database instance in TIBCO Business Studio, TIBCO ActiveMatrix Adapter for Database fails to startup with the DB connection error.


****************************************************************************************************************
2016 Mar 01 12:12:03:772 GMT +0530 AdapterForDatabase Info [Instance] AEADB-100001
        Active Database Adapter starts to initialize...   
2016 Mar 01 12:12:03:786 GMT +0530 AdapterForDatabase Error [Instance] AEADB-130005
        ADB adapter connection test failed in startup.
Exception :
        java.lang.ClassNotFoundException:
        com.teradata.jdbc.TeraDriver
            at java.net.URLClassLoader$1.run(Unknown Source)
            at java.net.URLClassLoader$1.run(Unknown Source)
            at java.security.AccessController.doPrivileged(Native Method)
            at java.net.URLClassLoader.findClass(Unknown Source)
            at java.lang.ClassLoader.loadClass(Unknown Source)
            at sun.misc.Launcher$AppClassLoader.loadClass(Unknown Source)
            at java.lang.ClassLoader.loadClass(Unknown Source)
            at java.lang.Class.forName0(Native Method)
            at java.lang.Class.forName(Unknown Source)
            at com.tibco.adapter.adb.database.DBConnectionManager.loadDriverClass(Unknown Source)
            at com.tibco.adapter.adb.database.DBConnectionManagerFactory.getConnectionManager(Unknown Source)
            at com.tibco.adapter.adb.core.ADBAdapter.getDBConnectionManager(Unknown Source)
            at com.tibco.adapter.adb.core.ADBAdapter.testConnection(Unknown Source)
            at com.tibco.adapter.adb.core.ADBAdapter.onInitialization(Unknown Source)
            at com.tibco.sdk.MAppImpl.initialize(MAppImpl.java:563)
            at com.tibco.sdk.MDefaultAppImpl.start(MDefaultAppImpl.java:144)
            at com.tibco.sdk.MApp.start(MApp.java:225)
            at com.tibco.adapter.adb.core.ADBAdapter.main(Unknown Source)”
****************************************************************************************************************

Issue/Introduction

TIBCO ActiveMatrix Adapter for Database instance fails to connect to Teradata Database even 'Test Connection' in TIBCO Business Studio works fine.

Environment

Product: TIBCO ActiveMatrix BusinessWorks Version: 6.2.x OS: All Supported Operating Systems -------------------- Product: TIBCO Adapter for ActiveDatabase Version: 7.1.0 OS: All Supported Operating Systems --------------------

Resolution

In TIBCO Business Studio -> ADBConnections -> AdapterForDatabase.sharedadbc -> "Test Connection", it is in Design-time and uses environment variables in TIBCO Business Studio. During runtime, TIBCO ActiveMatrix Adapter for Database uses environment variables defined in the .tra file. This is why there are different results in Design and run time. To solve this issue, add the JDBC driver file to the adapter installation library directory: <ADB_HOME>/lib


Example for the Teradata database:


<ADB_HOME>/lib/tdgssconfig.jar
<ADB_HOME>/lib/terajdbc4.jar

Additional Information

This information is mentioned in TIBCO ActiveMatrix Adapter for Database User Guide -> Installation -> Chapter 4 Post-installation Tasks -> Post-installation Tasks on Microsoft Windows Platforms and Post-installation Tasks on UNIX Platforms.