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


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

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


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

          常用鏈接

          留言簿

          隨筆檔案

          文章檔案

          搜索

          •  

          最新評論

          閱讀排行榜

          評論排行榜

          主站蜘蛛池模板: 墨玉县| 健康| 宁化县| 文化| 新宾| 凤冈县| 英德市| 苏尼特右旗| 西青区| 社旗县| 礼泉县| 高陵县| 托克托县| 铜梁县| 湘乡市| 理塘县| 临颍县| 连江县| 开封县| 余庆县| 阳新县| 安丘市| 苍山县| 闽清县| 孝义市| 新密市| 舞阳县| 方山县| 屯昌县| 嘉鱼县| 鸡泽县| 桐梓县| 安达市| 江孜县| 虎林市| 伊川县| 申扎县| 杂多县| 读书| 龙江县| 福清市|