Spring对象中的Bean对象不能为null

时间:2014-02-14 12:11:16

标签: java spring-mvc

OptionsTag    E org.springframework.web.servlet.tags.RequestContextAwareTag doStartTag Bean object must not be null
                             java.lang.IllegalArgumentException: Bean object must not be null
at org.springframework.util.Assert.notNull(Assert.java:112)
at org.springframework.beans.BeanWrapperImpl.setWrappedInstance(BeanWrapperImpl.java:213)
at org.springframework.beans.BeanWrapperImpl.setWrappedInstance(BeanWrapperImpl.java:202)
at org.springframework.beans.BeanWrapperImpl.<init>(BeanWrapperImpl.java:152)
at org.springframework.beans.PropertyAccessorFactory.forBeanPropertyAccess(PropertyAccessorFactory.java:37)
at org.springframework.web.servlet.tags.form.OptionWriter.doRenderFromCollection(OptionWriter.java:199)
at org.springframework.web.servlet.tags.form.OptionWriter.renderFromCollection(OptionWriter.java:180)
at org.springframework.web.servlet.tags.form.OptionWriter.writeOptions(OptionWriter.java:133)
at org.springframework.web.servlet.tags.form.OptionsTag.writeTagContent(OptionsTag.java:168)
at org.springframework.web.servlet.tags.form.AbstractFormTag.doStartTagInternal(AbstractFormTag.java:102)
at org.springframework.web.servlet.tags.RequestContextAwareTag.doStartTag(RequestContextAwareTag.java:79)
at com.ibm._jsp._searchNAV._jspx_meth_form_options_0(_searchNAV.java:262)
at com.ibm._jsp._searchNAV._jspx_meth_form_select_0(_searchNAV.java:304)
at com.ibm._jsp._searchNAV._jspx_meth_form_form_0(_searchNAV.java:442)

我收到上述错误消息,我以前没见过。请帮助我。

1 个答案:

答案 0 :(得分:2)

在JPA存储库中保存实体时出现类似错误。原来它只是我传递的对象是空的......