小狼最近在玩懒加载,出现这个问题
org.hibernate.LazyInitializationException: could not initialize proxy - no Session
at org.hibernate.proxy.AbstractLazyInitializer.initialize(AbstractLazyInitializer.java:165)
...
分类:
Web程序 时间:
2015-03-30 16:38:41
阅读次数:
195
把BaiduLBS_Android.jar和armeabi都放在工程的lib下就解决了,还没搞懂根本原因是啥,等后面明白了再更新。SDKInitializer.initialize(getApplication());参数别用错了;而且这句话一定写在activity的oncreate里protect...
分类:
移动开发 时间:
2015-03-29 00:34:53
阅读次数:
2940
在stackoverflow 上面找到一篇介绍 使用了hibernate.enable_lazy_load_no_trans的处理,配置后解决了错误:com.alexgaoyhnone${hibernate.dialect}${hibernate.show_sql}true${hibernate.h...
分类:
Web程序 时间:
2015-03-28 18:35:27
阅读次数:
145
类的加载和初始化+ (void)load 方法 ① 当程序一启动就会把所有类和分类而且加载后就会调用每个类的+load方法只会调用一次、 ② 先加载父类在加载子类,每个类加载完就会调用load方法2 、 + (void)initialize 方法 ① 当第一次使用这个类时就会调用 + (void)i...
分类:
其他好文 时间:
2015-03-21 22:44:07
阅读次数:
200
Notes:1. When check left shifting, do not use continue, but break it!!! Otherwise, you wil fall into infinite loop2. Initialize the map with T, not S!...
Simple DP, but notes:1. initialize the array not only for dp[i] += dp[i-1], but also dp[i] += dp[i-1] + grid[i][0];2. Clear that we are using one dime...
分类:
其他好文 时间:
2015-03-21 08:35:36
阅读次数:
115
Notes:1. Do not forget to check xi == xj. It will cause INF.2. DO not forget to initialize the iterator. 1 /** 2 * Definition for a point. 3 * struc.....
分类:
其他好文 时间:
2015-03-20 09:17:17
阅读次数:
93
Not quite hard. Just remember initialize index to 0. Because if you initialize it as -1 and all the gas satisfy the cost, it will return -1.Actually, ...
分类:
其他好文 时间:
2015-03-20 01:11:41
阅读次数:
210
最近在研究coredata,按照例子敲了一遍发现例子可以运行,但是运行报错,Failed to initialize the application's saved data,还有就是什么sqlite路径错误,反正报错可长可多,明明代码一样的这是什么错误呢,我的理解是例子已经创建了那个名字的core...
分类:
移动开发 时间:
2015-03-18 15:39:35
阅读次数:
142
Firstly , let us explain XMLHttpRequest open(), send(), readyState1. open(method, url, async, user, password) : create request, initialize parameters ...
分类:
Web程序 时间:
2015-03-14 13:37:39
阅读次数:
138