保存 JSP 表单时出错:.lang.NoSuchMethodError: com.abc.bean.enqformbe



表单数据保存到Oracle数据库时出现问题。

首先,问题是:

 org.hibernate.PropertyAccessException: Null value was assigned to a  
property of primitive type setter of 
com.abc.bean.enqformbean.EnqBean.enqAllocation

在 bean 类中,变量声明为 Integer enqAllocation而在二传手和吸气手方法中,它是int.

将该变量的 setter 和 getter 方法更改为 Integer,现在我收到一个错误:

 java.lang.NoSuchMethodError: 
 com.abc.bean.enqformbean.EnqBean.setEnqAllocation(I)V

不知道这个错误是什么意思。类路径也会生成并重新启动服务器。但是在保存数据时出现上述错误。任何人都可以告诉我上述错误是什么意思吗?

EnqBean类:

private Integer enqAllocation;
public Integer getEnqAllocation() {
    return enqAllocation;
}
public void setEnqAllocation(Integer enqAllocation) {
    this.enqAllocation= enqAllocation;
}
此错误

意味着具有签名的方法

void setEnqAllocation(int);

找不到 int 类 com.abc.bean.enqformbean.EnqBean

相关内容

最新更新