Gather operator errors when using a Capture field
book
Article ID: KB0081187
calendar_today
Updated On:
Description
There are two related errors which occur when a Gather operator's input tuple contains a Capture field.
1. Typecheck error:
Output stream GatherOutputStream1: Field "others" from the expansion for
input2_others, which was bound to (others @capFields) in out:Map_1 conflicts
with field "others" in the expansion for input1_others, which was bound to
(others @capFields) in out:Map_1
2. Runtime error:
2018-07-10 11:23:52.816000-0400 [15576:Thread- ThreadPool - 2] WARN
com.streambase.sb.sbd.net.HTTPServer: Connection /192.168.99.1:62356:
ClassCastException: com.streambase.cache.SharedDataClass_63581925057165A9F0C8A01D823F1D42
cannot be cast to com.streambase.cache.SharedDataClass_0A30003AA3607DC6D089128CC7F89BBB
Resolution
When a capture field is presented on two or more input ports of a Gather operator at design time, this causes a Typecheck Error as shown above in example 1. The solution is to remove the identical capture field from all but one of the Gather operator's input ports. This removes the typecheck error.
When running the application there is another error from the Gather operator as shown in example 2. No output is seen from the Gather operator, so this tuple is lost. This error occurs because the Gather operator is trying to expand the capture field after it has changed the name of the capture field by adding a prefix which produces two incompatible schema objects. This error is avoided if no prefix is added to the fields from the port which is carrying the capture field. This incompatibility is defect "SB-44045 Gather cast error on prefixed capture field".
The solution is to remove the prefix from the Output Settings for the input port (for example, "input1_") which contains the capture field.
Issue/Introduction
Workarounds for known problems
Feedback
thumb_up
Yes
thumb_down
No