Announcement Announcement Module
Collapse
No announcement yet.
why HibernateSystemException occurs? Page Title Module
Move Remove Collapse
X
Conversation Detail Module
Collapse
  • Filter
  • Time
  • Show
Clear All
new posts

  • why HibernateSystemException occurs?

    Hi~~

    I tried to query like this:
    public DhForumUser checkLogin(String userName,String password)
    {
    log.info("********in UserHibernate userName is**"+userName+"*******");
    log.info("********in UserHibernate password is**"+password+"*******");
    DhForumUser user = null;
    List l = (List)getHibernateTemplate().find("from org.dhs.forum.hbm.DhForumUser user where user.userName=? and user.password=?",new Object[]{userName,password},new Type[]{Hibernate.STRING,Hibernate.STRING});
    log.info("********after get user*******");
    user = (DhForumUser)l.get(0);
    return user;
    }
    (the function above is in a class extends HibernateDaoSupport)
    and the exception occurs at:getHibernateTemplate().find("from ..........

    some of the stacktrace is:
    DEBUG [http-8000-Processor24] (TransactionSynchronizationManager.java:142) - Bound value [org.springframework.orm.hibernate.SessionHolder@d1 6610] for key [net.sf.hibernate.impl.SessionFactoryImpl@a594e1] to thread [http-8000-Processor24]
    DEBUG [http-8000-Processor24] (TransactionSynchronizationManager.java:194) - Initializing transaction synchronization
    INFO [http-8000-Processor24] (UserHibernate.java:35) - ********in UserHibernate userName is**java_boy*******
    INFO [http-8000-Processor24] (UserHibernate.java:36) - ********in UserHibernate password is**E10ADC3949BA59ABBE56E057F20F883E*******
    DEBUG [http-8000-Processor24] (TransactionSynchronizationManager.java:117) - Retrieved value [org.springframework.orm.hibernate.SessionHolder@d1 6610] for key [net.sf.hibernate.impl.SessionFactoryImpl@a594e1] bound to thread [http-8000-Processor24]
    DEBUG [http-8000-Processor24] (TransactionSynchronizationManager.java:117) - Retrieved value [org.springframework.orm.hibernate.SessionHolder@d1 6610] for key [net.sf.hibernate.impl.SessionFactoryImpl@a594e1] bound to thread [http-8000-Processor24]
    DEBUG [http-8000-Processor24] (SessionImpl.java:1526) - find: from org.dhs.forum.hbm.DhForumUser user where user.userName=? and user.password=?
    DEBUG [http-8000-Processor24] (QueryParameters.java:106) - parameters: [java_boy, E10ADC3949BA59ABBE56E057F20F883E]
    DEBUG [http-8000-Processor24] (QueryParameters.java:109) - named parameters: {}
    DEBUG [http-8000-Processor24] (QueryTranslator.java:147) - compiling query
    DEBUG [http-8000-Processor24] (QueryTranslator.java:199) - HQL: from org.dhs.forum.hbm.DhForumUser user where user.userName=? and user.password=?
    DEBUG [http-8000-Processor24] (QueryTranslator.java:200) - SQL: select dhforumuse0_.user_id as user_id, dhforumuse0_.user_name as user_name, dhforumuse0_.password as password, dhforumuse0_.email as email, dhforumuse0_.sex as sex, dhforumuse0_.role_id as role_id, dhforumuse0_.forbidden as forbidden, dhforumuse0_.experience as experience, dhforumuse0_.level as level, dhforumuse0_.online as online, dhforumuse0_.create_date as create_11_, dhforumuse0_.update_date as update_12_, dhforumuse0_.last_login_date as last_lo13_, dhforumuse0_.birth_date as birth_date, dhforumuse0_.login_times as login_t15_, dhforumuse0_.pwd_question as pwd_que16_, dhforumuse0_.pwd_answer as pwd_answer, dhforumuse0_.country as country, dhforumuse0_.state as state, dhforumuse0_.province as province, dhforumuse0_.city as city, dhforumuse0_.timezone as timezone, dhforumuse0_.education as education, dhforumuse0_.married as married, dhforumuse0_.industry as industry, dhforumuse0_.job_title as job_title, dhforumuse0_.homepage as homepage, dhforumuse0_.self_description as self_de28_, dhforumuse0_.signature as signature, dhforumuse0_.photo as photo, dhforumuse0_.photo_path as photo_path, dhforumuse0_.qq as qq, dhforumuse0_.msn as msn, dhforumuse0_.yahoo as yahoo, dhforumuse0_.icq as icq, dhforumuse0_.coin as coin, dhforumuse0_.nick_name as nick_name from dh_forum_user dhforumuse0_ where (dhforumuse0_.user_name=? )and(dhforumuse0_.password=? )
    DEBUG [http-8000-Processor24] (BatcherImpl.java:196) - about to open: 0 open PreparedStatements, 0 open ResultSets
    DEBUG [http-8000-Processor24] (BatcherImpl.java:237) - select dhforumuse0_.user_id as user_id, dhforumuse0_.user_name as user_name, dhforumuse0_.password as password, dhforumuse0_.email as email, dhforumuse0_.sex as sex, dhforumuse0_.role_id as role_id, dhforumuse0_.forbidden as forbidden, dhforumuse0_.experience as experience, dhforumuse0_.level as level, dhforumuse0_.online as online, dhforumuse0_.create_date as create_11_, dhforumuse0_.update_date as update_12_, dhforumuse0_.last_login_date as last_lo13_, dhforumuse0_.birth_date as birth_date, dhforumuse0_.login_times as login_t15_, dhforumuse0_.pwd_question as pwd_que16_, dhforumuse0_.pwd_answer as pwd_answer, dhforumuse0_.country as country, dhforumuse0_.state as state, dhforumuse0_.province as province, dhforumuse0_.city as city, dhforumuse0_.timezone as timezone, dhforumuse0_.education as education, dhforumuse0_.married as married, dhforumuse0_.industry as industry, dhforumuse0_.job_title as job_title, dhforumuse0_.homepage as homepage, dhforumuse0_.self_description as self_de28_, dhforumuse0_.signature as signature, dhforumuse0_.photo as photo, dhforumuse0_.photo_path as photo_path, dhforumuse0_.qq as qq, dhforumuse0_.msn as msn, dhforumuse0_.yahoo as yahoo, dhforumuse0_.icq as icq, dhforumuse0_.coin as coin, dhforumuse0_.nick_name as nick_name from dh_forum_user dhforumuse0_ where (dhforumuse0_.user_name=? )and(dhforumuse0_.password=? )
    Hibernate: select dhforumuse0_.user_id as user_id, dhforumuse0_.user_name as user_name, dhforumuse0_.password as password, dhforumuse0_.email as email, dhforumuse0_.sex as sex, dhforumuse0_.role_id as role_id, dhforumuse0_.forbidden as forbidden, dhforumuse0_.experience as experience, dhforumuse0_.level as level, dhforumuse0_.online as online, dhforumuse0_.create_date as create_11_, dhforumuse0_.update_date as update_12_, dhforumuse0_.last_login_date as last_lo13_, dhforumuse0_.birth_date as birth_date, dhforumuse0_.login_times as login_t15_, dhforumuse0_.pwd_question as pwd_que16_, dhforumuse0_.pwd_answer as pwd_answer, dhforumuse0_.country as country, dhforumuse0_.state as state, dhforumuse0_.province as province, dhforumuse0_.city as city, dhforumuse0_.timezone as timezone, dhforumuse0_.education as education, dhforumuse0_.married as married, dhforumuse0_.industry as industry, dhforumuse0_.job_title as job_title, dhforumuse0_.homepage as homepage, dhforumuse0_.self_description as self_de28_, dhforumuse0_.signature as signature, dhforumuse0_.photo as photo, dhforumuse0_.photo_path as photo_path, dhforumuse0_.qq as qq, dhforumuse0_.msn as msn, dhforumuse0_.yahoo as yahoo, dhforumuse0_.icq as icq, dhforumuse0_.coin as coin, dhforumuse0_.nick_name as nick_name from dh_forum_user dhforumuse0_ where (dhforumuse0_.user_name=? )and(dhforumuse0_.password=? )
    DEBUG [http-8000-Processor24] (BatcherImpl.java:241) - preparing statement
    DEBUG [http-8000-Processor24] (NullableType.java:46) - binding 'java_boy' to parameter: 1
    DEBUG [http-8000-Processor24] (NullableType.java:46) - binding 'E10ADC3949BA59ABBE56E057F20F883E' to parameter: 2
    DEBUG [http-8000-Processor24] (Loader.java:197) - processing result set
    DEBUG [http-8000-Processor24] (NullableType.java:68) - returning '5' as column: user_id
    DEBUG [http-8000-Processor24] (Loader.java:405) - result row: 5
    DEBUG [http-8000-Processor24] (Loader.java:536) - Initializing object from ResultSet: 5
    DEBUG [http-8000-Processor24] (Loader.java:605) - Hydrating entity: org.dhs.forum.hbm.DhForumUser#5
    DEBUG [http-8000-Processor24] (NullableType.java:68) - returning 'java_boy' as column: user_name
    DEBUG [http-8000-Processor24] (NullableType.java:68) - returning 'E10ADC3949BA59ABBE56E057F20F883E' as column: password
    DEBUG [http-8000-Processor24] (NullableType.java:68) - returning '[email protected]' as column: email
    DEBUG [http-8000-Processor24] (NullableType.java:68) - returning 'M' as column: sex
    DEBUG [http-8000-Processor24] (NullableType.java:68) - returning '1' as column: role_id
    DEBUG [http-8000-Processor24] (NullableType.java:64) - returning null as column: forbidden
    DEBUG [http-8000-Processor24] (NullableType.java:68) - returning '0' as column: experience
    DEBUG [http-8000-Processor24] (NullableType.java:68) - returning '0' as column: level
    DEBUG [http-8000-Processor24] (NullableType.java:64) - returning null as column: online
    DEBUG [http-8000-Processor24] (NullableType.java:68) - returning '16 一月 2005 14:59:51' as column: create_11_
    DEBUG [http-8000-Processor24] (NullableType.java:64) - returning null as column: update_12_
    DEBUG [http-8000-Processor24] (NullableType.java:68) - returning '16 一月 2005 14:59:51' as column: last_lo13_
    DEBUG [http-8000-Processor24] (NullableType.java:64) - returning null as column: birth_date
    DEBUG [http-8000-Processor24] (NullableType.java:68) - returning '0' as column: login_t15_
    DEBUG [http-8000-Processor24] (NullableType.java:68) - returning 'what is it' as column: pwd_que16_
    DEBUG [http-8000-Processor24] (NullableType.java:68) - returning 'jjj' as column: pwd_answer
    DEBUG [http-8000-Processor24] (NullableType.java:68) - returning '' as column: country
    DEBUG [http-8000-Processor24] (NullableType.java:68) - returning '' as column: state
    DEBUG [http-8000-Processor24] (NullableType.java:68) - returning '' as column: province
    DEBUG [http-8000-Processor24] (NullableType.java:68) - returning '' as column: city
    DEBUG [http-8000-Processor24] (BatcherImpl.java:203) - done closing: 0 open PreparedStatements, 0 open ResultSets
    DEBUG [http-8000-Processor24] (BatcherImpl.java:261) - closing statement
    DEBUG [http-8000-Processor24] (TransactionSynchronizationManager.java:117) - Retrieved value [org.springframework.orm.hibernate.SessionHolder@d1 6610] for key [net.sf.hibernate.impl.SessionFactoryImpl@a594e1] bound to thread [http-8000-Processor24]
    DEBUG [http-8000-Processor24] (RuleBasedTransactionAttribute.java:73) - Applying rules to determine whether transaction should rollback on org.springframework.orm.hibernate.HibernateSystemE xception: could not deserialize; nested exception is net.sf.hibernate.type.SerializationException: could not deserialize
    DEBUG [http-8000-Processor24] (RuleBasedTransactionAttribute.java:87) - Winning rollback rule is: null
    DEBUG [http-8000-Processor24] (RuleBasedTransactionAttribute.java:92) - No relevant rollback rule found: applying superclass default
    DEBUG [http-8000-Processor24] (TransactionAspectSupport.java:255) - Invoking rollback for transaction on method 'checkLogin' in class [org.dhs.forum.service.IUserService] due to throwable [org.springframework.orm.hibernate.HibernateSystemE xception: could not deserialize; nested exception is net.sf.hibernate.type.SerializationException: could not deserialize]

  • #2
    the stacktrace shows that I have got the record already,but why cannot deserialize?

    any one can help me?
    Thanks in advance.

    Comment

    Working...
    X