Non-null return value from form action event causes exception
-------------------------------------------------------------

                 Key: TAPESTRY-1936
                 URL: https://issues.apache.org/jira/browse/TAPESTRY-1936
             Project: Tapestry
          Issue Type: Bug
    Affects Versions: 5.0.7
         Environment: Tapestry snapshot 5.0.7 build 41 and up.
            Reporter: Filip S. Adamsen
            Priority: Blocker


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

-- 
This message is automatically generated by JIRA.
-
You can reply to this email to add a comment to the issue online.


---------------------------------------------------------------------
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]

Reply via email to