Reputation: 237
I would like to fire a pattern with the following syntax.
EPStatement raiseStmt = cepAdm.createEPL("[1] Event");
But i am getting the following exception
Exception in thread "main" com.espertech.esper.client.EPStatementSyntaxException: Incorrect syntax near '[' [[1] Event]
at com.espertech.esper.epl.parse.ExceptionConvertor.convertStatement(ExceptionConvertor.java:47)
at com.espertech.esper.epl.parse.ParseHelper.parse(ParseHelper.java:112)
at com.espertech.esper.core.service.EPAdministratorHelper.compileEPL(EPAdministratorHelper.java:99)
at com.espertech.esper.core.service.EPAdministratorHelper.compileEPL(EPAdministratorHelper.java:71)
at com.espertech.esper.core.service.EPAdministratorImpl.createEPLStmt(EPAdministratorImpl.java:116)
at com.espertech.esper.core.service.EPAdministratorImpl.createEPL(EPAdministratorImpl.java:66)
at exampleMain.main(exampleMain.java:202)
Upvotes: 0
Views: 418
Reputation: 816
The "admin.createEPL" method takes an EPL statement and not just a pattern. For example "select * from pattern[[1] Event]". This is equivalent to: admin.createPattern("[1] Event")
Upvotes: 1