Uploaded image for project: 'Tapestry'
  1. Tapestry
  2. TAPESTRY-2157

ClassCastException in ExpressionBinding.setObject

    Details

    • Type: Bug
    • Status: Open
    • Priority: Critical
    • Resolution: Unresolved
    • Affects Version/s: 4.1.5
    • Fix Version/s: None
    • Component/s: Framework
    • Labels:
      None
    • Environment:
      Win XP, Tomcat 5.5

      Description

      I've been using this page structure for quite some time and it seems after upgrading to 4.1.5 from 4.1.1 something has regressed. It appears my BorderTab component is caching the page or page class when it shouldn't? essentially, i have a border component which wraps the bodyContent in a generic Form component. Inside this form (yet still inside the Border) i have some BorderTab components, each with a LinkSubmit component. Clicking these links navigates through the tabs, submitting their forms (empty in the example).

      Please run the attached example war file, it includes everything.

      1. click tab 1, tab 2, tab 3 etc - eventually the ClassCastException will be shown.

      note: clicking tab 1 recursively without clicking the other tabs does not cause the exception

      Exception message:
      Unable to update OGNL expression '<parsed OGNL expression>' of $ApplicationComponent_8@202687d[Page2/$Border.$BorderTab_1] to Page3: $Page2_15 cannot be cast to $Page1_14

      stack trace:
      $ASTChain_118168cf864.set($ASTChain_118168cf864.java)
      org.apache.tapestry.services.impl.ExpressionEvaluatorImpl.write(ExpressionEvaluatorImpl.java:179)
      $ExpressionEvaluator_118168cf818.write($ExpressionEvaluator_118168cf818.java)
      org.apache.tapestry.binding.ExpressionBinding.setObject(ExpressionBinding.java:224)
      $LinkSubmit_9.setSelected($LinkSubmit_9.java)
      org.apache.tapestry.form.AbstractSubmit.handleClick(AbstractSubmit.java:69)
      org.apache.tapestry.form.AbstractSubmit.rewindFormComponent(AbstractSubmit.java:63)
      org.apache.tapestry.form.AbstractFormComponent.renderComponent(AbstractFormComponent.java:90)
      org.apache.tapestry.AbstractComponent.render(AbstractComponent.java:724)
      org.apache.tapestry.services.impl.DefaultResponseBuilder.render(DefaultResponseBuilder.java:187)
      org.apache.tapestry.AbstractComponent.renderBody(AbstractComponent.java:538)
      org.apache.tapestry.components.ElseBean.renderComponent(ElseBean.java:47)
      org.apache.tapestry.AbstractComponent.render(AbstractComponent.java:724)
      org.apache.tapestry.services.impl.DefaultResponseBuilder.render(DefaultResponseBuilder.java:187)
      org.apache.tapestry.BaseComponent.renderComponent(BaseComponent.java:107)
      org.apache.tapestry.AbstractComponent.render(AbstractComponent.java:724)
      org.apache.tapestry.services.impl.DefaultResponseBuilder.render(DefaultResponseBuilder.java:187)
      org.apache.tapestry.AbstractComponent.renderBody(AbstractComponent.java:538)
      org.apache.tapestry.components.IfBean.renderComponent(IfBean.java:94)
      org.apache.tapestry.AbstractComponent.render(AbstractComponent.java:724)
      org.apache.tapestry.services.impl.DefaultResponseBuilder.render(DefaultResponseBuilder.java:187)
      org.apache.tapestry.AbstractComponent.renderBody(AbstractComponent.java:538)
      org.apache.tapestry.form.FormSupportImpl.rewind(FormSupportImpl.java:624)
      org.apache.tapestry.form.Form.renderComponent(Form.java:196)
      org.apache.tapestry.AbstractComponent.render(AbstractComponent.java:724)
      org.apache.tapestry.services.impl.DefaultResponseBuilder.render(DefaultResponseBuilder.java:187)
      org.apache.tapestry.form.Form.rewind(Form.java:269)
      org.apache.tapestry.engine.RequestCycle.rewindForm(RequestCycle.java:469)
      org.apache.tapestry.form.Form.trigger(Form.java:280)
      org.apache.tapestry.engine.DirectService.triggerComponent(DirectService.java:166)
      org.apache.tapestry.engine.DirectService.service(DirectService.java:142)
      $IEngineService_118168cf76b.service($IEngineService_118168cf76b.java)
      org.apache.tapestry.services.impl.EngineServiceOuterProxy.service(EngineServiceOuterProxy.java:72)
      org.apache.tapestry.engine.AbstractEngine.service(AbstractEngine.java:241)
      org.apache.tapestry.services.impl.InvokeEngineTerminator.service(InvokeEngineTerminator.java:54)
      $WebRequestServicer_118168cf742.service($WebRequestServicer_118168cf742.java)
      $WebRequestServicer_118168cf73e.service($WebRequestServicer_118168cf73e.java)
      org.apache.tapestry.services.impl.WebRequestServicerPipelineBridge.service(WebRequestServicerPipelineBridge.java:61)
      $ServletRequestServicer_118168cf724.service($ServletRequestServicer_118168cf724.java)
      org.apache.tapestry.request.DecodedRequestInjector.service(DecodedRequestInjector.java:55)
      $ServletRequestServicerFilter_118168cf720.service($ServletRequestServicerFilter_118168cf720.java)
      $ServletRequestServicer_118168cf726.service($ServletRequestServicer_118168cf726.java)
      org.apache.tapestry.multipart.MultipartDecoderFilter.service(MultipartDecoderFilter.java:52)
      $ServletRequestServicerFilter_118168cf71e.service($ServletRequestServicerFilter_118168cf71e.java)
      $ServletRequestServicer_118168cf726.service($ServletRequestServicer_118168cf726.java)
      org.apache.tapestry.services.impl.SetupRequestEncoding.service(SetupRequestEncoding.java:53)
      $ServletRequestServicerFilter_118168cf722.service($ServletRequestServicerFilter_118168cf722.java)
      $ServletRequestServicer_118168cf726.service($ServletRequestServicer_118168cf726.java)
      $ServletRequestServicer_118168cf718.service($ServletRequestServicer_118168cf718.java)
      org.apache.tapestry.ApplicationServlet.doService(ApplicationServlet.java:126)
      org.apache.tapestry.ApplicationServlet.doPost(ApplicationServlet.java:171)
      javax.servlet.http.HttpServlet.service(HttpServlet.java:710)

        Attachments

        1. Problem.war
          6.50 MB
          Paul Stanton

          Activity

            People

            • Assignee:
              jkuhnert Jesse Kuhnert
              Reporter:
              paul.stanton Paul Stanton
            • Votes:
              0 Vote for this issue
              Watchers:
              0 Start watching this issue

              Dates

              • Created:
                Updated: