Jump to content
  • Application won't start if JDBC connection is down


    Issue

    EventFlow applications that issue queries to external JDBC data sources may fail to start if the connection to the JDBC data source cannot be established. The console may report errors such as

     [main] ERROR com.streambase.sb.sbd.SBD - Error connecting to data-source Oracle10:SQLException while retrieving JDBC Connection: The Network Adapter could not establish the connection

    Solution

    Note that all StreamBase applications need to successfully typecheck before starting. Typechecking is the process of ensuring that tuples output by one component or statement in a module have the schema required to be processed by the next components or statements downstream. By default, any Query operators that issue queries to external JDBC data sources will attempt to connect to the data source on application startup to verify the schema of result sets returned by these queries.

    To avoid this initial connection attempt, you may choose instead to explicitly define the schemas in your JDBC Query operators. This will allow your application to start even if the connection to the external data source is down.

    To explicitly set the schema in a JDBC Query operator, go to the Properties > Result Settings tab, and find the SQL Result fields property. Change the default setting Result set from SQL Query to Explicitly declare fields below, and then define the schema in the Fields section below.

    To refactor all JDBC Query operators in your application to explicitly set their schemas automatically, right-click on your application in the Package Explorer in Studio, and select StreamBase > JDBC Operator Schemas Wizard, and follow the prompts as described in the Help under StreamBase Documentation > Authoring Guide > Using StreamBase Operators > Using the Query Operator with JDBC Tables > (sub-heading) Properties: Result Settings Tab > (sub-heading) Refactor All JDBC Query Operators.


    User Feedback

    Recommended Comments

    There are no comments to display.


×
×
  • Create New...