java.lang.IllegalStateException

There are no available Samebug tips for this exception. Do you have an idea how to solve this issue? A short tip would help users who saw this issue last week.

  • {quote} entity --class ~.domain.FooBar field date --fieldName today --type java.util.Date --class ~.domain.FooBar controller scaffold --class ~.web.FooBarController {quote} After remove scripts from create form , and submit with invalid date pattern then you would see below exceptions: {quote} java.lang.IllegalStateException: Neither BindingResult nor plain target object for bean name 'foobar' available as request attribute at org.springframework.web.servlet.support.BindStatus.<init>(BindStatus.java:141) at org.springframework.web.servlet.tags.form.AbstractDataBoundFormElementTag.getBindStatus(AbstractDataBoundFormElementTag.java:175) at org.springframework.web.servlet.tags.form.AbstractDataBoundFormElementTag.getPropertyPath(AbstractDataBoundFormElementTag.java:195) at org.springframework.web.servlet.tags.form.AbstractDataBoundFormElementTag.getName(AbstractDataBoundFormElementTag.java:161) at org.springframework.web.servlet.tags.form.AbstractDataBoundFormElementTag.writeDefaultAttributes(AbstractDataBoundFormElementTag.java:124) at org.springframework.web.servlet.tags.form.AbstractHtmlElementTag.writeDefaultAttributes(AbstractHtmlElementTag.java:409) at org.springframework.web.servlet.tags.form.InputTag.writeTagContent(InputTag.java:140) at org.springframework.web.servlet.tags.form.AbstractFormTag.doStartTagInternal(AbstractFormTag.java:91) at org.springframework.web.servlet.tags.RequestContextAwareTag.doStartTag(RequestContextAwareTag.java:78) ... IO Error executing tag: JSPException including path '/WEB-INF/views/foobar/create.jspx'. org.apache.tiles.util.TilesIOException: JSPException including path '/WEB-INF/views/foobar/create.jspx'. at org.apache.tiles.servlet.context.ServletUtil.wrapServletException(ServletUtil.java:232) at org.apache.tiles.jsp.context.JspTilesRequestContext.include(JspTilesRequestContext.java:105) at org.apache.tiles.jsp.context.JspTilesRequestContext.dispatch(JspTilesRequestContext.java:96) at org.apache.tiles.renderer.impl.UntypedAttributeRenderer.write(UntypedAttributeRenderer.java:61) at org.apache.tiles.renderer.impl.AbstractBaseAttributeRenderer.render(AbstractBaseAttributeRenderer.java:103) at org.apache.tiles.impl.BasicTilesContainer.render(BasicTilesContainer.java:669) at org.apache.tiles.impl.BasicTilesContainer.render(BasicTilesContainer.java:337) at org.apache.tiles.jsp.taglib.InsertAttributeTag.render(InsertAttributeTag.java:234) at org.apache.tiles.jsp.taglib.InsertAttributeTag.render(InsertAttributeTag.java:211) at org.apache.tiles.jsp.taglib.RenderTag.doEndTag(RenderTag.java:220) .... {quote} Note: Create form will work as expected after change modelAttribute in jsp and controller to 'fooBar'(not foobar).
    via by Sid,
  • {quote} entity --class ~.domain.FooBar field date --fieldName today --type java.util.Date --class ~.domain.FooBar controller scaffold --class ~.web.FooBarController {quote} After remove scripts from create form , and submit with invalid date pattern then you would see below exceptions: {quote} java.lang.IllegalStateException: Neither BindingResult nor plain target object for bean name 'foobar' available as request attribute at org.springframework.web.servlet.support.BindStatus.<init>(BindStatus.java:141) at org.springframework.web.servlet.tags.form.AbstractDataBoundFormElementTag.getBindStatus(AbstractDataBoundFormElementTag.java:175) at org.springframework.web.servlet.tags.form.AbstractDataBoundFormElementTag.getPropertyPath(AbstractDataBoundFormElementTag.java:195) at org.springframework.web.servlet.tags.form.AbstractDataBoundFormElementTag.getName(AbstractDataBoundFormElementTag.java:161) at org.springframework.web.servlet.tags.form.AbstractDataBoundFormElementTag.writeDefaultAttributes(AbstractDataBoundFormElementTag.java:124) at org.springframework.web.servlet.tags.form.AbstractHtmlElementTag.writeDefaultAttributes(AbstractHtmlElementTag.java:409) at org.springframework.web.servlet.tags.form.InputTag.writeTagContent(InputTag.java:140) at org.springframework.web.servlet.tags.form.AbstractFormTag.doStartTagInternal(AbstractFormTag.java:91) at org.springframework.web.servlet.tags.RequestContextAwareTag.doStartTag(RequestContextAwareTag.java:78) ... IO Error executing tag: JSPException including path '/WEB-INF/views/foobar/create.jspx'. org.apache.tiles.util.TilesIOException: JSPException including path '/WEB-INF/views/foobar/create.jspx'. at org.apache.tiles.servlet.context.ServletUtil.wrapServletException(ServletUtil.java:232) at org.apache.tiles.jsp.context.JspTilesRequestContext.include(JspTilesRequestContext.java:105) at org.apache.tiles.jsp.context.JspTilesRequestContext.dispatch(JspTilesRequestContext.java:96) at org.apache.tiles.renderer.impl.UntypedAttributeRenderer.write(UntypedAttributeRenderer.java:61) at org.apache.tiles.renderer.impl.AbstractBaseAttributeRenderer.render(AbstractBaseAttributeRenderer.java:103) at org.apache.tiles.impl.BasicTilesContainer.render(BasicTilesContainer.java:669) at org.apache.tiles.impl.BasicTilesContainer.render(BasicTilesContainer.java:337) at org.apache.tiles.jsp.taglib.InsertAttributeTag.render(InsertAttributeTag.java:234) at org.apache.tiles.jsp.taglib.InsertAttributeTag.render(InsertAttributeTag.java:211) at org.apache.tiles.jsp.taglib.RenderTag.doEndTag(RenderTag.java:220) .... {quote} Note: Create form will work as expected after change modelAttribute in jsp and controller to 'fooBar'(not foobar).
    via by Sid,
  • In Roo 1.1.0.M1 [rev 684]: In create.tagx and update.tagx, the modelAttribute of the form tag is calculated like this: {code} <form:form ... modelAttribute="${fn:toLowerCase(object.class.simpleName)}"> {code} This gives wrong results for Entity names that consist of more than one "part". Consider, f.e. an Entity "FooBar". the model attribute would become "foobar" in the code above. On the other hand, the according controller would add a model attribute "fooBar" to the model map, which does not match with "foobar". This results in {code} java.lang.IllegalStateException: Neither BindingResult nor plain target object for bean name 'foobar' available as request attribute at org.springframework.web.servlet.support.BindStatus.<init>(BindStatus.java:141) at org.springframework.web.servlet.tags.form.AbstractDataBoundFormElementTag.getBindStatus(AbstractDataBoundFormElementTag.java:174) at org.springframework.web.servlet.tags.form.AbstractDataBoundFormElementTag.getPropertyPath(AbstractDataBoundFormElementTag.java:194) at org.springframework.web.servlet.tags.form.AbstractDataBoundFormElementTag.getName(AbstractDataBoundFormElementTag.java:160) at org.springframework.web.servlet.tags.form.AbstractDataBoundFormElementTag.writeDefaultAttributes(AbstractDataBoundFormElementTag.java:123) at org.springframework.web.servlet.tags.form.AbstractHtmlElementTag.writeDefaultAttributes(AbstractHtmlElementTag.java:409) at org.springframework.web.servlet.tags.form.InputTag.writeTagContent(InputTag.java:140) at org.springframework.web.servlet.tags.form.AbstractFormTag.doStartTagInternal(AbstractFormTag.java:102) at org.springframework.web.servlet.tags.RequestContextAwareTag.doStartTag(RequestContextAwareTag.java:79) at org.apache.jsp.tag.web.form.fields.input_tagx._jspx_meth_form_005finput_005f0(input_tagx.java:579) at org.apache.jsp.tag.web.form.fields.input_tagx.doTag(input_tagx.java:294) {code}
    via by Stefan Ocke,
  • In Roo 1.1.0.M1 [rev 684]: In create.tagx and update.tagx, the modelAttribute of the form tag is calculated like this: {code} <form:form ... modelAttribute="${fn:toLowerCase(object.class.simpleName)}"> {code} This gives wrong results for Entity names that consist of more than one "part". Consider, f.e. an Entity "FooBar". the model attribute would become "foobar" in the code above. On the other hand, the according controller would add a model attribute "fooBar" to the model map, which does not match with "foobar". This results in {code} java.lang.IllegalStateException: Neither BindingResult nor plain target object for bean name 'foobar' available as request attribute at org.springframework.web.servlet.support.BindStatus.<init>(BindStatus.java:141) at org.springframework.web.servlet.tags.form.AbstractDataBoundFormElementTag.getBindStatus(AbstractDataBoundFormElementTag.java:174) at org.springframework.web.servlet.tags.form.AbstractDataBoundFormElementTag.getPropertyPath(AbstractDataBoundFormElementTag.java:194) at org.springframework.web.servlet.tags.form.AbstractDataBoundFormElementTag.getName(AbstractDataBoundFormElementTag.java:160) at org.springframework.web.servlet.tags.form.AbstractDataBoundFormElementTag.writeDefaultAttributes(AbstractDataBoundFormElementTag.java:123) at org.springframework.web.servlet.tags.form.AbstractHtmlElementTag.writeDefaultAttributes(AbstractHtmlElementTag.java:409) at org.springframework.web.servlet.tags.form.InputTag.writeTagContent(InputTag.java:140) at org.springframework.web.servlet.tags.form.AbstractFormTag.doStartTagInternal(AbstractFormTag.java:102) at org.springframework.web.servlet.tags.RequestContextAwareTag.doStartTag(RequestContextAwareTag.java:79) at org.apache.jsp.tag.web.form.fields.input_tagx._jspx_meth_form_005finput_005f0(input_tagx.java:579) at org.apache.jsp.tag.web.form.fields.input_tagx.doTag(input_tagx.java:294) {code}
    via by Stefan Ocke,
  • View Forum Topic
    via by Unknown author,
  • Spring 3 -- Another IllegalStateException
    via Stack Overflow by Frank
    ,
    • java.lang.IllegalStateException: Neither BindingResult nor plain target object for bean name 'foobar' available as request attribute at org.springframework.web.servlet.support.BindStatus.<init>(BindStatus.java:141) at org.springframework.web.servlet.tags.form.AbstractDataBoundFormElementTag.getBindStatus(AbstractDataBoundFormElementTag.java:175) at org.springframework.web.servlet.tags.form.AbstractDataBoundFormElementTag.getPropertyPath(AbstractDataBoundFormElementTag.java:195) at org.springframework.web.servlet.tags.form.AbstractDataBoundFormElementTag.getName(AbstractDataBoundFormElementTag.java:161) at org.springframework.web.servlet.tags.form.AbstractDataBoundFormElementTag.writeDefaultAttributes(AbstractDataBoundFormElementTag.java:124) at org.springframework.web.servlet.tags.form.AbstractHtmlElementTag.writeDefaultAttributes(AbstractHtmlElementTag.java:409) at org.springframework.web.servlet.tags.form.InputTag.writeTagContent(InputTag.java:140) at org.springframework.web.servlet.tags.form.AbstractFormTag.doStartTagInternal(AbstractFormTag.java:91) at org.springframework.web.servlet.tags.RequestContextAwareTag.doStartTag(RequestContextAwareTag.java:78)

    Users with the same issue

    Unknown visitor
    Unknown visitor1 times, last one,
    Unknown visitor
    Unknown visitor1 times, last one,
    Unknown visitor
    Unknown visitor1 times, last one,
    abrazenebabrazeneb
    8 times, last one,
    Unknown visitor
    Unknown visitor1 times, last one,
    16 more bugmates