Tapestry
  1. Tapestry
  2. TAPESTRY-441

Poor reporting of duplicate method implementations

    Details

    • Type: Bug Bug
    • Status: Closed
    • Priority: Major Major
    • Resolution: Fixed
    • Affects Version/s: 4.0
    • Fix Version/s: 4.0
    • Component/s: Framework
    • Labels:
      None
    • Environment:
      jboss-4.0.2 with tomcat 5.5.9 on linux

      Description

      On a (abstract) Page that implements an interface it is impossible to inject a property that
      is defined by an interface.

      This behaviour is a bug because 'Attempt to redefine method de.atron.b2xsale.web.util.IPageBean getPageBean() '
      is not really true as IPageBean is an interface and the redefined method is (still) abstract
      in my Caculate Page.

      The expected behaviour is to allow the 'redefinition' of the method without any warning.

      Details:

      This page definition (still 3.0 style but this is a bug against 4.0-beta2; it has work with 3.0.3):

      <?xml version="1.0" encoding="UTF-8"?>

      <page-specification class="de.atron.b2xsale.web.Calculate">
      <description>Calculate</description>
      <property-specification name="PageBean" type="de.atron.b2xsale.web.util.IPageBean"
      persistent="yes" initial-value="new de.atron.b2xsale.web.beans.CalculateBean()"/>
      ...
      </page-specification>

      leeds to the following Error:

      Error at classpath:/WEB-INF/Calculate.page, line 7, column 60: Error adding property pageBean to class de.atron.b2xsale.web.Calculate: Attempt to redefine method de.atron.b2xsale.web.util.IPageBean getPageBean() of class $Calculate_25.
      location:
      classpath:/WEB-INF/Calculate.page, line 7, column 60
      2
      5 <!-- generated by Spindle, http://spindle.sourceforge.net -->
      6
      7 <page-specification class="de.atron.b2xsale.web.Calculate">
      8
      9 <description>Calculate</description>
      10
      11 <property-specification name="PageBean" type="de.atron.b2xsale.web.util.IPageBean"
      12 persistent="yes" initial-value="new de.atron.b2xsale.web.beans.CalculateBean()"/>
      org.apache.hivemind.ApplicationRuntimeException
      Attempt to redefine method de.atron.b2xsale.web.util.IPageBean getPageBean() of class $Calculate_25.
      Stack Trace:
      org.apache.hivemind.service.impl.ClassFabImpl.addMethod(ClassFabImpl.java:276)
      org.apache.tapestry.enhance.EnhancementOperationImpl.addMethod(EnhancementOperationImpl.java:337)
      org.apache.tapestry.enhance.EnhanceUtils.createSimpleAccessor(EnhanceUtils.java:71)
      org.apache.tapestry.enhance.AbstractPropertyWorker.createProperty(AbstractPropertyWorker.java:69)
      org.apache.tapestry.enhance.AbstractPropertyWorker.performEnhancement(AbstractPropertyWorker.java:45)
      $EnhancementWorker_10551fa4f1f.performEnhancement($EnhancementWorker_10551fa4f1f.java)
      $EnhancementWorker_10551fa4f21.performEnhancement($EnhancementWorker_10551fa4f21.java)
      $EnhancementWorker_10551fa4f03.performEnhancement($EnhancementWorker_10551fa4f03.java)
      org.apache.tapestry.services.impl.ComponentConstructorFactoryImpl.getComponentConstructor(ComponentConstructorFactoryImpl.java:76)
      $ComponentConstructorFactory_10551fa4eec.getComponentConstructor($ComponentConstructorFactory_10551fa4eec.java)
      org.apache.tapestry.pageload.PageLoader.instantiatePage(PageLoader.java:611)
      org.apache.tapestry.pageload.PageLoader.loadPage(PageLoader.java:639)
      $IPageLoader_10551fa4ee8.loadPage($IPageLoader_10551fa4ee8.java)
      $IPageLoader_10551fa4ee9.loadPage($IPageLoader_10551fa4ee9.java)
      org.apache.tapestry.pageload.PageSource.getPage(PageSource.java:118)
      $IPageSource_10551fa4e58.getPage($IPageSource_10551fa4e58.java)
      org.apache.tapestry.engine.RequestCycle.loadPage(RequestCycle.java:252)
      org.apache.tapestry.engine.RequestCycle.getPage(RequestCycle.java:235)
      de.atron.b2xsale.web.Border.formGotoCalculate(Border.java:98)

      on the Page Caculate

      public abstract class Calculate extends AHiddenStatePage

      { ... }

      with AHiddenStatePage with

      public abstract class AHiddenStatePage
      extends BasePage
      implements IHiddenStatePage, PageRenderListener { ... }

      with the interface IHiddenStagePage

      public interface IHiddenStatePage extends IPage {
      void setPageBean(IPageBean bean);
      IPageBean getPageBean();
      }

        Activity

        Hide
        Thomas Pasch added a comment -

        It even does not work for abstract classes.

        If I remove IHiddenStatePage and use an AHiddenStatePage like this:

        public abstract class AHiddenStatePage
        extends BasePage
        implements PageRenderListener

        { ... public abstract void setPageBean(IPageBean bean); public abstract IPageBean getPageBean(); }

        I get the following error:

        Error at classpath:/WEB-INF/Calculate.page, line 7, column 60: Error adding property pageBean to class de.atron.b2xsale.web.Calculate: Unable to add method de.atron.b2xsale.web.util.IPageBean getPageBean() to class $Calculate_8: duplicate method: getPageBean
        location:
        classpath:/WEB-INF/Calculate.page, line 7, column 60
        2 <!DOCTYPE page-specification
        3 PUBLIC "-//Apache Software Foundation//Tapestry Specification 4.0//EN"
        4 "http://jakarta.apache.org/tapestry/dtd/Tapestry_4_0.dtd">
        5 <!-- generated by Spindle, http://spindle.sourceforge.net -->
        6
        7 <page-specification class="de.atron.b2xsale.web.Calculate">
        8
        9 <description>Calculate</description>
        10
        11 <property name="PageBean"
        12 persist="session" initial-value="new de.atron.b2xsale.web.beans.CalculateBean()"/>
        org.apache.hivemind.ApplicationRuntimeException
        Unable to add method de.atron.b2xsale.web.util.IPageBean getPageBean() to class $Calculate_8: duplicate method: getPageBean
        javassist.CannotCompileException
        duplicate method: getPageBean
        Stack Trace:
        javassist.bytecode.ClassFile.testExistingMethod(ClassFile.java:488)
        javassist.bytecode.ClassFile.addMethod(ClassFile.java:472)
        javassist.CtClassType.addMethod(CtClassType.java:907)
        org.apache.hivemind.service.impl.ClassFabImpl.addMethod(ClassFabImpl.java:291)
        org.apache.tapestry.enhance.EnhancementOperationImpl.addMethod(EnhancementOperationImpl.java:337)
        org.apache.tapestry.enhance.EnhanceUtils.createSimpleAccessor(EnhanceUtils.java:71)
        org.apache.tapestry.enhance.AbstractPropertyWorker.createProperty(AbstractPropertyWorker.java:69)
        org.apache.tapestry.enhance.AbstractPropertyWorker.performEnhancement(AbstractPropertyWorker.java:45)
        $EnhancementWorker_1055241a53a.performEnhancement($EnhancementWorker_1055241a53a.java)
        $EnhancementWorker_1055241a53c.performEnhancement($EnhancementWorker_1055241a53c.java)
        $EnhancementWorker_1055241a51e.performEnhancement($EnhancementWorker_1055241a51e.java)
        org.apache.tapestry.services.impl.ComponentConstructorFactoryImpl.getComponentConstructor(ComponentConstructorFactoryImpl.java:76)
        $ComponentConstructorFactory_1055241a507.getComponentConstructor($ComponentConstructorFactory_1055241a507.java)
        org.apache.tapestry.pageload.PageLoader.instantiatePage(PageLoader.java:611)
        org.apache.tapestry.pageload.PageLoader.loadPage(PageLoader.java:639)
        $IPageLoader_1055241a503.loadPage($IPageLoader_1055241a503.java)
        $IPageLoader_1055241a504.loadPage($IPageLoader_1055241a504.java)
        org.apache.tapestry.pageload.PageSource.getPage(PageSource.java:118)
        $IPageSource_1055241a470.getPage($IPageSource_1055241a470.java)
        org.apache.tapestry.engine.RequestCycle.loadPage(RequestCycle.java:252)
        org.apache.tapestry.engine.RequestCycle.getPage(RequestCycle.java:235)
        de.atron.b2xsale.web.Border.formGotoCalculate(Border.java:98)

        Show
        Thomas Pasch added a comment - It even does not work for abstract classes. If I remove IHiddenStatePage and use an AHiddenStatePage like this: public abstract class AHiddenStatePage extends BasePage implements PageRenderListener { ... public abstract void setPageBean(IPageBean bean); public abstract IPageBean getPageBean(); } I get the following error: Error at classpath:/WEB-INF/Calculate.page, line 7, column 60: Error adding property pageBean to class de.atron.b2xsale.web.Calculate: Unable to add method de.atron.b2xsale.web.util.IPageBean getPageBean() to class $Calculate_8: duplicate method: getPageBean location: classpath:/WEB-INF/Calculate.page, line 7, column 60 2 <!DOCTYPE page-specification 3 PUBLIC "-//Apache Software Foundation//Tapestry Specification 4.0//EN" 4 "http://jakarta.apache.org/tapestry/dtd/Tapestry_4_0.dtd"> 5 <!-- generated by Spindle, http://spindle.sourceforge.net --> 6 7 <page-specification class="de.atron.b2xsale.web.Calculate"> 8 9 <description>Calculate</description> 10 11 <property name="PageBean" 12 persist="session" initial-value="new de.atron.b2xsale.web.beans.CalculateBean()"/> org.apache.hivemind.ApplicationRuntimeException Unable to add method de.atron.b2xsale.web.util.IPageBean getPageBean() to class $Calculate_8: duplicate method: getPageBean javassist.CannotCompileException duplicate method: getPageBean Stack Trace: javassist.bytecode.ClassFile.testExistingMethod(ClassFile.java:488) javassist.bytecode.ClassFile.addMethod(ClassFile.java:472) javassist.CtClassType.addMethod(CtClassType.java:907) org.apache.hivemind.service.impl.ClassFabImpl.addMethod(ClassFabImpl.java:291) org.apache.tapestry.enhance.EnhancementOperationImpl.addMethod(EnhancementOperationImpl.java:337) org.apache.tapestry.enhance.EnhanceUtils.createSimpleAccessor(EnhanceUtils.java:71) org.apache.tapestry.enhance.AbstractPropertyWorker.createProperty(AbstractPropertyWorker.java:69) org.apache.tapestry.enhance.AbstractPropertyWorker.performEnhancement(AbstractPropertyWorker.java:45) $EnhancementWorker_1055241a53a.performEnhancement($EnhancementWorker_1055241a53a.java) $EnhancementWorker_1055241a53c.performEnhancement($EnhancementWorker_1055241a53c.java) $EnhancementWorker_1055241a51e.performEnhancement($EnhancementWorker_1055241a51e.java) org.apache.tapestry.services.impl.ComponentConstructorFactoryImpl.getComponentConstructor(ComponentConstructorFactoryImpl.java:76) $ComponentConstructorFactory_1055241a507.getComponentConstructor($ComponentConstructorFactory_1055241a507.java) org.apache.tapestry.pageload.PageLoader.instantiatePage(PageLoader.java:611) org.apache.tapestry.pageload.PageLoader.loadPage(PageLoader.java:639) $IPageLoader_1055241a503.loadPage($IPageLoader_1055241a503.java) $IPageLoader_1055241a504.loadPage($IPageLoader_1055241a504.java) org.apache.tapestry.pageload.PageSource.getPage(PageSource.java:118) $IPageSource_1055241a470.getPage($IPageSource_1055241a470.java) org.apache.tapestry.engine.RequestCycle.loadPage(RequestCycle.java:252) org.apache.tapestry.engine.RequestCycle.getPage(RequestCycle.java:235) de.atron.b2xsale.web.Border.formGotoCalculate(Border.java:98)
        Hide
        Thomas Pasch added a comment -

        I also tried this with the new (4.0) page specification - same error.

        <?xml version="1.0" encoding="UTF-8"?>
        <!DOCTYPE page-specification
        PUBLIC "-//Apache Software Foundation//Tapestry Specification 4.0//EN"
        "http://jakarta.apache.org/tapestry/dtd/Tapestry_4_0.dtd">
        <page-specification class="de.atron.b2xsale.web.Calculate">
        <description>Calculate</description>
        <property name="PageBean"
        persist="session" initial-value="new de.atron.b2xsale.web.beans.CalculateBean()"/>
        ...
        </page-specification>

        Last not least I tried to get rid of all abstract get/setter stuff in the code and 'emulate' them by
        reflection. This time the Calculate (form) page renders but after submitting it crashs with:

        Class $Calculate_18 does not contain a property named 'PageBean'.
        component:
        $Calculate_18@1f7b6e1[Calculate]
        location:
        classpath:/WEB-INF/Calculate.page, line 7, column 60
        2 <!DOCTYPE page-specification
        3 PUBLIC "-//Apache Software Foundation//Tapestry Specification 4.0//EN"
        4 "http://jakarta.apache.org/tapestry/dtd/Tapestry_4_0.dtd">
        5 <!-- generated by Spindle, http://spindle.sourceforge.net -->
        6
        7 <page-specification class="de.atron.b2xsale.web.Calculate">
        8
        9 <description>Calculate</description>
        10
        11 <property name="PageBean"
        12 persist="session" initial-value="new de.atron.b2xsale.web.beans.CalculateBean()"/>
        Stack Trace:
        org.apache.hivemind.util.ClassAdaptor.getPropertyAdaptor(ClassAdaptor.java:136)
        org.apache.hivemind.util.ClassAdaptor.write(ClassAdaptor.java:60)
        org.apache.hivemind.util.PropertyUtils.write(PropertyUtils.java:54)
        org.apache.tapestry.record.PageRecorderImpl.applyChange(PageRecorderImpl.java:91)
        org.apache.tapestry.record.PageRecorderImpl.rollback(PageRecorderImpl.java:81)
        org.apache.tapestry.engine.RequestCycle.loadPage(RequestCycle.java:263)
        org.apache.tapestry.engine.RequestCycle.getPage(RequestCycle.java:235)
        org.apache.tapestry.engine.DirectService.service(DirectService.java:95)
        $IEngineService_10552ae2929.service($IEngineService_10552ae2929.java)
        org.apache.tapestry.services.impl.EngineServiceOuterProxy.service(EngineServiceOuterProxy.java:65)
        org.apache.tapestry.engine.AbstractEngine.service(AbstractEngine.java:241)
        org.apache.tapestry.services.impl.InvokeEngineTerminator.service(InvokeEngineTerminator.java:60)
        $WebRequestServicer_10552ae2909.service($WebRequestServicer_10552ae2909.java)
        $WebRequestServicer_10552ae2905.service($WebRequestServicer_10552ae2905.java)
        org.apache.tapestry.services.impl.WebRequestServicerPipelineBridge.service(WebRequestServicerPipelineBridge.java:56)
        $ServletRequestServicer_10552ae28e9.service($ServletRequestServicer_10552ae28e9.java)
        org.apache.tapestry.request.DecodedRequestInjector.service(DecodedRequestInjector.java:55)
        $ServletRequestServicerFilter_10552ae28e5.service($ServletRequestServicerFilter_10552ae28e5.java)
        $ServletRequestServicer_10552ae28eb.service($ServletRequestServicer_10552ae28eb.java)
        org.apache.tapestry.multipart.MultipartDecoderFilter.service(MultipartDecoderFilter.java:52)
        $ServletRequestServicerFilter_10552ae28e3.service($ServletRequestServicerFilter_10552ae28e3.java)
        $ServletRequestServicer_10552ae28eb.service($ServletRequestServicer_10552ae28eb.java)
        org.apache.tapestry.services.impl.SetupRequestEncoding.service(SetupRequestEncoding.java:53)
        $ServletRequestServicerFilter_10552ae28e7.service($ServletRequestServicerFilter_10552ae28e7.java)
        $ServletRequestServicer_10552ae28eb.service($ServletRequestServicer_10552ae28eb.java)
        $ServletRequestServicer_10552ae28dd.service($ServletRequestServicer_10552ae28dd.java)
        org.apache.tapestry.ApplicationServlet.doService(ApplicationServlet.java:145)
        org.apache.tapestry.ApplicationServlet.doPost(ApplicationServlet.java:190)
        javax.servlet.http.HttpServlet.service(HttpServlet.java:717)
        javax.servlet.http.HttpServlet.service(HttpServlet.java:810)
        org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:252)
        org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:173)
        org.jboss.web.tomcat.filters.ReplyHeaderFilter.doFilter(ReplyHeaderFilter.java:81)
        org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:202)
        org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:173)
        org.apache.catalina.core.StandardWrapperValve.invoke(StandardWrapperValve.java:213)
        org.apache.catalina.core.StandardContextValve.invoke(StandardContextValve.java:178)
        org.jboss.web.tomcat.security.CustomPrincipalValve.invoke(CustomPrincipalValve.java:39)
        org.jboss.web.tomcat.security.SecurityAssociationValve.invoke(SecurityAssociationValve.java:153)
        org.jboss.web.tomcat.security.JaccContextValve.invoke(JaccContextValve.java:59)
        org.apache.catalina.core.StandardHostValve.invoke(StandardHostValve.java:126)
        org.apache.catalina.valves.ErrorReportValve.invoke(ErrorReportValve.java:105)
        org.apache.catalina.core.StandardEngineValve.invoke(StandardEngineValve.java:107)
        org.apache.catalina.connector.CoyoteAdapter.service(CoyoteAdapter.java:148)
        org.apache.coyote.http11.Http11Processor.process(Http11Processor.java:856)
        org.apache.coyote.http11.Http11Protocol$Http11ConnectionHandler.processConnection(Http11Protocol.java:744)
        org.apache.tomcat.util.net.PoolTcpEndpoint.processSocket(PoolTcpEndpoint.java:527)
        org.apache.tomcat.util.net.MasterSlaveWorkerThread.run(MasterSlaveWorkerThread.java:112)
        java.lang.Thread.run(Thread.java:595)

        This also is a little unexpected as the page has used the property for rendering BEFORE...
        The expected behaviour is that if render succeeds the write in the rewind phase of the
        page should succeed as well.

        Button line: beta2 is not ready for production.

        Show
        Thomas Pasch added a comment - I also tried this with the new (4.0) page specification - same error. <?xml version="1.0" encoding="UTF-8"?> <!DOCTYPE page-specification PUBLIC "-//Apache Software Foundation//Tapestry Specification 4.0//EN" "http://jakarta.apache.org/tapestry/dtd/Tapestry_4_0.dtd"> <page-specification class="de.atron.b2xsale.web.Calculate"> <description>Calculate</description> <property name="PageBean" persist="session" initial-value="new de.atron.b2xsale.web.beans.CalculateBean()"/> ... </page-specification> Last not least I tried to get rid of all abstract get/setter stuff in the code and 'emulate' them by reflection. This time the Calculate (form) page renders but after submitting it crashs with: Class $Calculate_18 does not contain a property named 'PageBean'. component: $Calculate_18@1f7b6e1 [Calculate] location: classpath:/WEB-INF/Calculate.page, line 7, column 60 2 <!DOCTYPE page-specification 3 PUBLIC "-//Apache Software Foundation//Tapestry Specification 4.0//EN" 4 "http://jakarta.apache.org/tapestry/dtd/Tapestry_4_0.dtd"> 5 <!-- generated by Spindle, http://spindle.sourceforge.net --> 6 7 <page-specification class="de.atron.b2xsale.web.Calculate"> 8 9 <description>Calculate</description> 10 11 <property name="PageBean" 12 persist="session" initial-value="new de.atron.b2xsale.web.beans.CalculateBean()"/> Stack Trace: org.apache.hivemind.util.ClassAdaptor.getPropertyAdaptor(ClassAdaptor.java:136) org.apache.hivemind.util.ClassAdaptor.write(ClassAdaptor.java:60) org.apache.hivemind.util.PropertyUtils.write(PropertyUtils.java:54) org.apache.tapestry.record.PageRecorderImpl.applyChange(PageRecorderImpl.java:91) org.apache.tapestry.record.PageRecorderImpl.rollback(PageRecorderImpl.java:81) org.apache.tapestry.engine.RequestCycle.loadPage(RequestCycle.java:263) org.apache.tapestry.engine.RequestCycle.getPage(RequestCycle.java:235) org.apache.tapestry.engine.DirectService.service(DirectService.java:95) $IEngineService_10552ae2929.service($IEngineService_10552ae2929.java) org.apache.tapestry.services.impl.EngineServiceOuterProxy.service(EngineServiceOuterProxy.java:65) org.apache.tapestry.engine.AbstractEngine.service(AbstractEngine.java:241) org.apache.tapestry.services.impl.InvokeEngineTerminator.service(InvokeEngineTerminator.java:60) $WebRequestServicer_10552ae2909.service($WebRequestServicer_10552ae2909.java) $WebRequestServicer_10552ae2905.service($WebRequestServicer_10552ae2905.java) org.apache.tapestry.services.impl.WebRequestServicerPipelineBridge.service(WebRequestServicerPipelineBridge.java:56) $ServletRequestServicer_10552ae28e9.service($ServletRequestServicer_10552ae28e9.java) org.apache.tapestry.request.DecodedRequestInjector.service(DecodedRequestInjector.java:55) $ServletRequestServicerFilter_10552ae28e5.service($ServletRequestServicerFilter_10552ae28e5.java) $ServletRequestServicer_10552ae28eb.service($ServletRequestServicer_10552ae28eb.java) org.apache.tapestry.multipart.MultipartDecoderFilter.service(MultipartDecoderFilter.java:52) $ServletRequestServicerFilter_10552ae28e3.service($ServletRequestServicerFilter_10552ae28e3.java) $ServletRequestServicer_10552ae28eb.service($ServletRequestServicer_10552ae28eb.java) org.apache.tapestry.services.impl.SetupRequestEncoding.service(SetupRequestEncoding.java:53) $ServletRequestServicerFilter_10552ae28e7.service($ServletRequestServicerFilter_10552ae28e7.java) $ServletRequestServicer_10552ae28eb.service($ServletRequestServicer_10552ae28eb.java) $ServletRequestServicer_10552ae28dd.service($ServletRequestServicer_10552ae28dd.java) org.apache.tapestry.ApplicationServlet.doService(ApplicationServlet.java:145) org.apache.tapestry.ApplicationServlet.doPost(ApplicationServlet.java:190) javax.servlet.http.HttpServlet.service(HttpServlet.java:717) javax.servlet.http.HttpServlet.service(HttpServlet.java:810) org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:252) org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:173) org.jboss.web.tomcat.filters.ReplyHeaderFilter.doFilter(ReplyHeaderFilter.java:81) org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:202) org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:173) org.apache.catalina.core.StandardWrapperValve.invoke(StandardWrapperValve.java:213) org.apache.catalina.core.StandardContextValve.invoke(StandardContextValve.java:178) org.jboss.web.tomcat.security.CustomPrincipalValve.invoke(CustomPrincipalValve.java:39) org.jboss.web.tomcat.security.SecurityAssociationValve.invoke(SecurityAssociationValve.java:153) org.jboss.web.tomcat.security.JaccContextValve.invoke(JaccContextValve.java:59) org.apache.catalina.core.StandardHostValve.invoke(StandardHostValve.java:126) org.apache.catalina.valves.ErrorReportValve.invoke(ErrorReportValve.java:105) org.apache.catalina.core.StandardEngineValve.invoke(StandardEngineValve.java:107) org.apache.catalina.connector.CoyoteAdapter.service(CoyoteAdapter.java:148) org.apache.coyote.http11.Http11Processor.process(Http11Processor.java:856) org.apache.coyote.http11.Http11Protocol$Http11ConnectionHandler.processConnection(Http11Protocol.java:744) org.apache.tomcat.util.net.PoolTcpEndpoint.processSocket(PoolTcpEndpoint.java:527) org.apache.tomcat.util.net.MasterSlaveWorkerThread.run(MasterSlaveWorkerThread.java:112) java.lang.Thread.run(Thread.java:595) This also is a little unexpected as the page has used the property for rendering BEFORE... The expected behaviour is that if render succeeds the write in the rewind phase of the page should succeed as well. Button line: beta2 is not ready for production.
        Hide
        Howard M. Lewis Ship added a comment -

        The root of the problem is your <property> element, the name should be "pageBean" not "PageBean".

        Bottom line: you don't understand how JavaBean property names work

        What's odd is the error you get. Basically, Tapestry created a property named PageBean, as getPageBean() and setPageBean(), based on the <property>.

        It then gets into AbstractPropertyWorker, where it sees a property named "pageBean" which isn't "claimed", so it implements a getter and setter for it; the same getPageBean(), setPageBean().

        I have to think about how to check for this case and report it properly.

        This is why I like the annotations so much!

        Show
        Howard M. Lewis Ship added a comment - The root of the problem is your <property> element, the name should be "pageBean" not "PageBean". Bottom line: you don't understand how JavaBean property names work What's odd is the error you get. Basically, Tapestry created a property named PageBean, as getPageBean() and setPageBean(), based on the <property>. It then gets into AbstractPropertyWorker, where it sees a property named "pageBean" which isn't "claimed", so it implements a getter and setter for it; the same getPageBean(), setPageBean(). I have to think about how to check for this case and report it properly. This is why I like the annotations so much!
        Hide
        Thomas Pasch added a comment -

        This problem is still virulent in beta3.

        Show
        Thomas Pasch added a comment - This problem is still virulent in beta3.
        Hide
        Thomas Pasch added a comment -

        Checked your suggestion. You are right, the property name in the page should be 'pageBean'.
        Still 'Attempt to redefine method de.atron.b2xsale.web.util.IPageBean getPageBean() ' IS irritating
        here. Thank you for help. For me the issue is resolved.

        Show
        Thomas Pasch added a comment - Checked your suggestion. You are right, the property name in the page should be 'pageBean'. Still 'Attempt to redefine method de.atron.b2xsale.web.util.IPageBean getPageBean() ' IS irritating here. Thank you for help. For me the issue is resolved.
        Hide
        Howard M. Lewis Ship added a comment -

        When, due to user error, a method is provided with multiple implementations, the error reporting is not good (confusing, nothing line-precise).

        Show
        Howard M. Lewis Ship added a comment - When, due to user error, a method is provided with multiple implementations, the error reporting is not good (confusing, nothing line-precise).

          People

          • Assignee:
            Howard M. Lewis Ship
            Reporter:
            Thomas Pasch
          • Votes:
            0 Vote for this issue
            Watchers:
            1 Start watching this issue

            Dates

            • Created:
              Updated:
              Resolved:

              Development