TIBCO Streaming application fails with circular parameter reference error

TIBCO Streaming application fails with circular parameter reference error

book

Article ID: KB0075743

calendar_today

Updated On:

Products Versions
TIBCO Streaming 10.5 and later

Description

Starting an installed node using 
  epadmin servicename=A.X start node 
fails with an error like this in the node logs/default-engine-for-*.log:
2020-04-02 09:21:10.985000-0400 [35100:EventFlow Fragment] ERROR com.tibco.ep.sb.rt.launcher.EventFlowFragment: java.lang.Exception: Fragment com.example.ops.ms.example_ops_ms terminated with status -1: 
com.streambase.sb.StreamBaseException: circular parameter reference: SYSTEM -> SYSTEM

The error message does not identify the source of the problem.

What is causing this error?

Issue/Introduction

Applications which ran in 10.4 may need migration of parameters in 10.5 and later.

Resolution

Parameter handling was changed in two incompatible ways from TIBCO Streaming version 10.4 to version 10.5:
1. Operator Parameters (Global Parameters) are deprecated in favor of Container Parameters.
2. Operator Parameters, Module Parameters, Container Parameters, and Substitution Variables namespaces are conflated.

The conflation of the namespaces results in cases where an Operator Parameter set by a Substitution Variable of the same name is now illegal. A Module Parameter in a .sbapp module set by an Operator Parameter or Container Parameter of the same name is now illegal. Both of these constructions which worked in TIBCO Streaming 10.4 will cause this error in TIBCO Streaming 10.5 and later.

The necessary migration step is to rename the parameters in each separate use so that all names are unique across all uses and no setting of a parameter is made from a parameter with the same name, regardless of the type of the parameter.

The error will be caused by the deprecated operatorParameters definition in the StreamBaseEngine configuration:
   streamBase = {     operatorParameters = {       "SYSTEM" = "${SYSTEM:-defaultValue}"
The operator parameter and the referenced substitution variable have the same name. This condition is not typechecked by Studio in version 10.5. It will only be detected by the server at node start, causing the previously mentioned error.

Within a module .sbapp in a Studio editor, the error will be caused by a Parameter setting like this:
SB Studio .sbapp editor, Parameters tab, with same name for parameter and operator parameter refererence

Change the name of one of the parameters so that it is distinguished from all other parameters within the project and within all fragments that will be run together as part of a single StreamBase container within the Streaming node.