org.hibernate.LazyInitializationException: could not initialize proxy - no Session
使用Hibernate延迟加载的时候报错了,原因是session提前关闭
解决方法1、不使用lazy,也就是@OneToO...
分类:
系统相关 时间:
2014-09-18 14:46:03
阅读次数:
202
1、将java.util.Date转换为java.sql.Datejava.sql.Date sd;java.util.Date ud;//initialize the ud such as ud = new java.util.Date();sd = new java.sql.Date(ud.ge...
分类:
移动开发 时间:
2014-09-18 13:16:53
阅读次数:
240
一、创建数据库1、创建一个名为“test”的数据库db2 “create database test automatic storage yes on ‘/home/db2inst1/dbdata’ dbpath on ‘/home/db2inst1/dbctl’using codeset utf-...
分类:
数据库 时间:
2014-09-17 23:07:22
阅读次数:
1594
步骤 创建一排的Button,及一个右边的Button 2、查看Button的属性里有一栏下拉列表Navigation,默认选择的是 Automatic(自动) 3、在Navigation的下方有一个Visualize(可视化)按钮 4、点击 Visualize之后,在Scene里可以看到清晰的UI...
分类:
其他好文 时间:
2014-09-15 15:29:39
阅读次数:
564
相关代码链接: http://git.oschina.net/alexgaoyh/alexgaoyh ????????上周在编写hibernate4的相关代码的时候,出现异常 org.hibernate.LazyInitializationException: could not initial...
分类:
系统相关 时间:
2014-09-15 11:31:38
阅读次数:
234
1.当程序启动时,就会加载项目中所有的类和分类,而且加载后会调用每个类和分类的+load方法。只会调用一次。2.当第一次使用某个类时,就会调用当前类的+initialize方法3.先加载父类,再加载子类(先调用父类的+load方法,再调用子类的+load方法) 先初始化父类,再初始化子类(先调用父....
分类:
其他好文 时间:
2014-09-14 23:25:57
阅读次数:
197
'release' is unavailable: not available in automatic reference counting modeARC forbids explicit message send of'release''release' is unavailable: not...
分类:
其他好文 时间:
2014-09-13 20:07:45
阅读次数:
140
ARC forbids explicit message send of ‘release‘ ‘release‘ is unavailable: not available in automatic reference counting mode 今天,遇到了这么样的问题。 很显然,是ARC的问题。 错误原因:因为我们设置...
分类:
其他好文 时间:
2014-09-09 23:11:09
阅读次数:
920
错误页面提示could not initialize proxy - no Session控制台org.hibernate.LazyInitializationException: could not initialize proxy - no Session病症:这是一个lazy使用后的Excep...
分类:
系统相关 时间:
2014-09-05 17:45:31
阅读次数:
191
在 首选项 中,Android--> Build 下,有一个复选框: skip packaging and dexing until export or launch.(Speed up automatic builds on file save )取消该选项,再重新cleanup一下,即可在bin...
分类:
系统相关 时间:
2014-09-04 10:28:59
阅读次数:
238