Unknown data-source error in Studio may be caused by incorrect custom function declaration

Unknown data-source error in Studio may be caused by incorrect custom function declaration

book

Article ID: KB0072719

calendar_today

Updated On:

Products Versions
TIBCO Streaming 10.6.1 and prior

Description

The query operators connected to a JDBC Table fail to typecheck, but the JDBCDataSourceGroup configuration works in a simple project without changes and allows the Query operators to typecheck successfully. This proves that the JDBCDataSourceGroup configuration is correct.

The error is:
Studio unknown data source typecheck error shown on JDBC Query operator element

Issue/Introduction

Correct the custom function declaration to avoid the mistaken unknown data-source error.

Resolution

This is defect " SB-49909 Incorrect function declaration causes Unknown data-source JDBC Query error" and the workaround is as follows. It was found in version 10.6.0 and is fixed in version 10.6.2 and later. All defect fixes are noted in each version's Release Notes. The following describes the workaround needed in 10.6.1 and prior versions.

The problem is in the CustomFunctionGroup HOCON configuration and not in the JDBCDataSourceGroup configuration or the JDBC Query operator where the error is shown. There will be no error shown in the CustomFunctionGroup configuration, but in our experience the error is most frequently in the "className" property which points to the wrong class package or name.

For example, with a method implemented in class "com.tibco.sb.sample.jdbc_query.CustFuncs" this configuration is incorrect but shows no error:
 type = "com.tibco.ep.streambase.configuration.sbengine" configuration = {   CustomFunctionGroup = {     customFunctions = {       GetAccessID = {         type = "simple"         methodName = "getAccessID"         className = "com.tibco.sb.sample.CustFuncs"         autoArguments = true             }     }   } }
Instead the "Unknown data-source" error is shown on all JDBC Query operators elsewhere in the project.

To resolve this, inspect the CustomFunctionGroup configuration for any incorrect properties and correct them. When correct the JDBC Query operators will not have the "Unknown data-source" error and will be typechecked normally.