Tapestry
  1. Tapestry
  2. TAPESTRY-1936

Non-null return value from form action event causes exception

    Details

    • Type: Bug Bug
    • Status: Closed
    • Priority: Blocker Blocker
    • Resolution: Fixed
    • Affects Version/s: 5.0.7
    • Fix Version/s: 5.0.7
    • Component/s: None
    • Labels:
      None
    • Environment:
      Tapestry snapshot 5.0.7 build 41 and up.

      Description

      I'm seeing weird exceptions when returning non-null values from form action events. It happens consistently - I have tested various return types including String, Class, Link and Component - they all result in an exception like the one in the stack trace below.

      Going back to build 40 of 5.0.7-SNAPSHOT this doesn't happen, so it must have something to do with a recent change in the codebase.

      [ERROR] RequestExceptionHandler Processing of request failed with uncaught exception: An event handler for component news/List:layout.loginform returned the value true (from method org.apache.tapestry.corelib.components.Form.onAction(java.lang.Object[]) (at Form.java:277)). Return type java.lang.Boolean can not be handled. Configured return types are java.lang.Class, java.lang.String, org.apache.tapestry.Link, org.apache.tapestry.StreamResponse, org.apache.tapestry.runtime.Component.org.apache.tapestry.runtime.ComponentEventException: An event handler for component news/List:layout.loginform returned the value true (from method org.apache.tapestry.corelib.components.Form.onAction(java.lang.Object[]) (at Form.java:277)). Return type java.lang.Boolean can not be handled. Configured return types are java.lang.Class, java.lang.String, org.apache.tapestry.Link, org.apache.tapestry.StreamResponse, org.apache.tapestry.runtime.Component.
      at org.apache.tapestry.corelib.components.Form.handleComponentEvent(Form.java)
      at org.apache.tapestry.internal.structure.ComponentPageElementImpl.handleEvent(ComponentPageElementImpl.java:863)
      at org.apache.tapestry.internal.structure.ComponentPageElementImpl.triggerEvent(ComponentPageElementImpl.java:968)
      at org.apache.tapestry.internal.services.ComponentActionRequestHandlerImpl.handle(ComponentActionRequestHandlerImpl.java:88)
      at org.apache.tapestry.internal.services.AjaxFilter.handle(AjaxFilter.java:47)
      at $ComponentActionRequestHandler_116832b270c.handle($ComponentActionRequestHandler_116832b270c.java)
      at org.apache.tapestry.services.TapestryModule$30.handle(TapestryModule.java:1892)
      at $ComponentActionRequestHandler_116832b270c.handle($ComponentActionRequestHandler_116832b270c.java)
      at $ComponentActionRequestHandler_116832b2686.handle($ComponentActionRequestHandler_116832b2686.java)
      at org.apache.tapestry.internal.services.ComponentActionDispatcher.dispatch(ComponentActionDispatcher.java:113)
      at $Dispatcher_116832b2687.dispatch($Dispatcher_116832b2687.java)
      at $Dispatcher_116832b267b.dispatch($Dispatcher_116832b267b.java)
      at org.apache.tapestry.services.TapestryModule$12.service(TapestryModule.java:932)
      at org.apache.tapestry.internal.services.LocalizationFilter.service(LocalizationFilter.java:43)
      at $RequestHandler_116832b267c.service($RequestHandler_116832b267c.java)
      at org.apache.tapestry.services.TapestryModule$2.service(TapestryModule.java:521)
      at $RequestHandler_116832b267c.service($RequestHandler_116832b267c.java)
      at org.apache.tapestry.internal.services.StaticFilesFilter.service(StaticFilesFilter.java:79)
      at $RequestHandler_116832b267c.service($RequestHandler_116832b267c.java)
      at com.fsadev.tapestry.utilities.services.LibModule$1.service(LibModule.java:22)
      at $RequestHandler_116832b267c.service($RequestHandler_116832b267c.java)
      at org.apache.tapestry.internal.services.CheckForUpdatesFilter$2.invoke(CheckForUpdatesFilter.java:94)
      at org.apache.tapestry.internal.services.CheckForUpdatesFilter$2.invoke(CheckForUpdatesFilter.java:85)
      at org.apache.tapestry.ioc.internal.util.ConcurrentBarrier.withRead(ConcurrentBarrier.java:77)
      at org.apache.tapestry.internal.services.CheckForUpdatesFilter.service(CheckForUpdatesFilter.java:107)
      at $RequestHandler_116832b267c.service($RequestHandler_116832b267c.java)
      at $RequestHandler_116832b2675.service($RequestHandler_116832b2675.java)
      at org.apache.tapestry.services.TapestryModule$11.service(TapestryModule.java:915)
      at $HttpServletRequestHandler_116832b2674.service($HttpServletRequestHandler_116832b2674.java)
      at org.apache.tapestry.TapestryFilter.doFilter(TapestryFilter.java:164)
      at org.mortbay.jetty.servlet.ServletHandler$CachedChain.doFilter(ServletHandler.java:1084)
      at org.mortbay.jetty.servlet.ServletHandler.handle(ServletHandler.java:360)
      at org.mortbay.jetty.security.SecurityHandler.handle(SecurityHandler.java:216)
      at org.mortbay.jetty.servlet.SessionHandler.handle(SessionHandler.java:181)
      at org.mortbay.jetty.handler.ContextHandler.handle(ContextHandler.java:712)
      at org.mortbay.jetty.webapp.WebAppContext.handle(WebAppContext.java:405)
      at org.mortbay.jetty.handler.ContextHandlerCollection.handle(ContextHandlerCollection.java:211)
      at org.mortbay.jetty.handler.HandlerCollection.handle(HandlerCollection.java:114)
      at org.mortbay.jetty.handler.HandlerWrapper.handle(HandlerWrapper.java:139)
      at org.mortbay.jetty.Server.handle(Server.java:313)
      at org.mortbay.jetty.HttpConnection.handleRequest(HttpConnection.java:506)
      at org.mortbay.jetty.HttpConnection$RequestHandler.content(HttpConnection.java:844)
      at org.mortbay.jetty.HttpParser.parseNext(HttpParser.java:644)
      at org.mortbay.jetty.HttpParser.parseAvailable(HttpParser.java:211)
      at org.mortbay.jetty.HttpConnection.handle(HttpConnection.java:381)
      at org.mortbay.io.nio.SelectChannelEndPoint.run(SelectChannelEndPoint.java:396)
      at org.mortbay.thread.BoundedThreadPool$PoolThread.run(BoundedThreadPool.java:442)
      Caused by: org.apache.tapestry.ioc.internal.util.TapestryException: An event handler for component news/List:layout.loginform returned the value true (from method org.apache.tapestry.corelib.components.Form.onAction(java.lang.Object[]) (at Form.java:277)). Return type java.lang.Boolean can not be handled. Configured return types are java.lang.Class, java.lang.String, org.apache.tapestry.Link, org.apache.tapestry.StreamResponse, org.apache.tapestry.runtime.Component.
      at org.apache.tapestry.internal.services.ObjectComponentEventResultProcessor.processComponentEvent(ObjectComponentEventResultProcessor.java:41
      )
      at $ComponentEventResultProcessor_116832b2768.processComponentEvent($ComponentEventResultProcessor_116832b2768.java)
      at $ComponentEventResultProcessor_116832b2656.processComponentEvent($ComponentEventResultProcessor_116832b2656.java)
      at org.apache.tapestry.internal.services.ComponentActionRequestHandlerImpl$1.handleResult(ComponentActionRequestHandlerImpl.java:68)
      at org.apache.tapestry.internal.services.EventImpl.storeResult(EventImpl.java:62)
      ... 47 more

        Activity

        Mark Thomas made changes -
        Workflow Default workflow, editable Closed status [ 12568391 ] jira [ 12591448 ]
        Mark Thomas made changes -
        Workflow jira [ 12418012 ] Default workflow, editable Closed status [ 12568391 ]
        Howard M. Lewis Ship made changes -
        Status In Progress [ 3 ] Closed [ 6 ]
        Fix Version/s 5.0.7 [ 12312802 ]
        Resolution Fixed [ 1 ]
        Hide
        Filip S. Adamsen added a comment -

        I see. I was seeing this no matter what my methods returned, but of course that does not have any influence on what Tapestry is returning in other places.

        Show
        Filip S. Adamsen added a comment - I see. I was seeing this no matter what my methods returned, but of course that does not have any influence on what Tapestry is returning in other places.
        Hide
        Howard M. Lewis Ship added a comment -

        This is not any return value, it is specific to booleans, which need a touch of special handling.

        Show
        Howard M. Lewis Ship added a comment - This is not any return value, it is specific to booleans, which need a touch of special handling.
        Howard M. Lewis Ship made changes -
        Status Open [ 1 ] In Progress [ 3 ]
        Howard M. Lewis Ship made changes -
        Field Original Value New Value
        Assignee Howard M. Lewis Ship [ hlship ]
        Filip S. Adamsen created issue -

          People

          • Assignee:
            Howard M. Lewis Ship
            Reporter:
            Filip S. Adamsen
          • Votes:
            0 Vote for this issue
            Watchers:
            1 Start watching this issue

            Dates

            • Created:
              Updated:
              Resolved:

              Development