null id in entry (don't flush the Session after an exception occurs)

exception

javax.servlet.ServletException: null id in entry (don't flush the Session after an exception occurs)
	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)
	com.shop.struts.filter.SetCharacterEncodingFilter.doFilter(SetCharacterEncodingFilter.java:32)

 

root cause

org.hibernate.AssertionFailure: null id in entry (don't flush the Session after an exception occurs)
	org.hibernate.event.def.DefaultFlushEntityEventListener.checkId(DefaultFlushEntityEventListener.java:49)
	org.hibernate.event.def.DefaultFlushEntityEventListener.onFlushEntity(DefaultFlushEntityEventListener.java:82)
	org.hibernate.event.def.AbstractFlushingEventListener.flushEntities(AbstractFlushingEventListener.java:190)
	org.hibernate.event.def.AbstractFlushingEventListener.flushEverythingToExecutions(AbstractFlushingEventListener.java:70)
	org.hibernate.event.def.DefaultAutoFlushEventListener.onAutoFlush(DefaultAutoFlushEventListener.java:39)
	org.hibernate.impl.SessionImpl.autoFlushIfRequired(SessionImpl.java:711)
	org.hibernate.impl.SessionImpl.prepareQueries(SessionImpl.java:895)
	org.hibernate.impl.SessionImpl.getQueries(SessionImpl.java:885)
	org.hibernate.impl.SessionImpl.list(SessionImpl.java:834)
	org.hibernate.impl.QueryImpl.list(QueryImpl.java:74)
	org.hibernate.impl.AbstractQueryImpl.uniqueResult(AbstractQueryImpl.java:603)
	com.shop.model.DAO.NcategoryDAO.findByCount(NcategoryDAO.java:141)
	com.shop.struts.action.ProductAction.doList(ProductAction.java:480)
	com.shop.struts.action.ProductAction.execute(ProductAction.java:88)
	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)
	com.shop.struts.filter.SetCharacterEncodingFilter.doFilter(SetCharacterEncodingFilter.java:32)

 

note The full stack trace of the root cause is available in the Apache Tomcat/5.5.20 logs.

 

你可能感兴趣的:(问题集)