More details on this error:
- it happens after redeploying the app on tomcat
- it is a random error, doesn't happen every time
- I have a Introspector listener that flushes the caches in my web.xml
- this is not new, I saw others posts on the list about this, this seems to
be hanging around since tapestry 3. There is even a JIRA entry
http://issues.apache.org/jira/browse/TAPESTRY-408
On 6/12/06, Henri Dupre <[EMAIL PROTECTED]> wrote:
I have a simple component called "RadioPropertySelection". This component
is somehow a copy paste from the propertyselection code except that it
renders a list in radio buttons.
Somehow one of the parameters "model" gets lost!
I believe my ognl construct is right and refers a constant:
ognl:@[EMAIL PROTECTED] points to
a public static final IPropertySelectionModel = new
StringPropertySelectionModel(...);
My parameters is obtained using annotations:
@Parameter(required = true)
public abstract IPropertySelectionModel getModel();
and here is the piece of code from where the NPE comes from:
protected void renderFormComponent(IMarkupWriter writer, IRequestCycle
cycle)
{
IPropertySelectionModel model = getModel();
if (model == null)
***line 51 throw Tapestry.createRequiredParameterException(this,
"model");
org.apache.tapestry.BindingException Value for parameter 'model' in
component ListeArticles/$RadioPropertySelection is null, and a non-null
value is required. binding: ExpressionBinding[ListeArticles @
[EMAIL PROTECTED] _MODEL] component: [EMAIL PROTECTED]/$RadioPropertySelection]
location: context:/WEB-INF/catalogue/ListeArticles.html, line 470
465 <tr> 466 <td width="691" height="23" valign="middle"> 467 <strong>
468 Trier par : 469 </strong> 470 <span jwcid="@RadioPropertySelection"
model="ognl:@[EMAIL PROTECTED]"
submitOnChange="true" value="ognl:classement"> 471 Désignations
472 473 474 <input type="radio"
name="radiobutton" value="radiobutton" onfocus="this.checked=true;
this.submit()"> 475 Montants
Stack Trace:
- org.apache.tapestry.Tapestry.createRequiredParameterException(
Tapestry.java:643)
-
actualis.web.tapestry.components.RadioPropertySelection.renderFormComponent
(RadioPropertySelection.java:51)
- org.apache.tapestry.form.AbstractFormComponent.renderComponent(
AbstractFormComponent.java:122)
- org.apache.tapestry.AbstractComponent.render(
AbstractComponent.java:617)
Does this make any sense to anyone? How can a constant become null during
render??
Thanks,
Henri.
--
Thanks,
Henri.