The possible exceptions relating to the validation of Siddhi queries that may occur are as follows:
No viable alternative at input (SiddhiParserException)
Sample error log | [2017-07-10 15:35:11,772] ERROR {org.wso2.carbon.event.processor.admin.EventProcessorAdminService} - Exception when validating execution plan org.wso2.siddhi.query.compiler.exception.SiddhiParserException: You have an error in your SiddhiQL at line 16:36, no viable alternative at input 'InputStream#window.time(1 min\n select |
---|---|
Occurrence | This occurs when validating an execution plan or when deploying an execution plan via the file system. |
Possible reasons | This error indicates that there is a syntax error in your Siddhi query. |
Troubleshooting options | To find the exact place in the Siddhi query where the syntax error exists, use the numbers provided (e.g., 16:36). First number indicates the line number, and second number indicates the character position. |
Recommended action | Open you Siddhi query in a text editor and find the exact place using the given numbers. Then check whether you have missed any brackets, keywords, etc. The expected symbol, keyword etc. can sometimes be mentioned within the error message. |
Stream definition already exists (DuplicateDefinitionException)
Sample error log | [2017-07-10 17:34:21,372] ERROR {org.wso2.carbon.event.processor.admin.EventProcessorAdminService} - Exception when validating execution plan org.wso2.carbon.event.processor.core.exception.ExecutionPlanConfigurationException: Different definition same as output stream definition :StreamDefinition{id='OutputStream', attributeList=[Attribute{id='sensor_id_distinct_count', type=DOUBLE}, Attribute{id='count', type=LONG}], annotations=[]} already exist as:StreamDefinition{id='OutputStream', attributeList=[Attribute{id='sensor_id_distinct_count', type=LONG}, Attribute{id='count', type=LONG}], annotations=[Annotation{name='Export', elements=[Element{key='null', value='org.wso2.event.temperature.statistics.stream:1.0.0'}]}]} in execution plan "SensorDataAnalysis-SensorAnalytics-ssss-realtime1" |
---|---|
Occurrence | This occurs when validating an execution plan or when deploying an execution plan via the file system. |
Possible reasons | This exception is thrown when there are two event stream definitions with the same name and different attributes. This may have happened in one of the following ways:
|
Troubleshooting options | To find the execution plan that is causing the error, you can browse the end of the To find out whether both streams were explicitly defined, or whether one of them was inferred by Siddhi, you need to compare the two stream definitions printed in the log. If you read the exception carefully it prints two stream definitions within curly braces. You can extract both out and compare using a tool like Meld and identify the issue. |
Recommended action |
|
Extension does not exist (ExecutionPlanConfigurationException)
Sample error log | [2017-07-10 18:20:13,226] ERROR {org.wso2.carbon.event.processor.admin.EventProcessorAdminService} - Exception when validating execution plan org.wso2.carbon.event.processor.core.exception.ExecutionPlanConfigurationException: test does not exist in type WindowProcessor in execution plan "SensorDataAnalysis-SensorAnalytics-ssss-realtime1" [2017-07-10 18:21:55,142] ERROR {org.wso2.carbon.event.processor.admin.EventProcessorAdminService} - Exception when validating execution plan org.wso2.carbon.event.processor.core.exception.ExecutionPlanConfigurationException: 'test' is neither a function extension nor an aggregated attribute extension in execution plan "SensorDataAnalysis-SensorAnalytics-ssss-realtime1". |
---|---|
Occurrence | This occurs when you implement a new extension in WSO2 DAS and try to use it. |
Possible reasons | The custom extension is not properly loaded into the system. |
Troubleshooting Options |
|
Cannot find attribute type (ExecutionPlanConfigurationException)
Sample error log | [2017-07-10 18:34:26,186] ERROR {org.wso2.carbon.event.processor.admin.EventProcessorAdminService} - Exception when validating execution plan org.wso2.carbon.event.processor.core.exception.ExecutionPlanConfigurationException: Cannot find attribute type as 'test' does not exist in 'InputStream'; StreamDefinition{id='InputStream', attributeList=[Attribute{id='sensor_id', type=STRING}, Attribute{id='sensor_value', type=DOUBLE}], annotations=[Annotation{name='Import', elements=[Element{key='test', value='org.wso2.event.temperature.stream:1.0.0'}]}]} in execution plan "SensorDataAnalysis-SensorAnalytics-ssss-realtime1" |
---|---|
Occurrence | This occurs if you try to select an attribute that does not exist via a Siddhi query. |
Possible reasons | Incorrect reference to the required attribute (e.g., a mismatch in how the attribute is spelt in the stream definition and in the Siddhi query, the difference in the case used etc.) |
Troubleshooting options |
|