在做开发过程中总会遇上些无厘头的错误,收集了些开发点滴,希望后来者不会踩上同一个陷阱,
1.Q:An error occured in the bean. Error Message is: Failed to lazily initialize a collection - no session or session was closed
A:未初始化加载
2. Q:org.springframework.beans.factory.BeanDefinitionStoreException: Error registering bean with name '' defined in resource [/WEB-INF/applicationContext-PoService.xml] of ServletContext: Bean class [com.itorgan.lherp.dao.impl.PoReceiveDAOImpl] not found; nested exception is java.lang.ClassNotFoundException: com.itorgan.lherp.dao.impl.PoReceiveDAOImpl
A:重启TOMCAT
3. Q:An error occured in the bean. Error Message is: An error occurred while evaluating custom action attribute "value" with value "${poItem.poItemNo}": Unable to find a value for "poItemNo" in object of class "com.itorgan.lherp.vo.PoReceiveItem" using operator "." (null)
A:变量${poItem.poItemNo}与VO com.itorgan.lherp.vo.PoReceiveItem 无法绑定
4. Q:org.springframework.dao.DataIntegrityViolationException: Hibernate operation: ORA-02291: integrity constraint (LH.FK_PO_RECEIVE_CUSTOMER_NO) violated - parent key not found
; nested exception is java.sql.BatchUpdateException: ORA-02291: integrity constraint (LH.FK_PO_RECEIVE_CUSTOMER_NO) violated - parent key not found
A:有对象未绑定
5. Q:vo配置文件解释
A:*大写的部分inverse="true"表示 ParentPO 本身不维护表之间的关系!,而由想反的一方 children来维护,
*CASCADE=“ALL”表示 无论是update,insert ,delete 都保持几连关系
*lazy="true"表示初始化父亲的时候不会把所有的儿子都从数据库中load进来。
6. Q:org.springframework.jdbc.BadSqlGrammarException: Bad SQL grammar [] in task 'Hibernate operation'; nested exception is java.sql.SQLException: ORA-02289: sequence does not exist
A:VO中的sequence写错
7. Q:java.lang.ClassCastException: [Ljava.lang.String;
A:类型转换错误,数据库是否有重复记录
分享到:
相关推荐
开发基于Struts Spring Hibernate Ajax开发基于Struts Spring Hibernate Ajax
spring mvc + spring + hibernate 全注解整合开发视频教程 11
sturts1 spring hibernate开发的详细介绍sturts1 spring hibernate开发的详细介绍sturts1 spring hibernate开发的详细介绍
Struts Hibernate Spring Ajax Struts Hibernate Spring Ajax
springmvc spring hibernate整合Demo 包含了CRUD 帮助初学者快速学习springmvc
spring mvc + spring + hibernate 全注解整合开发视频教程 12
开发环境设置struts2 spring hibernate,整合的大集合,很详细的解释答
适合初学者,快速了解struts+spring+hibernate开发 注册小程序 含有SSHjar包
Struts2 Spring Hibernate IBatis Struts2 Spring Hibernate IBatisStruts2 Spring Hibernate IBatisStruts2 Spring Hibernate IBatis 只需要导入相应的jar包就行了 ,数据库是mysql :数据库名叫做mydatabase,表名...
开发基于Struts Spring Hibernate Ajax的网上信息发布平台(Struts Hibernate Spring Ajax)--Chapter1
Struts Spring Hibernate 开发实例
StrutsSpringHibernate开发需求Jar包
Spring hibernate开发的网上支付
基于struts2 spring hibernate开发的bbs论坛,供初学者学习。
Struts+Spring+Hibernate开发实例.pdf
j2ee开发(sturts spring hibernate 开发) 简单的crud 操作
struts2 spring hibernate框架技术与项目实战 光盘源码 上 资源150M必须分成3部分上中下
spring-hibernate.jar
Struts+Spring+Hibernate整合开发详解
《疯狂Ajax讲义:Prototype/jQuery+DWR+Spring+Hibernate整合开发》是《基于J2EE的Ajax宝典》的第二版。《基于J2EE的Ajax宝典》面市近2年,作为Ajax领域最全面、实用的图书,一直深受读者的好评。全书主要分为三个...