You are viewing a plain text version of this content. The canonical link for it is here.
Posted to dev@tapestry.apache.org by "Howard M. Lewis Ship (JIRA)" <ta...@jakarta.apache.org> on 2005/09/17 20:09:55 UTC

[jira] Closed: (TAPESTRY-642) Injections that cause bad casts need better reporting

     [ http://issues.apache.org/jira/browse/TAPESTRY-642?page=all ]
     
Howard M. Lewis Ship closed TAPESTRY-642:
-----------------------------------------

    Fix Version: 4.0
     Resolution: Fixed

Much cleared exception now ....

org.apache.hivemind.ApplicationRuntimeException
Component BadInjectComponent/border is not assignable to type org.apache.tapestry.html.Body.
location: 	Annotation @org.apache.tapestry.annotations.InjectComponent(value=border) of public abstract org.apache.tapestry.html.Body pages.BadInjectComponent.getBorder()
Stack Trace:

    * org.apache.tapestry.TapestryUtils.getComponent(TapestryUtils.java:301)
    * $BadInjectComponent_0.finishLoad($BadInjectComponent_0.java)
    * org.apache.tapestry.pageload.PageLoader.constructComponent(PageLoader.java:470)
    * org.apache.tapestry.pageload.PageLoader.loadPage(PageLoader.java:639)
    * $IPageLoader_1066542252f.loadPage($IPageLoader_1066542252f.java)
    * $IPageLoader_10665422530.loadPage($IPageLoader_10665422530.java)
    * org.apache.tapestry.pageload.PageSource.getPage(PageSource.java:118)

> Injections that cause bad casts need better reporting
> -----------------------------------------------------
>
>          Key: TAPESTRY-642
>          URL: http://issues.apache.org/jira/browse/TAPESTRY-642
>      Project: Tapestry
>         Type: Bug
>   Components: Framework
>     Versions: 4.0
>     Reporter: Howard M. Lewis Ship
>     Assignee: Howard M. Lewis Ship
>      Fix For: 4.0

>
> When injection code performs a cast and a ClassCastException occurs, it's very difficult to determine what actually failed.
> The exception report provides no details (not an accurate location, and no additional information).
> Unable to instantiate component report/ReportInfo: $BaseComponent_2
> component: 	$ReportInfo_26@1f11507[report/ReportInfo]
> location: 	context:/WEB-INF/report/ReportInfo.page, line 6, column 23
> 1	<?xml version="1.0"?>
> 2	<!DOCTYPE page-specification PUBLIC
> 3	"-//Apache Software Foundation//Tapestry Specification 4.0//EN"
> 4	"http://jakarta.apache.org/tapestry/dtd/Tapestry_4_0.dtd">
> 5	
> 6	<page-specification>
> 7	
> 8	
> 9	<component id="tallYes" type="Checkbox">
> 10	<binding name="value" value="tallYes"/>
> 11	</component>
>  
> java.lang.ClassCastException
> $BaseComponent_2
> Stack Trace:
>     * $ReportInfo_26.finishLoad($ReportInfo_26.java)
>     * org.apache.tapestry.pageload.PageLoader.constructComponent(PageLoader.java:470)
>     * org.apache.tapestry.pageload.PageLoader.loadPage(PageLoader.java:639)
>     * $IPageLoader_1064cccc780.loadPage($IPageLoader_1064cccc780.java)
>     * $IPageLoader_1064cccc781.loadPage($IPageLoader_1064cccc781.java)
>     * org.apache.tapestry.pageload.PageSource.getPage(PageSource.java:118)
>     * $IPageSource_1064cccc6eb.getPage($IPageSource_1064cccc6eb.java)
>     * org.apache.tapestry.engine.RequestCycle.loadPage(RequestCycle.java:265)
>     * org.apache.tapestry.engine.RequestCycle.getPage(RequestCycle.java:248)
> The exception is occuring inside the finishLoad() method of the enhanced class.

-- 
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: tapestry-dev-unsubscribe@jakarta.apache.org
For additional commands, e-mail: tapestry-dev-help@jakarta.apache.org