首页 诗词 字典 板报 句子 名言 友答 励志 学校 网站地图
当前位置: 首页 > 教程频道 > JAVA > Java Exception >

hibernate 报 org.hibernate.type.SerializationException:could not deserialize 异常,不

2014-01-26 
HTTP Status 500 ---------------------------------------------------------------------------------typ

HTTP Status 500 -
 
  --------------------------------------------------------------------------------
 
  type Exception report
 
  message
 
  description The server encountered an internal error () that prevented it from fulfilling this request.
 
  exception
 
  javax.servlet.ServletException: could not deserialize
  org.apache.struts.action.RequestProcessor.processException(RequestProcessor.java:523)
  org.apache.struts.action.RequestProcessor.processActionPerform(RequestProcessor.java:421)
  org.apache.struts.action.RequestProcessor.process(RequestProcessor.java:224)
  org.apache.struts.action.ActionServlet.process(ActionServlet.java:1194)
  org.apache.struts.action.ActionServlet.doGet(ActionServlet.java:414)
  javax.servlet.http.HttpServlet.service(HttpServlet.java:689)
  javax.servlet.http.HttpServlet.service(HttpServlet.java:802)
 
 
  root cause
 
  org.hibernate.type.SerializationException:could not deserialize
  org.hibernate.util.SerializationHelper.deserialize(SerializationHelper.java:211)
  org.hibernate.util.SerializationHelper.deserialize(SerializationHelper.java:234)
  org.hibernate.type.SerializableType.fromBytes(SerializableType.java:78)
  org.hibernate.type.SerializableType.get(SerializableType.java:39)
  org.hibernate.type.NullableType.nullSafeGet(NullableType.java:77)
  org.hibernate.type.NullableType.nullSafeGet(NullableType.java:68)
  org.hibernate.type.AbstractType.hydrate(AbstractType.java:80)
  org.hibernate.persister.entity.BasicEntityPersister.hydrate(BasicEntityPersister.java:1690)
  org.hibernate.loader.Loader.loadFromResultSet(Loader.java:991)
  org.hibernate.loader.Loader.instanceNotYetLoaded(Loader.java:942)
  org.hibernate.loader.Loader.getRow(Loader.java:855)
  org.hibernate.loader.Loader.getRowFromResultSet(Loader.java:305)
  org.hibernate.loader.Loader.doQuery(Loader.java:412)
  org.hibernate.loader.Loader.doQueryAndInitializeNonLazyCollections(Loader.java:218)
  org.hibernate.loader.Loader.doList(Loader.java:1593)
  org.hibernate.loader.Loader.list(Loader.java:1577)
  org.hibernate.loader.hql.QueryLoader.list(QueryLoader.java:395)
  org.hibernate.hql.ast.QueryTranslatorImpl.list(QueryTranslatorImpl.java:271)
  org.hibernate.impl.SessionImpl.list(SessionImpl.java:844)
  org.hibernate.impl.QueryImpl.list(QueryImpl.java:74)
  com.bbs.web.info.ArticleInfoBean.findByDomainId(ArticleInfoBean.java:31)
  com.bbs.struts.action.ListArticleAction.doQuery(ListArticleAction.java:51)
  com.bbs.struts.action.ListArticleAction.execute(ListArticleAction.java:44)
  org.apache.struts.action.RequestProcessor.processActionPerform(RequestProcessor.java:419)
  org.apache.struts.action.RequestProcessor.process(RequestProcessor.java:224)
  org.apache.struts.action.ActionServlet.process(ActionServlet.java:1194)
  org.apache.struts.action.ActionServlet.doGet(ActionServlet.java:414)
  javax.servlet.http.HttpServlet.service(HttpServlet.java:689)
  javax.servlet.http.HttpServlet.service(HttpServlet.java:802)
 
 
  note The full stack trace of the root cause is available in the Apache Tomcat/5.5.5 logs.
 
 
  --------------------------------------------------------------------------------
 

------解决方法--------------------------------------------------------
你的实体类有没有实现serializable接口?
  对象序列化出错
  比如
  public class BaseBusinessClass implements Serializable{
  private String id;
  private String name;
 
  public String getId(){         

热点排行