0
Esper로 간단한 테스트 (14 장, http://dl.e-book-free.com/2013/07/activiti_in_action.pdf)를 실행하려고합니다. 코드는 매우 간단하다 :Esper : 유효성 검사 오류로 인해 EPL "select"가 실패했습니다.
"select sum(amount) as sumAmount from LoanRequestEvent.win:length(2)"
그것은 말한다 :
public class EventLengthWindowTest {
public class LoanRequestEvent {
public int amount =2;
public LoanRequestEvent(int a){
amount += a;
}
}
private int sumAmount = 0;
@Test
public void testEventLengthWindow() {
Configuration configuration = new Configuration();
configuration.addEventType(LoanRequestEvent.class);
EPServiceProvider epService = EPServiceProviderManager.getDefaultProvider(configuration);
EPAdministrator admin = epService.getEPAdministrator();
EPStatement epStatement = admin.createEPL("select sum(amount) as sumAmount from LoanRequestEvent.win:length(2)");
...
}
가 나는 EPL 부분에 대한 오류 메시지가
com.espertech.esper.client.EPStatementException: Error starting statement: Failed to validate select-clause expression 'sum(amount)': Property named 'amount' is not valid in any stream [select sum(amount) as sumAmount from LoanRequestEvent.win:length(2)]
이런 일이 발생하는 이유 어떤 아이디어?
정말 감사합니다. – KayJ