telefonicaid / perseo-core

Core/backend for the Perseo CEP
GNU General Public License v2.0
11 stars 13 forks source link

date cast problems with esper #219

Open AlvaroVega opened 2 years ago

AlvaroVega commented 2 years ago

cast(cast(status_datetime?,string),date, dateformat: 'yyyy-MM-dd HH:mm:ss').format(\"yyyy-MM-dd'T'HH:mm:ss.SSSX\") as statusdatetime

time=2022-06-29T09:34:52.668Z | lvl=ERROR | from=::ffff:172.17.0.16 | corr=85f76744-5ba6-4080-ad44-7c7f5d4434bb; cbnotif=3; node=mSox4tLGxT; perseocep=132 | trans=b7a07260-91cb-40cf-82ed-e9b0a7abc962 | srv=smartcity | subsrv=/CEP | op=handleException | comp=perseo-core | msg=Exception encountered processing deployment-id '91c27686-4208-4b0d- bb5c-8af42c14f89d' statement ......

java.lang.NullPointerException: null at com.espertech.esper.common.internal.view.core.ZeroDepthStreamNoIterate. insert(ZeroDepthStreamNoIterate.java:41) ~[esper-common-8.4.0.jar:?] at com.espertech.esper.common.internal.context.activator.ViewableActivator Filter$1.matchFound(ViewableActivatorFilter.java:76) ~[esper-common- 8.4.0.jar:?] at com.espertech.esper.runtime.internal.kernel.service.EPEventServiceImpl. processStatementFilterSingle(EPEventServiceImpl.java:796) ~[esper- runtime-8.4.0.jar:?] at com.espertech.esper.runtime.internal.kernel.service.EPEventServiceImpl. processMatches(EPEventServiceImpl.java:675) ~[esper-runtime- 8.4.0.jar:?] at com.espertech.esper.runtime.internal.kernel.service.EPEventServiceImpl. processWrappedEvent(EPEventServiceImpl.java:453) ~[esper-runtime- 8.4.0.jar:?] at com.espertech.esper.runtime.internal.kernel.service.EPEventServiceImpl. sendEventMap(EPEventServiceImpl.java:395) ~[esper-runtime-8.4.0.jar:?] at com.telefonica.iot.perseo.EventsServlet.doPost(EventsServlet.java:91) ~[classes/:?] at javax.servlet.http.HttpServlet.service(HttpServlet.java:681) ~[servlet- api.jar:4.0.FR] at javax.servlet.http.HttpServlet.service(HttpServlet.java:764) ~[servlet- api.jar:4.0.FR] at org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(Applic ationFilterChain.java:227) ~[catalina.jar:9.0.64] at org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFil terChain.java:162) ~[catalina.jar:9.0.64] at org.apache.tomcat.websocket.server.WsFilter.doFilter(WsFilter.java:53) ~[tomcat-websocket.jar:9.0.64] at org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(Applic ationFilterChain.java:189) ~[catalina.jar:9.0.64] at org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFil terChain.java:162) ~[catalina.jar:9.0.64] at org.apache.catalina.core.StandardWrapperValve.invoke(StandardWrapperVal ve.java:197) ~[catalina.jar:9.0.64] at org.apache.catalina.core.StandardContextValve.invoke(StandardContextVal ve.java:97) ~[catalina.jar:9.0.64] at org.apache.catalina.authenticator.AuthenticatorBase.invoke(Authenticato rBase.java:541) ~[catalina.jar:9.0.64] at org.apache.catalina.core.StandardHostValve.invoke(StandardHostValve.jav a:135) ~[catalina.jar:9.0.64] at org.apache.catalina.valves.ErrorReportValve.invoke(ErrorReportValve.jav a:92) ~[catalina.jar:9.0.64] at org.apache.catalina.valves.AbstractAccessLogValve.invoke(AbstractAccess LogValve.java:687) ~[catalina.jar:9.0.64] at org.apache.catalina.core.StandardEngineValve.invoke(StandardEngineValve .java:78) ~[catalina.jar:9.0.64] at org.apache.catalina.connector.CoyoteAdapter.service(CoyoteAdapter.java: 360) ~[catalina.jar:9.0.64] at org.apache.coyote.http11.Http11Processor.service(Http11Processor.java:3 99) ~[tomcat-coyote.jar:9.0.64] at org.apache.coyote.AbstractProcessorLight.process(AbstractProcessorLight .java:65) ~[tomcat-coyote.jar:9.0.64] at org.apache.coyote.AbstractProtocol$ConnectionHandler.process(AbstractPr otocol.java:890) ~[tomcat-coyote.jar:9.0.64] at org.apache.tomcat.util.net.NioEndpoint$SocketProcessor.doRun(NioEndpoin t.java:1787) ~[tomcat-coyote.jar:9.0.64] at org.apache.tomcat.util.net.SocketProcessorBase.run(SocketProcessorBase. java:49) ~[tomcat-coyote.jar:9.0.64] at org.apache.tomcat.util.threads.ThreadPoolExecutor.runWorker(ThreadPoolE xecutor.java:1191) ~[tomcat-util.jar:9.0.64] at org.apache.tomcat.util.threads.ThreadPoolExecutor$Worker.run(ThreadPool Executor.java:659) ~[tomcat-util.jar:9.0.64] at org.apache.tomcat.util.threads.TaskThread$WrappingRunnable.run(TaskThre ad.java:61) ~[tomcat-util.jar:9.0.64] at java.lang.Thread.run(Thread.java:829) ~[?:?]

and

java.lang.NumberFormatException: For input string: ".E367E22" at jdk.internal.math.FloatingDecimal.readJavaFormatString(FloatingDecimal. java:2054) ~[?:?] at jdk.internal.math.FloatingDecimal.parseDouble(FloatingDecimal.java:110) ~[?:?] at java.lang.Double.parseDouble(Double.java:543) ~[?:?] at java.text.DigitList.getDouble(DigitList.java:169) ~[?:?] at java.text.DecimalFormat.parse(DecimalFormat.java:2126) ~[?:?] at java.text.SimpleDateFormat.subParse(SimpleDateFormat.java:2240) ~[?:?] at java.text.SimpleDateFormat.parse(SimpleDateFormat.java:1541) ~[?:?] at java.text.DateFormat.parse(DateFormat.java:393) ~[?:?] at com.espertech.esper.common.internal.epl.expression.funcs.ExprCastNode$S tringToDateWStaticFormatComputer.stringToDateWStaticFormatParseSafe(Exp rCastNode.java:501) ~[esper-common-8.4.0.jar:?] at generated.ResultSetProcessorFactoryProvider_3bdadcdf45383c454b0545a4594 5ea037a4d1438_ruleTest64smartcity47CEP$SelectExprProcessorImpl.m20(Sele ctExprProcessorImpl.java:496) ~[?:?] at generated.ResultSetProcessorFactoryProvider_3bdadcdf45383c454b0545a4594 5ea037a4d1438_ruleTest64smartcity47CEP$SelectExprProcessorImpl.m19(Sele ctExprProcessorImpl.java:486) ~[?:?] at generated.ResultSetProcessorFactoryProvider_3bdadcdf45383c454b0545a4594 5ea037a4d1438_ruleTest64smartcity47CEP$SelectExprProcessorImpl.m1(Selec tExprProcessorImpl.java:345) ~[?:?] at generated.ResultSetProcessorFactoryProvider_3bdadcdf45383c454b0545a4594 5ea037a4d1438_ruleTest64smartcity47CEP$SelectExprProcessorImpl.m0(Selec tExprProcessorImpl.java:327) ~[?:?] at generated.ResultSetProcessorFactoryProvider_3bdadcdf45383c454b0545a4594 5ea037a4d1438_ruleTest64smartcity47CEP$SelectExprProcessorImpl.process( SelectExprProcessorImpl.java:317) ~[?:?] at com.espertech.esper.common.internal.epl.resultset.handthru.ResultSetPro cessorHandThroughUtil.getSelectEventsNoHavingHandThruView(ResultSetProc essorHandThroughUtil.java:45) ~[esper-common-8.4.0.jar:?] at generated.ResultSetProcessorFactoryProvider_3bdadcdf45383c454b0545a4594 5ea037a4d1438_ruleTest64smartcity47CEP$RSP.processViewResult(RSP.java:1 31) ~[?:?] at generated.OutputProcessViewFactoryProvider_3bdadcdf45383c454b0545a45945 ea037a4d1438_ruleTest64smartcity47CEP$OPV.update(OPV.java:65) ~[?:?] at com.espertech.esper.common.internal.view.core.ZeroDepthStreamNoIterate. insert(ZeroDepthStreamNoIterate.java:41) ~[esper-common-8.4.0.jar:?] at com.espertech.esper.common.internal.context.activator.ViewableActivator Filter$1.matchFound(ViewableActivatorFilter.java:76) ~[esper-common- 8.4.0.jar:?] at com.espertech.esper.runtime.internal.kernel.service.EPEventServiceImpl. processStatementFilterSingle(EPEventServiceImpl.java:796) ~[esper- runtime-8.4.0.jar:?] at com.espertech.esper.runtime.internal.kernel.service.EPEventServiceImpl. processMatches(EPEventServiceImpl.java:675) ~[esper-runtime- 8.4.0.jar:?] at com.espertech.esper.runtime.internal.kernel.service.EPEventServiceImpl. processWrappedEvent(EPEventServiceImpl.java:453) ~[esper-runtime- 8.4.0.jar:?] at com.espertech.esper.runtime.internal.kernel.service.EPEventServiceImpl. sendEventMap(EPEventServiceImpl.java:395) ~[esper-runtime-8.4.0.jar:?] at com.telefonica.iot.perseo.EventsServlet.doPost(EventsServlet.java:91) ~[classes/:?] at javax.servlet.http.HttpServlet.service(HttpServlet.java:681) ~[servlet- api.jar:4.0.FR] at javax.servlet.http.HttpServlet.service(HttpServlet.java:764) ~[servlet- api.jar:4.0.FR] at org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(Applic ationFilterChain.java:227) ~[catalina.jar:9.0.64] at org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFil terChain.java:162) ~[catalina.jar:9.0.64] at org.apache.tomcat.websocket.server.WsFilter.doFilter(WsFilter.java:53) ~[tomcat-websocket.jar:9.0.64] at org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(Applic ationFilterChain.java:189) ~[catalina.jar:9.0.64] at org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFil terChain.java:162) ~[catalina.jar:9.0.64] at org.apache.catalina.core.StandardWrapperValve.invoke(StandardWrapperVal ve.java:197) ~[catalina.jar:9.0.64] at org.apache.catalina.core.StandardContextValve.invoke(StandardContextVal ve.java:97) ~[catalina.jar:9.0.64] at org.apache.catalina.authenticator.AuthenticatorBase.invoke(Authenticato rBase.java:541) ~[catalina.jar:9.0.64] at org.apache.catalina.core.StandardHostValve.invoke(StandardHostValve.jav a:135) ~[catalina.jar:9.0.64] at org.apache.catalina.valves.ErrorReportValve.invoke(ErrorReportValve.jav a:92) ~[catalina.jar:9.0.64] at org.apache.catalina.valves.AbstractAccessLogValve.invoke(AbstractAccess LogValve.java:687) ~[catalina.jar:9.0.64] at org.apache.catalina.core.StandardEngineValve.invoke(StandardEngineValve .java:78) ~[catalina.jar:9.0.64] at org.apache.catalina.connector.CoyoteAdapter.service(CoyoteAdapter.java: 360) ~[catalina.jar:9.0.64] at org.apache.coyote.http11.Http11Processor.service(Http11Processor.java:3 99) ~[tomcat-coyote.jar:9.0.64] at org.apache.coyote.AbstractProcessorLight.process(AbstractProcessorLight .java:65) ~[tomcat-coyote.jar:9.0.64] at org.apache.coyote.AbstractProtocol$ConnectionHandler.process(AbstractPr otocol.java:890) ~[tomcat-coyote.jar:9.0.64] at org.apache.tomcat.util.net.NioEndpoint$SocketProcessor.doRun(NioEndpoin t.java:1787) ~[tomcat-coyote.jar:9.0.64] at org.apache.tomcat.util.net.SocketProcessorBase.run(SocketProcessorBase. java:49) ~[tomcat-coyote.jar:9.0.64] at org.apache.tomcat.util.threads.ThreadPoolExecutor.runWorker(ThreadPoolE xecutor.java:1191) ~[tomcat-util.jar:9.0.64] at org.apache.tomcat.util.threads.ThreadPoolExecutor$Worker.run(ThreadPool Executor.java:659) ~[tomcat-util.jar:9.0.64] at org.apache.tomcat.util.threads.TaskThread$WrappingRunnable.run(TaskThre ad.java:61) ~[tomcat-util.jar:9.0.64] at java.lang.Thread.run(Thread.java:829) ~[?:?]