随记
gameboard_cn
zjb.bill@gmail.com
展开
-
java电子字典
这段时间,在写个背单词的软件,就顺手写了个电子词典, 等完成了一起发布初期找了好久字典库,发现网上没有公开的字典库,都是有版权的,而且还加密了,比如灵格斯的,都加密了,最后选了用星际译王 早前用的牛津 词典库,也是要版权的,星际译王也侵权用了,也没办法了,反正写来自用 ,原创 2011-10-01 03:36:25 · 855 阅读 · 1 评论 -
ssh4+ maven 单元测试中ClassFormatError javax/validation/Validation
org.springframework.beans.factory.BeanCreationException: Error creating bean with name 'sessionFactory' defined in class path resource [applicationContext.xml]: Invocation of init method failed; neste原创 2013-01-23 17:28:55 · 2264 阅读 · 1 评论 -
hibernate 中没事不要用映射文件中用<list>定义合集,而要是用Set
用了 表示你将要额处维护多一个字段的连续性和唯一性,看下面user.ordersorder.user user和order是双向一对多如果在user.hbm.xml中 假若你的order_id 是不连续的,比如user有三个定原创 2013-01-02 13:34:33 · 505 阅读 · 0 评论 -
hibernate 中HQL delete 级联问题
假若我要删除用户表的所有用户记录。使用HQL中使用 delete from User ,因为HQL是绕过session和sessionFactory缓存(如果有的话),这意味着,session将不会觉察到user的变化,若当时session缓存里有user的数据,那将是过时的数据,库表里已经不存在了。那么session连user不在也不知道,更不用说user一对多关联的 order表的记原创 2013-01-02 13:48:51 · 2051 阅读 · 0 评论 -
一次请求出现 Client两次向Server发出请求的奇怪现象
我在做c/s软件时,发现一次请求出现 Client两次向Server发出请求的奇怪现象:由于刚开始时,Server端我只是简单的接收请求,并没有写“响应文”(如“HTTP/1.1 200 OK\r\n ”)给Client 就用socket.close()接束了连接。Client端很费解,所以向Server再次发送请求。总结,在Server端要好好老实回答Client的请求原创 2012-11-02 10:52:55 · 957 阅读 · 0 评论 -
ssh中如果遇到 xxx is not valid without active transaction
ssh中,我用了spring+strut2+hibernate(原生hibernate API ,就是dao类中不用spring的hibernateTemplate或hibernateDaoSupport类) 出现了org.hibernate.HibernateException:xxx is not valid without active transaction.查了下网,结果是 不原创 2012-05-24 01:46:25 · 1206 阅读 · 1 评论 -
netbean--- Exception in thread "main" java.lang.VerifyError: Constructor must call super() or thi
某天用netbean 运行往日正常的java文件 出了这类的异常,无法运行, Exception in thread "main" java.lang.VerifyError: ...............略................... Constructor must call super() or this()后来google了下,某位反映原创 2012-01-08 05:48:07 · 2817 阅读 · 1 评论 -
修改 visual studio 2010 蛋痛的界面颜色 和字体颜色
打开 Tools\Extension Manager ,在框里搜索“visual studio color theme editor” 下载 安装, 重启后多了个theme菜单, 可以随意改外面颜色了,要改字体颜色,选个自己喜欢的主题,再点theme\ customize colors 打开客户化界面,在界面了搜"text" 会list出一项叫"CommanBarTextActive",对这原创 2011-10-31 19:39:53 · 2243 阅读 · 0 评论 -
把hibernate.cfg.xml 加到 spring的applictionContext.xml的sessionFactory中
classpath:hibernate.cfg.xml hibernate.cfg.xml的配置像平常的hibernate应用一样,好处是spring 的归applictionContext.xml , hibernate 的归hibernate.cfg.xml ,分而治之原创 2011-11-18 16:39:23 · 410 阅读 · 0 评论 -
hibernate4 与 hibernate3-maven-plugin 不兼容
hibernate4 与 hibernate3-maven-plugin 不兼容 目前hibernate4的周边还跟不上,与spring3整合也问题多多,没事还是用hibernate3好了原创 2013-01-21 17:28:37 · 664 阅读 · 0 评论