<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成人无码| 亚洲精品自偷自拍无码| 成人女人A级毛片免费软件| 久久精品国产亚洲av日韩| 嫩草影院在线播放www免费观看| 亚洲综合色婷婷七月丁香| 香蕉视频在线免费看| 亚洲综合图色40p| 久操免费在线观看| 亚洲网址在线观看你懂的| 69av免费观看| 亚洲伦理中文字幕| 日韩精品无码人妻免费视频| 亚洲av无码专区首页| 亚洲AV无码成人精品区大在线| 曰批全过程免费视频观看免费软件| 亚洲国产高清精品线久久| 国产黄片不卡免费| 亚洲国产女人aaa毛片在线| 97av免费视频| 亚洲人成网站999久久久综合| 国产大片免费观看中文字幕| 青青草国产免费国产是公开| 亚洲国产精品无码久久SM| 中文字幕在线免费观看| 亚洲欧美日韩中文字幕一区二区三区| 日本高清免费不卡在线| 国产成人无码免费网站| 亚洲最新视频在线观看| 色视频色露露永久免费观看| 一区二区三区精品高清视频免费在线播放 | 亚洲国产精品无码久久| 亚洲一级片内射网站在线观看| 人妻在线日韩免费视频| 亚洲另类古典武侠| 亚洲精品无码AV中文字幕电影网站 | 国产免费无码一区二区| 亚洲香蕉久久一区二区| 亚洲欧洲一区二区三区| 久久精品无码专区免费|