<rt id="bn8ez"></rt>
<label id="bn8ez"></label>

  • <span id="bn8ez"></span>

    <label id="bn8ez"><meter id="bn8ez"></meter></label>

    2008年9月7日

    NonUniqueObjectException

    org.hibernate.NonUniqueObjectException: a different object with the same identifier value was already associated with the session

    首先看看這個類:
    //$Id: NonUniqueObjectException.java,v 1.4 2005/02/12 07:19:50 steveebersole Exp $
    2
    package org.hibernate;
    3
    4 import java.io.Serializable JavaDoc;
    5
    6 import org.hibernate.pretty.MessageHelper;
    7
    8 /**
    9  * This exception is thrown when an operation would
    10  * break session-scoped identity. This occurs if the
    11  * user tries to associate two different instances of
    12  * the same Java class with a particular identifier,
    13  * in the scope of a single <tt>Session</tt>.
    14  *
    15  * @author Gavin King
    16  */

    17 public class NonUniqueObjectException extends HibernateException {
    18     private final Serializable JavaDoc identifier;
    19     private final String JavaDoc entityName;
    20
    21     public NonUniqueObjectException(String JavaDoc message, Serializable JavaDoc id, String JavaDoc clazz) {
    22         super(message);
    23         this.entityName = clazz;
    24         this.identifier = id;
    25     }
    26
    27     public NonUniqueObjectException(Serializable JavaDoc id, String JavaDoc clazz) {
    28         this("a different object with the same identifier value was already associated with the session", id, clazz);
    29     }
    30
    31     public Serializable JavaDoc getIdentifier() {
    32         return identifier;
    33     }
    34
    35     public String JavaDoc getMessage() {
    36         return super.getMessage() + ": " +
    37             MessageHelper.infoString(entityName, identifier);
    38     }
    39
    40     public String JavaDoc getEntityName() {
    41         return entityName;
    42     }
    43
    44 }


    解決方案:
         this..getSession().clear();

    posted @ 2008-09-25 17:07 bill 閱讀(902) | 評論 (0)編輯 收藏

    SSH整合中的問題

    Error Creating SessionFactory java.lang.SecurityException: class"org.apache.commons.collections.SequencedHashMap"'異常的解決方案

    本人用 MyEclipse 6.0.0 開發 Struts + Hibernate應用的時候,單獨測試Hibernate的類沒有問題,但是當Web層和Struts整合后,就拋出如下異常:
    %%%%Error Creating SessionFactory %%%% java.lang.SecurityException: class"org.apache.commons.collections.SequencedHashMap"'s signer informationdoes not match signer information of other classes in the same package

       原因是myeclipse  6.0的jar包問題。這個是myeclipse沒有做好嚴格的測試。

       網上好多人說是commons-collectionsXXX.jar的問題。我也不知道。我是把所有的myeclipse生成的jar都remove buildpath 了。
       我又自己添加的jar。就OK!?。。?br />

    posted @ 2008-09-09 21:36 bill 閱讀(234) | 評論 (0)編輯 收藏

    sql server 2000 安裝掛起問題

       sql server 2000 安裝掛起問題:
     解決方案:開始--->運行--->regedit--->HKEY_LOCAL_MACHINE\SYSTEM\CurrentControlSet\Control\Session Manager
       刪除PendingFileRenameOperations

    posted @ 2008-09-07 01:32 bill 閱讀(239) | 評論 (0)編輯 收藏

    <2008年9月>
    31123456
    78910111213
    14151617181920
    21222324252627
    2829301234
    567891011

    導航

    統計

    常用鏈接

    留言簿(1)

    隨筆分類(2)

    隨筆檔案(4)

    相冊

    搜索

    最新評論

    閱讀排行榜

    評論排行榜

    主站蜘蛛池模板: 成年网站免费入口在线观看| 亚洲av无码日韩av无码网站冲| 亚洲国产精品自在线一区二区| 久久综合九九亚洲一区| v片免费在线观看| 久久99精品国产免费观看| 最近中文字幕完整免费视频ww | 国产aa免费视频| 亚洲色无码专区一区| 老司机亚洲精品影院在线观看| 永久免费视频v片www| 精品国产日韩亚洲一区在线 | 免费99精品国产自在现线| 亚洲专区一路线二| 免费人成视频在线| 337p日本欧洲亚洲大胆裸体艺术| kk4kk免费视频毛片| 亚洲精品~无码抽插| 亚洲成人免费在线| 亚洲最新在线视频| 麻豆国产人免费人成免费视频| 亚洲精品国产高清在线观看| 午夜视频在线免费观看| 亚洲高清视频在线播放| 99在线免费观看| 久久亚洲私人国产精品| 歪歪漫画在线观看官网免费阅读| 亚洲人成色777777精品| 亚洲av区一区二区三| 精品在线免费观看| 亚洲高清国产拍精品青青草原| 久久嫩草影院免费看夜色| 国产免费变态视频网址网站| 国产成人1024精品免费| 亚洲福利电影在线观看| 国产一区二区免费| 亚洲剧场午夜在线观看| yy6080亚洲一级理论| 一级毛片全部免费播放| 亚洲精品无码久久久久YW| 亚洲色WWW成人永久网址|