java.lang.IllegalArgumentException: Cannot convert false of type class java.lang.Boolean to class java.util.Date

Spring JIRA | Jack Punt | 6 years ago
  1. 0

    I have a TIMESTAMP field named "validated" which roo DBRE presents as a Date, with: public Date getValidated() { return this.validated; } The value is allowed to be null, so in UserId.java I created: public boolean isValidated() { return (getValidated() != null); } But when [for example] create.jspx invokes the roo-generated: <field:datetime dateTimePattern="${userId_validated_date_format}" field="validated" id="c_my_pkg_UserId_validated" z="cKb0GN8ukyKCr4s0DtbTFwNfgzM="/> The resolution of 'field="validated"' apparently finds 'boolean isValidated()' and then gets irate that it does not return the Date that it needs. [workaround is to rename the database field to 'validation_date' and DBRE again?] SEVERE: Servlet.service() for servlet MyService threw exception java.lang.IllegalArgumentException: Cannot convert false of type class java.lang.Boolean to class java.util.Date at org.apache.el.lang.ELSupport.coerceToType(ELSupport.java:375) at org.apache.el.ValueExpressionImpl.getValue(ValueExpressionImpl.java:188) at org.apache.jasper.runtime.PageContextImpl.proprietaryEvaluate(PageContextImpl.java:935) at org.apache.jsp.tag.web.form.fields.display_tagx._jspx_meth_fmt_005fformatDate_005f0(display_tagx.java:540) at org.apache.jsp.tag.web.form.fields.display_tagx._jspx_meth_spring_005fescapeBody_005f0(display_tagx.java:505) at org.apache.jsp.tag.web.form.fields.display_tagx._jspx_meth_c_005fwhen_005f0(display_tagx.java:472) at org.apache.jsp.tag.web.form.fields.display_tagx._jspx_meth_c_005fchoose_005f0(display_tagx.java:441) at org.apache.jsp.tag.web.form.fields.display_tagx._jspx_meth_c_005fif_005f0(display_tagx.java:253) at org.apache.jsp.tag.web.form.fields.display_tagx.doTag(display_tagx.java:206) at org.apache.jsp.WEB_002dINF.views.userids.show_jspx._jspx_meth_field_005fdisplay_005f11(show_jspx.java:361) at org.apache.jsp.WEB_002dINF.views.userids.show_jspx.access$11(show_jspx.java:340) at org.apache.jsp.WEB_002dINF.views.userids.show_jspx$Helper.invoke0(show_jspx.java:402) at org.apache.jsp.WEB_002dINF.views.userids.show_jspx$Helper.invoke(show_jspx.java:419) at org.apache.jsp.tag.web.form.show_tagx._jspx_meth_c_005fwhen_005f0(show_tagx.java:668) at org.apache.jsp.tag.web.form.show_tagx._jspx_meth_c_005fchoose_005f0(show_tagx.java:636) at org.apache.jsp.tag.web.form.show_tagx.access$0(show_tagx.java:626)

    Spring JIRA | 6 years ago | Jack Punt
    java.lang.IllegalArgumentException: Cannot convert false of type class java.lang.Boolean to class java.util.Date
  2. 0

    I have a TIMESTAMP field named "validated" which roo DBRE presents as a Date, with: public Date getValidated() { return this.validated; } The value is allowed to be null, so in UserId.java I created: public boolean isValidated() { return (getValidated() != null); } But when [for example] create.jspx invokes the roo-generated: <field:datetime dateTimePattern="${userId_validated_date_format}" field="validated" id="c_my_pkg_UserId_validated" z="cKb0GN8ukyKCr4s0DtbTFwNfgzM="/> The resolution of 'field="validated"' apparently finds 'boolean isValidated()' and then gets irate that it does not return the Date that it needs. [workaround is to rename the database field to 'validation_date' and DBRE again?] SEVERE: Servlet.service() for servlet MyService threw exception java.lang.IllegalArgumentException: Cannot convert false of type class java.lang.Boolean to class java.util.Date at org.apache.el.lang.ELSupport.coerceToType(ELSupport.java:375) at org.apache.el.ValueExpressionImpl.getValue(ValueExpressionImpl.java:188) at org.apache.jasper.runtime.PageContextImpl.proprietaryEvaluate(PageContextImpl.java:935) at org.apache.jsp.tag.web.form.fields.display_tagx._jspx_meth_fmt_005fformatDate_005f0(display_tagx.java:540) at org.apache.jsp.tag.web.form.fields.display_tagx._jspx_meth_spring_005fescapeBody_005f0(display_tagx.java:505) at org.apache.jsp.tag.web.form.fields.display_tagx._jspx_meth_c_005fwhen_005f0(display_tagx.java:472) at org.apache.jsp.tag.web.form.fields.display_tagx._jspx_meth_c_005fchoose_005f0(display_tagx.java:441) at org.apache.jsp.tag.web.form.fields.display_tagx._jspx_meth_c_005fif_005f0(display_tagx.java:253) at org.apache.jsp.tag.web.form.fields.display_tagx.doTag(display_tagx.java:206) at org.apache.jsp.WEB_002dINF.views.userids.show_jspx._jspx_meth_field_005fdisplay_005f11(show_jspx.java:361) at org.apache.jsp.WEB_002dINF.views.userids.show_jspx.access$11(show_jspx.java:340) at org.apache.jsp.WEB_002dINF.views.userids.show_jspx$Helper.invoke0(show_jspx.java:402) at org.apache.jsp.WEB_002dINF.views.userids.show_jspx$Helper.invoke(show_jspx.java:419) at org.apache.jsp.tag.web.form.show_tagx._jspx_meth_c_005fwhen_005f0(show_tagx.java:668) at org.apache.jsp.tag.web.form.show_tagx._jspx_meth_c_005fchoose_005f0(show_tagx.java:636) at org.apache.jsp.tag.web.form.show_tagx.access$0(show_tagx.java:626)

    Spring JIRA | 6 years ago | Jack Punt
    java.lang.IllegalArgumentException: Cannot convert false of type class java.lang.Boolean to class java.util.Date
  3. 0

    Date converter using columns of dataTable primefaces

    Stack Overflow | 2 years ago
    java.lang.IllegalArgumentException: Cannot convert 31/03/15 00:00 of type class java.util.Date to Number
  4. Speed up your debug routine!

    Automated exception search integrated into your IDE

  5. 0

    visual-studio-2012: mars 2015

    blogspot.com | 1 year ago
    java.lang.IllegalArgumentException: Cannot convert 31/03/15 00:00 of type class java.util.Date to Number
  6. 0

    PrimeFaces Community Forum • View topic - problem with autocomplete as first input control in dataGrid

    primefaces.org | 11 months ago
    java.lang.IllegalArgumentException: Cannot convert 27 of type class java.math.BigDecimal to class java.lang.Boolean

    Not finding the right solution?
    Take a tour to get the most out of Samebug.

    Tired of useless tips?

    Automated exception search integrated into your IDE

    Root Cause Analysis

    1. java.lang.IllegalArgumentException

      Cannot convert false of type class java.lang.Boolean to class java.util.Date

      at org.apache.el.lang.ELSupport.coerceToType()
    2. Pax Jsp
      ValueExpressionImpl.getValue
      1. org.apache.el.lang.ELSupport.coerceToType(ELSupport.java:375)
      2. org.apache.el.ValueExpressionImpl.getValue(ValueExpressionImpl.java:188)
      2 frames
    3. GWT dev
      PageContextImpl.proprietaryEvaluate
      1. org.apache.jasper.runtime.PageContextImpl.proprietaryEvaluate(PageContextImpl.java:935)
      1 frame
    4. org.apache.jsp
      show_tagx.access$0
      1. org.apache.jsp.tag.web.form.fields.display_tagx._jspx_meth_fmt_005fformatDate_005f0(display_tagx.java:540)
      2. org.apache.jsp.tag.web.form.fields.display_tagx._jspx_meth_spring_005fescapeBody_005f0(display_tagx.java:505)
      3. org.apache.jsp.tag.web.form.fields.display_tagx._jspx_meth_c_005fwhen_005f0(display_tagx.java:472)
      4. org.apache.jsp.tag.web.form.fields.display_tagx._jspx_meth_c_005fchoose_005f0(display_tagx.java:441)
      5. org.apache.jsp.tag.web.form.fields.display_tagx._jspx_meth_c_005fif_005f0(display_tagx.java:253)
      6. org.apache.jsp.tag.web.form.fields.display_tagx.doTag(display_tagx.java:206)
      7. org.apache.jsp.WEB_002dINF.views.userids.show_jspx._jspx_meth_field_005fdisplay_005f11(show_jspx.java:361)
      8. org.apache.jsp.WEB_002dINF.views.userids.show_jspx.access$11(show_jspx.java:340)
      9. org.apache.jsp.WEB_002dINF.views.userids.show_jspx$Helper.invoke0(show_jspx.java:402)
      10. org.apache.jsp.WEB_002dINF.views.userids.show_jspx$Helper.invoke(show_jspx.java:419)
      11. org.apache.jsp.tag.web.form.show_tagx._jspx_meth_c_005fwhen_005f0(show_tagx.java:668)
      12. org.apache.jsp.tag.web.form.show_tagx._jspx_meth_c_005fchoose_005f0(show_tagx.java:636)
      13. org.apache.jsp.tag.web.form.show_tagx.access$0(show_tagx.java:626)
      13 frames