异常总结,持续更新

1,spring

org.hibernate.PropertyAccessException: Null value was assigned to a property of primitive type setter of cn.hp.entity.Emp.comm

原因是实体类中所对应的属性值都要使用包装类,因为包装类为空的情况下,默认值为null,这说明hibernate中的实体属性都要使用包装类

2,BeanFactory not initialized or already closed - call 'refresh' before accessing beans via the ApplicationContext

如果是在web.xml文件中配置的Spring。可能是 <description>SpringConfig</description>
<param-name>contextConfigLocation</param-name>
<param-value>classpath:applicationContext.xml</param-value>
</context-param>

中间的单词出错
,3,ssh整合中
org.springframework.beans.factory.BeanCreationException: Error creating bean with name ‘qjtAction’ defined in file [C:\apache-tomcat-7.0.26\webapps\QingJia\WEB-INF\classes\cn\hp\action\QjtAction.class]: Instantiation of bean failed; nested exception is org.springframework.beans.BeanInstantiationException: Could not instantiate bean class [cn.hp.action.QjtAction]: Constructor threw exception; nested exception is java.lang.NullPointerException

Caused by: org.springframework.beans.BeanInstantiationException: Could not instantiate bean class [cn.hp.action.QjtAction]: Constructor threw exception; nested exception is java.lang.NullPointerException
有可能是在action类中使用的实体类没有空的构造函数

4,org.springframework.beans.factory.BeanNotOfRequiredTypeException: Bean named ‘empbiz’ must be of type [cn.hp.biz.EmpBizImpl], but was actually of type [$Proxy27]

这种一直提醒说是注入的bean有问题,因为在action中注入后声明的对象时具体类的才出错,应该是声明抽象类的对象

  • 0
    点赞
  • 0
    收藏
    觉得还不错? 一键收藏
  • 0
    评论

“相关推荐”对你有帮助么?

  • 非常没帮助
  • 没帮助
  • 一般
  • 有帮助
  • 非常有帮助
提交
评论
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

当前余额3.43前往充值 >
需支付:10.00
成就一亿技术人!
领取后你会自动成为博主和红包主的粉丝 规则
hope_wisdom
发出的红包
实付
使用余额支付
点击重新获取
扫码支付
钱包余额 0

抵扣说明:

1.余额是钱包充值的虚拟货币,按照1:1的比例进行支付金额的抵扣。
2.余额无法直接购买下载,可以购买VIP、付费专栏及课程。

余额充值