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 老天 閱讀(389) 評論(1)  編輯  收藏


          FeedBack:
          # re: ssh框架學習記錄
          2013-01-16 10:48 | 免費網絡記事本
          暈,還以為是linux 下的ssh呢-_-!  回復  更多評論
            

          只有注冊用戶登錄后才能發表評論。


          網站導航:
           
          <2013年1月>
          303112345
          6789101112
          13141516171819
          20212223242526
          272829303112
          3456789

          常用鏈接

          留言簿

          隨筆檔案

          文章檔案

          搜索

          •  

          最新評論

          閱讀排行榜

          評論排行榜

          主站蜘蛛池模板: 烟台市| 宜黄县| 密云县| 道孚县| 定兴县| 阿图什市| 广安市| 安仁县| 兰州市| 合作市| 镇江市| 山阳县| 手机| 饶河县| 阳信县| 青海省| 罗城| 法库县| 许昌市| 保康县| 建阳市| 蓝山县| 如东县| 金坛市| 济阳县| 日照市| 南江县| 台江县| 崇仁县| 大同市| 循化| 营口市| 社会| 古蔺县| 满洲里市| 华容县| 沾益县| 盖州市| 临沭县| 上林县| 临泽县|