javax.persistence.PersistenceException: org.hibernate.type.SerializationException: could not deserialize

前端 未结 6 1287
Happy的楠姐
Happy的楠姐 2021-02-19 04:32

When executing a Criteria Query in hibernate, I get the following exception:

javax.persistence.PersistenceException: javax.persistence.PersistenceException: org.         


        
6条回答
  •  盖世英雄少女心
    2021-02-19 05:20

    I have my entity class UploadFiles having two fields as fid & fname where fid being primary key. I have my query in dao as

    StringBuilder queryString = new StringBuilder("from UploadFiles f where f.fid=1");
    
    Query query = (Query) session.createQuery(queryString.toString());          
    return query.list();
    

    when it execute query.list(),it gives serialization exception

提交回复
热议问题