[ http://issues.apache.org/jira/browse/TAPESTRY-441?page=all ]
Howard M. Lewis Ship updated TAPESTRY-441:
------------------------------------------
Summary: Poor reporting of duplicate method implementations (was:
Unable to redefine method 'inherited' from Interface)
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();
}
was:
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"?>
<!DOCTYPE page-specification
PUBLIC "-//Apache Software Foundation//Tapestry Specification 3.0//EN"
"http://jakarta.apache.org/tapestry/dtd/Tapestry_3_0.dtd">
<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 <!DOCTYPE page-specification
3 PUBLIC "-//Apache Software Foundation//Tapestry Specification 3.0//EN"
4 "http://jakarta.apache.org/tapestry/dtd/Tapestry_3_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-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();
}
When, due to user error, a method is provided with multiple implementations,
the error reporting is not good (confusing, nothing line-precise).
> Poor reporting of duplicate method implementations
> --------------------------------------------------
>
> Key: TAPESTRY-441
> URL: http://issues.apache.org/jira/browse/TAPESTRY-441
> Project: Tapestry
> Type: Bug
> Components: Framework
> Versions: 4.0
> Environment: jboss-4.0.2 with tomcat 5.5.9 on linux
> Reporter: Thomas Pasch
>
> 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();
> }
--
This message is automatically generated by JIRA.
-
If you think it was sent incorrectly contact one of the administrators:
http://issues.apache.org/jira/secure/Administrators.jspa
-
For more information on JIRA, see:
http://www.atlassian.com/software/jira
---------------------------------------------------------------------
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]