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

          常用鏈接

          留言簿

          隨筆檔案

          文章檔案

          搜索

          •  

          最新評論

          閱讀排行榜

          評論排行榜

          主站蜘蛛池模板: 大同市| 咸宁市| 淮阳县| 应城市| 津南区| 抚宁县| 互助| 广灵县| 察哈| 景东| 张掖市| 雷波县| 仁化县| 大冶市| 灌云县| 苏尼特右旗| 航空| 金沙县| 崇礼县| 宣汉县| 万荣县| 凤凰县| 中西区| 沂源县| 贵港市| 乌鲁木齐县| 博罗县| 台山市| 清涧县| 碌曲县| 四子王旗| 厦门市| 醴陵市| 尉氏县| 霞浦县| 新干县| 瑞安市| 东乌珠穆沁旗| 察哈| 耒阳市| 青岛市|