Uploaded image for project: 'Tapestry 5'
  1. Tapestry 5
  2. TAP5-2590

Tapestry and Apache Ignite

    XMLWordPrintableJSON

    Details

    • Type: Bug
    • Status: Open
    • Priority: Minor
    • Resolution: Unresolved
    • Affects Version/s: 5.4.3
    • Fix Version/s: None
    • Component/s: tapestry-core
    • Labels:
      None

      Description

      I have a simple page with a form.
      When user submits the form I'm adding entry to data base and displaying a message.

      This works, but when I add Apache Ignite call:

      	private IgniteMessaging msgs;
      
      	public <T> void fire(String topic, T msg) {
      		msgs.send(topic, msg);
      	}
      

      Then I'm getting and exception:

      2017-11-04 20:02:20,177 () [ERROR] org.apache.tapestry5.ioc.Registry | Error persisting field Payment:result: Unable to delegate method invocation to property 'request' of <Proxy for RequestGlobals(org.apache.tapestry5.services.RequestGlobals)>, because the property is null.
      2017-11-04 20:02:20,177 () [ERROR] org.apache.tapestry5.ioc.Registry | Operations trace:
      2017-11-04 20:02:20,177 () [ERROR] org.apache.tapestry5.ioc.Registry | [ 1] Handling traditional 'action' component event request for Payment:paymentform.
      2017-11-04 20:02:20,177 () [ERROR] org.apache.tapestry5.ioc.Registry | [ 2] Triggering event 'action' on Payment:paymentform
      2017-11-04 20:02:20,177 () [ERROR] org.apache.tapestry5.ioc.Registry | [ 3] Triggering event 'success' on Payment:paymentform
      2017-11-04 20:02:20,181 () [ERROR] org.apache.tapestry5.modules.TapestryModule.RequestExceptionHandler | Processing of request failed with uncaught exception: org.apache.tapestry5.runtime.ComponentEventException [at classpath:pl/onefrog/server/web/pages/Payment.tml, line 20]
      org.apache.tapestry5.runtime.ComponentEventException [at classpath:pl/onefrog/server/web/pages/Payment.tml, line 20]
      	at org.apache.tapestry5.internal.structure.ComponentPageElementImpl.processEventTriggering(ComponentPageElementImpl.java:1126)
      	at org.apache.tapestry5.internal.structure.ComponentPageElementImpl.access$3100(ComponentPageElementImpl.java:57)
      	at org.apache.tapestry5.internal.structure.ComponentPageElementImpl$5.invoke(ComponentPageElementImpl.java:1047)
      	at org.apache.tapestry5.internal.structure.ComponentPageElementImpl$5.invoke(ComponentPageElementImpl.java:1044)
      	at org.apache.tapestry5.ioc.internal.OperationTrackerImpl.invoke(OperationTrackerImpl.java:82)
      	at org.apache.tapestry5.ioc.internal.PerThreadOperationTracker.invoke(PerThreadOperationTracker.java:72)
      	at org.apache.tapestry5.ioc.internal.RegistryImpl.invoke(RegistryImpl.java:1260)
      	at org.apache.tapestry5.internal.structure.ComponentPageElementResourcesImpl.invoke(ComponentPageElementResourcesImpl.java:154)
      	at org.apache.tapestry5.internal.structure.ComponentPageElementImpl.triggerContextEvent(ComponentPageElementImpl.java:1043)
      	at org.apache.tapestry5.internal.services.ComponentEventRequestHandlerImpl.handle(ComponentEventRequestHandlerImpl.java:73)
      	at org.apache.tapestry5.internal.services.AjaxFilter.handle(AjaxFilter.java:42)
      	at $ComponentEventRequestHandler_17b008c39326.handle(Unknown Source)
      	at org.apache.tapestry5.modules.TapestryModule$37.handle(TapestryModule.java:2216)
      	at $ComponentEventRequestHandler_17b008c39326.handle(Unknown Source)
      	at $ComponentEventRequestHandler_17b008c392a7.handle(Unknown Source)
      	at org.apache.tapestry5.internal.services.ComponentRequestHandlerTerminator.handleComponentEvent(ComponentRequestHandlerTerminator.java:43)
      	at org.apache.tapestry5.internal.services.DeferredResponseRenderer.handleComponentEvent(DeferredResponseRenderer.java:45)
      	at $ComponentRequestHandler_17b008c392a9.handleComponentEvent(Unknown Source)
      	at org.apache.tapestry5.services.InitializeActivePageName.handleComponentEvent(InitializeActivePageName.java:39)
      	at $ComponentRequestHandler_17b008c392a9.handleComponentEvent(Unknown Source)
      	at org.apache.tapestry5.internal.services.ProductionModeUnknownComponentFilter.handleComponentEvent(ProductionModeUnknownComponentFilter.java:50)
      	at $ComponentRequestHandler_17b008c392a9.handleComponentEvent(Unknown Source)
      	at org.apache.tapestry5.internal.services.RequestOperationTracker$1.perform(RequestOperationTracker.java:55)
      	at org.apache.tapestry5.internal.services.RequestOperationTracker$1.perform(RequestOperationTracker.java:52)
      	at org.apache.tapestry5.ioc.internal.OperationTrackerImpl.perform(OperationTrackerImpl.java:110)
      	at org.apache.tapestry5.ioc.internal.PerThreadOperationTracker.perform(PerThreadOperationTracker.java:84)
      	at org.apache.tapestry5.ioc.internal.RegistryImpl.perform(RegistryImpl.java:1266)
      	at org.apache.tapestry5.internal.services.RequestOperationTracker.handleComponentEvent(RequestOperationTracker.java:47)
      	at $ComponentRequestHandler_17b008c392a9.handleComponentEvent(Unknown Source)
      	at $ComponentRequestHandler_17b008c3927c.handleComponentEvent(Unknown Source)
      	at org.apache.tapestry5.internal.services.ComponentEventDispatcher.dispatch(ComponentEventDispatcher.java:48)
      	at $Dispatcher_17b008c3927e.dispatch(Unknown Source)
      	at $Dispatcher_17b008c39273.dispatch(Unknown Source)
      	at org.apache.tapestry5.modules.TapestryModule$RequestHandlerTerminator.service(TapestryModule.java:305)
      	at org.apache.tapestry5.internal.services.RequestErrorFilter.service(RequestErrorFilter.java:26)
      	at $RequestHandler_17b008c39274.service(Unknown Source)
      	at org.apache.tapestry5.modules.TapestryModule$3.service(TapestryModule.java:846)
      	at $RequestHandler_17b008c39274.service(Unknown Source)
      	at org.apache.tapestry5.modules.TapestryModule$2.service(TapestryModule.java:836)
      	at $RequestHandler_17b008c39274.service(Unknown Source)
      	at org.apache.tapestry5.internal.services.StaticFilesFilter.service(StaticFilesFilter.java:89)
      	at $RequestHandler_17b008c39274.service(Unknown Source)
      	at $RequestHandler_17b008c3926a.service(Unknown Source)
      	at org.apache.tapestry5.modules.TapestryModule$HttpServletRequestHandlerTerminator.service(TapestryModule.java:256)
      	at pl.onefrog.server.web.services.CacheControlRequestFilter.service(CacheControlRequestFilter.java:32)
      	at $HttpServletRequestFilter_17b008c39269.service(Unknown Source)
      	at $HttpServletRequestHandler_17b008c3926c.service(Unknown Source)
      	at org.apache.tapestry5.internal.gzip.GZipFilter.service(GZipFilter.java:59)
      	at $HttpServletRequestHandler_17b008c3926c.service(Unknown Source)
      	at org.apache.tapestry5.internal.services.IgnoredPathsFilter.service(IgnoredPathsFilter.java:62)
      	at $HttpServletRequestFilter_17b008c39266.service(Unknown Source)
      	at $HttpServletRequestHandler_17b008c3926c.service(Unknown Source)
      	at org.apache.tapestry5.modules.TapestryModule$1.service(TapestryModule.java:796)
      	at $HttpServletRequestHandler_17b008c3926c.service(Unknown Source)
      	at $HttpServletRequestHandler_17b008c39265.service(Unknown Source)
      	at org.apache.tapestry5.TapestryFilter.doFilter(TapestryFilter.java:166)
      	at org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:193)
      	at org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:166)
      	at org.apache.catalina.core.StandardWrapperValve.invoke(StandardWrapperValve.java:199)
      	at org.apache.catalina.core.StandardContextValve.invoke(StandardContextValve.java:96)
      	at org.apache.catalina.authenticator.AuthenticatorBase.invoke(AuthenticatorBase.java:478)
      	at org.apache.catalina.core.StandardHostValve.invoke(StandardHostValve.java:140)
      	at org.apache.catalina.valves.ErrorReportValve.invoke(ErrorReportValve.java:81)
      	at org.apache.catalina.core.StandardEngineValve.invoke(StandardEngineValve.java:87)
      	at org.apache.catalina.connector.CoyoteAdapter.service(CoyoteAdapter.java:342)
      	at org.apache.coyote.http11.Http11Processor.service(Http11Processor.java:803)
      	at org.apache.coyote.AbstractProcessorLight.process(AbstractProcessorLight.java:66)
      	at org.apache.coyote.AbstractProtocol$ConnectionHandler.process(AbstractProtocol.java:868)
      	at org.apache.tomcat.util.net.NioEndpoint$SocketProcessor.doRun(NioEndpoint.java:1459)
      	at org.apache.tomcat.util.net.SocketProcessorBase.run(SocketProcessorBase.java:49)
      	at java.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1142)
      	at java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:617)
      	at org.apache.tomcat.util.threads.TaskThread$WrappingRunnable.run(TaskThread.java:61)
      	at java.lang.Thread.run(Thread.java:748)
      Caused by: java.util.NoSuchElementException
      	at java.util.LinkedList.removeFirst(LinkedList.java:270)
      	at org.apache.tapestry5.internal.services.EnvironmentImpl.pop(EnvironmentImpl.java:106)
      	at $Environment_17b008c392da.pop(Unknown Source)
      	at $Environment_17b008c3924a.pop(Unknown Source)
      	at org.apache.tapestry5.corelib.components.Form.onAction(Form.java:584)
      	at org.apache.tapestry5.corelib.components.Form.dispatchComponentEvent(Form.java)
      	at org.apache.tapestry5.internal.structure.ComponentPageElementImpl.dispatchEvent(ComponentPageElementImpl.java:917)
      	at org.apache.tapestry5.internal.structure.ComponentPageElementImpl.processEventTriggering(ComponentPageElementImpl.java:1102)
      	... 73 more
      2017-11-04 20:02:20,199 () [ WARN] org.apache.tapestry5.modules.TapestryModule.ExceptionReporter | Wrote exception report to file:/home/rysiek/workspace/src/onefrog/onefrog-server/build/exceptions/2017-11-04/20/02/exception-20171104-200220-187.0.txt
      2017-11-04 20:02:20,200 () [ WARN] org.apache.catalina.core.ContainerBase.[Tomcat].[localhost].[tapestry-paigo].[default] | Servlet.service() for servlet [default] in context with path [tapestry-paigo] threw exception
      java.lang.NullPointerException: Unable to delegate method invocation to property 'response' of <Proxy for RequestGlobals(org.apache.tapestry5.services.RequestGlobals)>, because the property is null.
      	at $Response_17b008c392d2.readProperty(Unknown Source)
      	at $Response_17b008c392d2.setStatus(Unknown Source)
      	at $Response_17b008c3924e.setStatus(Unknown Source)
      	at org.apache.tapestry5.internal.services.DefaultRequestExceptionHandler.renderException(DefaultRequestExceptionHandler.java:244)
      	at org.apache.tapestry5.internal.services.DefaultRequestExceptionHandler.handleRequestException(DefaultRequestExceptionHandler.java:145)
      	at $RequestExceptionHandler_17b008c39272.handleRequestException(Unknown Source)
      	at org.apache.tapestry5.internal.services.RequestErrorFilter.service(RequestErrorFilter.java:42)
      	at $RequestHandler_17b008c39274.service(Unknown Source)
      	at org.apache.tapestry5.modules.TapestryModule$3.service(TapestryModule.java:846)
      	at $RequestHandler_17b008c39274.service(Unknown Source)
      	at org.apache.tapestry5.modules.TapestryModule$2.service(TapestryModule.java:836)
      	at $RequestHandler_17b008c39274.service(Unknown Source)
      	at org.apache.tapestry5.internal.services.StaticFilesFilter.service(StaticFilesFilter.java:89)
      	at $RequestHandler_17b008c39274.service(Unknown Source)
      	at $RequestHandler_17b008c3926a.service(Unknown Source)
      	at org.apache.tapestry5.modules.TapestryModule$HttpServletRequestHandlerTerminator.service(TapestryModule.java:256)
      	at pl.onefrog.server.web.services.CacheControlRequestFilter.service(CacheControlRequestFilter.java:32)
      	at $HttpServletRequestFilter_17b008c39269.service(Unknown Source)
      	at $HttpServletRequestHandler_17b008c3926c.service(Unknown Source)
      	at org.apache.tapestry5.internal.gzip.GZipFilter.service(GZipFilter.java:59)
      	at $HttpServletRequestHandler_17b008c3926c.service(Unknown Source)
      	at org.apache.tapestry5.internal.services.IgnoredPathsFilter.service(IgnoredPathsFilter.java:62)
      	at $HttpServletRequestFilter_17b008c39266.service(Unknown Source)
      	at $HttpServletRequestHandler_17b008c3926c.service(Unknown Source)
      	at org.apache.tapestry5.modules.TapestryModule$1.service(TapestryModule.java:796)
      	at $HttpServletRequestHandler_17b008c3926c.service(Unknown Source)
      	at $HttpServletRequestHandler_17b008c39265.service(Unknown Source)
      	at org.apache.tapestry5.TapestryFilter.doFilter(TapestryFilter.java:166)
      	at org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:193)
      	at org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:166)
      	at org.apache.catalina.core.StandardWrapperValve.invoke(StandardWrapperValve.java:199)
      	at org.apache.catalina.core.StandardContextValve.invoke(StandardContextValve.java:96)
      	at org.apache.catalina.authenticator.AuthenticatorBase.invoke(AuthenticatorBase.java:478)
      	at org.apache.catalina.core.StandardHostValve.invoke(StandardHostValve.java:140)
      	at org.apache.catalina.valves.ErrorReportValve.invoke(ErrorReportValve.java:81)
      	at org.apache.catalina.core.StandardEngineValve.invoke(StandardEngineValve.java:87)
      	at org.apache.catalina.connector.CoyoteAdapter.service(CoyoteAdapter.java:342)
      	at org.apache.coyote.http11.Http11Processor.service(Http11Processor.java:803)
      	at org.apache.coyote.AbstractProcessorLight.process(AbstractProcessorLight.java:66)
      	at org.apache.coyote.AbstractProtocol$ConnectionHandler.process(AbstractProtocol.java:868)
      	at org.apache.tomcat.util.net.NioEndpoint$SocketProcessor.doRun(NioEndpoint.java:1459)
      	at org.apache.tomcat.util.net.SocketProcessorBase.run(SocketProcessorBase.java:49)
      	at java.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1142)
      	at java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:617)
      	at org.apache.tomcat.util.threads.TaskThread$WrappingRunnable.run(TaskThread.java:61)
      	at java.lang.Thread.run(Thread.java:748)
      

      I'm not sure if it is Tapestry bug or Apache Ignite bug or maybe Apache Tomcat , but adding this line breaks my page.

      My workaround for this is to run msgs.send(topic, msg) in ExecutorService:

      	private IgniteMessaging msgs;
      	private ExecutorService tp;
      
      	public <T> void fire(String topic, T msg) {
      		tp.submit(() ->msgs.send(topic, msg));
      	}
      

        Attachments

          Activity

            People

            • Assignee:
              Unassigned
              Reporter:
              ryszard.trojnacki Ryszard Trojnacki
            • Votes:
              0 Vote for this issue
              Watchers:
              1 Start watching this issue

              Dates

              • Created:
                Updated: