预览模式: 普通 | 列表
07-08
24

exception setting property value with CGLIB set 错误

今天做商城购物的时候,再原有表基础上加了一个double类型的字段,抛出了这个异常:
exception setting property value with CGLIB (set hibernate.cglib.use_reflection_optimizer=false for more info) setter of...
原因:查询结果中包含null的项  对于一些数字项包含null,定义该项时必须使用wrapper类型,而不能是primitive类型,例如使用Integer等,而不能是int否则会抛出exception!
解决:映射为int,double的字段,在建表时,某些int或者double字段的default 0,导致exception setting property value with CGLIB setter 这些字段出错.这些字段最后都有默认值.设置好默认值问题就可以解决了。

查看更多...

Tags: Exception CGLIB

分类:Hibernate | 固定链接 | 评论: 1 | 引用: 0 | 查看次数: 2011
07-08
23

寂寞的季节


     前两年,月赚近万,生活亦无节束。现在看来当时的很多是运气。原以为还年轻,以为这样的机会在人生中会时不时的来上一次。而意识到情况并非如此,则是后来的事了。
     来到这个单位后,越发觉得自己是孤独。除了工作上的事以外,身边事和自己都沾不上关系。下班回家,身边的两个女同事叽叽喳喳的说个不停。一路上我自己的脑子也不知道在想些什么,只管低头走路。也没人注意到我,像是一个透明人。
     快入秋了,下了一场雨,一天凉比一天。想起了陶喆的《寂寞的季节》,好久,好久没有弹吉他唱歌,也没人陪。

查看更多...

Tags: 从良

分类:生活 | 固定链接 | 评论: 0 | 引用: 0 | 查看次数: 722
07-08
22

argument type mismatch异常

argument type mismatch异常:
这表明有部分属性的数据类型不匹配,比如下列情况

当我们有一个HIBERNATE实体,并且在表单提交到ACTION后,并不想强转为 ACTIONFORM,而是想将 FORM直接转成HIBERNATE实体如下:

  原本情况: UserForm userForm=(UserForm)form;

  现情况: User user=(User)form;或你有BEANUTIL这个工具的写法是User user=BeanUtils.copyProperties(new User(), form);

查看更多...

Tags: 异常

分类:Struts | 固定链接 | 评论: 2 | 引用: 0 | 查看次数: 4773
07-08
22

ObjectNotFoundException: No row with the given ide

郁闷了好久,终于在goole上找到了错误原因
ObjectNotFoundException: No row with the given identifier exists
Where it can occur:

This might occur if you try to load a non-proxied object with session.load() or you load a proxied object and later access the proxy. It may also occur when loading mapped collections which are not eagerly fetched.
What it means:

This means just what it says - Hibernate expected to have a row with a certain id in the database, and did however not find it.
How it can be caused:

查看更多...

分类:Hibernate | 固定链接 | 评论: 0 | 引用: 0 | 查看次数: 872
07-08
20

如何实现QQ在线客服

<script>
var online= new Array();
</script>
<script src="http://webpresence.qq.com/getonline?Type=1&13137813:"></script>
<script>
if (online[0]==0)
document.write(" <img src=qq/QQoffline.gif border=0 align=middle><a class='qqb' target=blank href='http://wpa.qq.com/msgrd?V=1&Uin=qq号码&Site=在线咨询&Menu=no' title='客服不在线,请留言'>qq号码</a>");
else
document.write(" <img src=qq/QQonline.gif border=0 align=middle><a class='qqa' target=blank href='http://wpa.qq.com/msgrd?V=1&Uin=qq号码&Site=在线咨询&Menu=no' title='在线即时交谈'>qq号码</a>");

查看更多...

分类:Css&Ps | 固定链接 | 评论: 0 | 引用: 0 | 查看次数: 1563
07-08
19

StandardWrapperValve[action]: Servlet action is cu

Servlet action is currently unavailable

这个常见的Struts问题,可能是jar文件不全引起的(至少我遇到时是这样)
分类:Struts | 固定链接 | 评论: 0 | 引用: 0 | 查看次数: 908