Wicket
  1. Wicket
  2. WICKET-1802

Propertyresolver could be more informative

    Details

    • Type: Improvement Improvement
    • Status: Resolved
    • Priority: Major Major
    • Resolution: Fixed
    • Affects Version/s: 1.4-M3
    • Fix Version/s: 1.4.16, 1.5-RC2
    • Component/s: wicket
    • Labels:
      None

      Description

      WicketMessage: no set method defined for value: true on object: ...
      at org.apache.wicket.util.lang.PropertyResolver$MethodGetAndSet.setValue(PropertyResolver.java:1107)

      In case there is a getter method defined, it would significantly help debugging to display the get method name in the exception.

      I suggest fixing the problem with:

      • " on object: " + object);
        + " on object: " + object + " while respective getMethod being " + getMethod.getName());

        Activity

        Hide
        Johan Compagner added a comment -

        applied to 1.3 and 1.4

        Show
        Johan Compagner added a comment - applied to 1.3 and 1.4
        Hide
        Martin Makundi added a comment -

        Hi!

        I still get this kind of 'blind' exception not displaying the 'expression' that is related to the cause:

        2009-03-02 13:22:28,481 12495061 [btpool0-106] ERROR RequestCycle - Can't convert null value to a primitive class: boolean for setting it on wicket.quickstart.models.ReportingRangeModel@5d637a9e
        org.apache.wicket.util.convert.ConversionException: Can't convert null value to a primitive class: boolean for setting it on wicket.quickstart.models.ReportingRangeModel@5d637a9e
        at org.apache.wicket.util.lang.PropertyResolver$MethodGetAndSet.setValue(PropertyResolver.java:1090)
        at org.apache.wicket.util.lang.PropertyResolver$ObjectAndGetSetter.setValue(PropertyResolver.java:582)
        at org.apache.wicket.util.lang.PropertyResolver.setValue(PropertyResolver.java:136)
        at org.apache.wicket.model.AbstractPropertyModel.setObject(AbstractPropertyModel.java:169)
        at org.apache.wicket.Component.setDefaultModelObject(Component.java:2947)
        at org.apache.wicket.markup.html.form.FormComponent.updateModel(FormComponent.java:1149)
        at org.apache.wicket.markup.html.form.Form$FormModelUpdateVisitor.component(Form.java:223)
        at org.apache.wicket.markup.html.form.FormComponent.visitComponentsPostOrderHelper(FormComponent.java:495)
        at org.apache.wicket.markup.html.form.FormComponent.visitComponentsPostOrderHelper(FormComponent.java:474)
        at org.apache.wicket.markup.html.form.FormComponent.visitComponentsPostOrder(FormComponent.java:451)
        at org.apache.wicket.markup.html.form.Form.internalUpdateFormComponentModels(Form.java:1947)
        at org.apache.wicket.markup.html.form.Form.access$300(Form.java:139)
        at org.apache.wicket.markup.html.form.Form$19.component(Form.java:1932)
        at org.apache.wicket.markup.html.form.Form$19.component(Form.java:1928)
        at org.apache.wicket.MarkupContainer.visitChildren(MarkupContainer.java:859)
        at org.apache.wicket.MarkupContainer.visitChildren(MarkupContainer.java:874)
        at org.apache.wicket.markup.html.form.Form.updateNestedFormComponentModels(Form.java:1926)
        at org.apache.wicket.markup.html.form.Form.updateFormComponentModels(Form.java:1916)
        at org.apache.wicket.markup.html.form.Form.process(Form.java:957)
        at org.apache.wicket.markup.html.form.Form.process(Form.java:905)
        at org.apache.wicket.markup.html.form.Form.onFormSubmitted(Form.java:873)
        at org.apache.wicket.ajax.form.AjaxFormSubmitBehavior.onEvent(AjaxFormSubmitBehavior.java:132)

        It should say which expression was attempted.

        Show
        Martin Makundi added a comment - Hi! I still get this kind of 'blind' exception not displaying the 'expression' that is related to the cause: 2009-03-02 13:22:28,481 12495061 [btpool0-106] ERROR RequestCycle - Can't convert null value to a primitive class: boolean for setting it on wicket.quickstart.models.ReportingRangeModel@5d637a9e org.apache.wicket.util.convert.ConversionException: Can't convert null value to a primitive class: boolean for setting it on wicket.quickstart.models.ReportingRangeModel@5d637a9e at org.apache.wicket.util.lang.PropertyResolver$MethodGetAndSet.setValue(PropertyResolver.java:1090) at org.apache.wicket.util.lang.PropertyResolver$ObjectAndGetSetter.setValue(PropertyResolver.java:582) at org.apache.wicket.util.lang.PropertyResolver.setValue(PropertyResolver.java:136) at org.apache.wicket.model.AbstractPropertyModel.setObject(AbstractPropertyModel.java:169) at org.apache.wicket.Component.setDefaultModelObject(Component.java:2947) at org.apache.wicket.markup.html.form.FormComponent.updateModel(FormComponent.java:1149) at org.apache.wicket.markup.html.form.Form$FormModelUpdateVisitor.component(Form.java:223) at org.apache.wicket.markup.html.form.FormComponent.visitComponentsPostOrderHelper(FormComponent.java:495) at org.apache.wicket.markup.html.form.FormComponent.visitComponentsPostOrderHelper(FormComponent.java:474) at org.apache.wicket.markup.html.form.FormComponent.visitComponentsPostOrder(FormComponent.java:451) at org.apache.wicket.markup.html.form.Form.internalUpdateFormComponentModels(Form.java:1947) at org.apache.wicket.markup.html.form.Form.access$300(Form.java:139) at org.apache.wicket.markup.html.form.Form$19.component(Form.java:1932) at org.apache.wicket.markup.html.form.Form$19.component(Form.java:1928) at org.apache.wicket.MarkupContainer.visitChildren(MarkupContainer.java:859) at org.apache.wicket.MarkupContainer.visitChildren(MarkupContainer.java:874) at org.apache.wicket.markup.html.form.Form.updateNestedFormComponentModels(Form.java:1926) at org.apache.wicket.markup.html.form.Form.updateFormComponentModels(Form.java:1916) at org.apache.wicket.markup.html.form.Form.process(Form.java:957) at org.apache.wicket.markup.html.form.Form.process(Form.java:905) at org.apache.wicket.markup.html.form.Form.onFormSubmitted(Form.java:873) at org.apache.wicket.ajax.form.AjaxFormSubmitBehavior.onEvent(AjaxFormSubmitBehavior.java:132) It should say which expression was attempted.
        Hide
        Pedro Santos added a comment -

        I think we can improve the message in 1.4 also.

        Show
        Pedro Santos added a comment - I think we can improve the message in 1.4 also.
        Hide
        Hudson added a comment -

        Integrated in Apache Wicket 1.4.x #405 (See https://hudson.apache.org/hudson/job/Apache%20Wicket%201.4.x/405/)
        merging message improvement on PropertyResolver from trunk
        Issue: WICKET-1802

        Show
        Hudson added a comment - Integrated in Apache Wicket 1.4.x #405 (See https://hudson.apache.org/hudson/job/Apache%20Wicket%201.4.x/405/ ) merging message improvement on PropertyResolver from trunk Issue: WICKET-1802

          People

          • Assignee:
            Johan Compagner
            Reporter:
            Martin Makundi
          • Votes:
            0 Vote for this issue
            Watchers:
            3 Start watching this issue

            Dates

            • Created:
              Updated:
              Resolved:

              Time Tracking

              Estimated:
              Original Estimate - 1h
              1h
              Remaining:
              Remaining Estimate - 1h
              1h
              Logged:
              Time Spent - Not Specified
              Not Specified

                Development