Hi all, I tried to run a siddhi query in a java application which works perfectly in wso2CEP.
Query: (which works in wso2CEP) [1] from a=obd_speed,b=obd_speedselect b.speed-a.speed as speedDifference,b.time - a.time as timeInterval, b.time as timeStampinsert into obd_accele_calculation; Query in the java application ( Used the sample [2] ) String queryReference = siddhiManager.addQuery("from cseEventStream a=cseEventStream , b=cseEventStream " + "select b.price - a.price as priceDiff, symbol insert into StockQuote ;"); Gives this error [3] Siddhi version used is 1.0.1 . Even failed with 2.1 and 2.2 (built from the source) Is the query in a wrong format? Any thoughts? Thank you [1] : https://github.com/Kampana/fyp-obd2/blob/master/cep-extentions/execution-plan [2] : https://svn.wso2.org/repos/wso2/people/suho/packs/siddhi/siddhi-1.0.1-wso2v1-samples.zip [3] : Exception in thread "main" org.wso2.siddhi.query.compiler.exception.SiddhiPraserException: line 1:21 mismatched input 'a' expecting 'insert' at org.wso2.siddhi.query.compiler.SiddhiCompiler.parseQuery( SiddhiCompiler.java:104) at org.wso2.siddhi.core.SiddhiManager.addQuery(SiddhiManager.java:168) at org.wso2.siddhi.sample.TimeWindowSample.main(TimeWindowSample.java:47) Caused by: org.wso2.siddhi.query.compiler.exception.SiddhiPraserException: line 1:21 mismatched input 'a' expecting 'insert' at org.wso2.siddhi.query.compiler.SiddhiQLGrammarParser.emitErrorMessage( SiddhiQLGrammarParser.java:172) at org.antlr.runtime.BaseRecognizer.displayRecognitionError( BaseRecognizer.java:194) at org.antlr.runtime.BaseRecognizer.reportError(BaseRecognizer.java:186) at org.wso2.siddhi.query.compiler.SiddhiQLGrammarParser.outputStream( SiddhiQLGrammarParser.java:894) at org.wso2.siddhi.query.compiler.SiddhiQLGrammarParser.query( SiddhiQLGrammarParser.java:690) at org.wso2.siddhi.query.compiler.SiddhiCompiler.parseQuery( SiddhiCompiler.java:95) ... 2 more Regards, Asiri
_______________________________________________ Dev mailing list Dev@wso2.org http://wso2.org/cgi-bin/mailman/listinfo/dev