모듈을 배포하는 데 문제가 있습니다. 여기 module.epl
입니다 :모듈을 배포하는 방법
import com.fss.demo.esperevent.*;
@Name('Count-Switched-On')
select count(*) from DemoSimpleEvent1;
및
{
DemoSimpleEvent1 demoSimpleEvent1 = new DemoSimpleEvent1();
Configuration config = new Configuration();
config.addEventTypeAutoName("com.fss.demo.esperevent");
EPServiceProvider EpService = EPServiceProviderManager.getDefaultProvider(config);
EPDeploymentAdmin deployAdmin = EpService.getEPAdministrator().getDeploymentAdmin();
MyListener myListener = new MyListener();
try {
Module module = deployAdmin.read(new File("module.epl"));
DeploymentResult MyResult = deployAdmin.deploy(module, new DeploymentOptions());
EPStatement Stta = EpService.getEPAdministrator().getStatement("Count-Switched-On");
} catch (IOException | ParseException | DeploymentException e) {
e.printStackTrace();
}
}
}
하지만 Stta
이 null
인 코드 및 MyResult.statement
어떤 문을 포함하지 않습니다. 그래서 내가 뭘 잘못하고 있니?
문제를 해결했다고 생각합니다. 여기서 문제는 라이브러리 antlr-runtime.jar의 버전입니다. esper 4.11.0.jar의 경우 antlr-runtime-3.2.jar을 사용해야합니다. –