问答详情
源自:4-1 SSH-案例:分页查询员工

增加和修改部门返回的值为NULL,一直报Could not create and/or set value back on to object,求助

评论和问答区的方法都试过了。。。之前只有修改员工的部门会返回空值,后来连增加员工信息的部门也会变成空。在数据库上输入dno能在表单查到,在表单修改就为空,jsp页面也没有写错:<td>所属部门:</td>
<td><s:select name="department.did" list="list" listKey="did" listValue="dname" headerKey="" headerValue="----请--选--择----"/></td>

下面是控制台报的错:
DAO中查询所有部门方法执行了。。。Hibernate:
    select        department0_.did as did0_,        department0_.pname as pname0_,        department0_.introduction as introduc3_0_    
from       
department department0_
10:41:49,899 ERROR InstantiatingNullHandler:42 - Could not create and/or set value back on to object
java.lang.IllegalArgumentException at org.springframework.asm.ClassReader.<init>(Unknown Source) at org.springframework.asm.ClassReader.<init>(Unknown Source) at org.springframework.asm.ClassReader.<init>(Unknown Source) at org.springframework.core.LocalVariableTableParameterNameDiscoverer.inspectClass(LocalVariableTableParameterNameDiscoverer.java:110) at org.springframework.core.LocalVariableTableParameterNameDiscoverer.getParameterNames(LocalVariableTableParameterNameDiscoverer.java:85) at org.springframework.beans.factory.support.ConstructorResolver.autowireConstructor(ConstructorResolver.java:193) at org.springframework.beans.factory.support.AbstractAutowireCapableBeanFactory.autowireConstructor(AbstractAutowireCapableBeanFactory.java:1051) at org.springframework.beans.factory.support.AbstractAutowireCapableBeanFactory.autowire(AbstractAutowireCapableBeanFactory.java:344) at com.opensymphony.xwork2.spring.SpringObjectFactory.buildBean(SpringObjectFactory.java:194)

这个问题困扰了我好久,百度一下发现好多人都有这个问题,本来以为是spring3的getHibernateTimplate().find()方法过期了,可是评论区有用spring4的还是报同样的问题,希望解决的大佬回复一下

提问者:工作细胞 2019-06-25 10:54

个回答