posts - 15,  comments - 4,  trackbacks - 0
Struts2的下载地址:
http://struts.apache.org/download.cgi
目前建议下载版本:2.2.1GA版

Hibernate下载地址:
http://www.hibernate.org/downloads
目前建议下载版本:3.6.0 Final版

Spring的下载地址:
http://www.springsource.org/download
目前建议下载版本:稳定版3.0.5

 
 
 
2013-1-15  
1、struts2  top关键字理解。 
1).top 指代当前迭代元素,可以为对象;
2).这里的top可用[0].top替代,但不能使用[0];[0]代表整个栈对象。如果单纯调用[0]将会调用其 toString()方法输出对象信息;



2、删除信息时错误日志:
java.lang.IllegalArgumentException: Removing a detached instance

 Detached - a detached instance is an object that has been persistent, but its Session has been closed. The reference to the

      object is still valid, of course, and the detached instance might even be modified in this state. A detached instance can be

      reattached to a new Session at a later point in time, making it (and all the modifications) persistent again

      现在应该明白了吧,在删除之前把这个Detached instance绑定到当前的Sesssion,在用当前Sesssion删除此instance。修改后的代码如


解决办法:
public void delete(SASVo  vo) {
               entityManager.remove( entityManager.merge(vo));
        }
posted on 2013-01-15 16:54 老天 阅读(368) 评论(1)  编辑  收藏


FeedBack:
# re: ssh框架学习记录
2013-01-16 10:48 | 免费网络记事本
晕,还以为是linux 下的ssh呢-_-!  回复  更多评论
  

只有注册用户登录后才能发表评论。


网站导航:
 
<2013年1月>
303112345
6789101112
13141516171819
20212223242526
272829303112
3456789

常用链接

留言簿

随笔档案

文章档案

搜索

  •  

最新评论

阅读排行榜

评论排行榜