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
 Assigned to: Howard M. Lewis Ship 


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:      [EMAIL PROTECTED]/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: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]

Reply via email to