Announcement Announcement Module
Collapse
No announcement yet.
org.hibernate.AssertionFailure: collection was not processed Page Title Module
Move Remove Collapse
X
Conversation Detail Module
Collapse
  • Filter
  • Time
  • Show
Clear All
new posts

  • org.hibernate.AssertionFailure: collection was not processed

    Hibernate v 3.0.1
    SpringFramework 1.2 RC2
    JDK 1.5.02
    JBOSS 4.0 SP1

    I have a Position Object which has a Parent/Child relationship and a few other relationships with other objects. I retrieve the position objects in a previous request and display to the user in a tree. Clicking on a dode show the children in a tree. If an object is selected a edit form is populate swith the corresponding object attributes. I make modifications to the edit form and click on save. I get the following error.

    I use the OpenInSessionViewFilter and access the dao from the struts action.

    Can someone explain the safe use of a session.

    The stack trace is below

    2005-05-09 21:49:21,549 ERROR [org.hibernate.AssertionFailure] an assertion failure occured (this may indicate a bug in Hibernate, but is more likely due to unsafe use of the session)
    org.hibernate.AssertionFailure: collection was not processed by flush()
    at org.hibernate.engine.CollectionEntry.postFlush(Col lectionEntry.java:144)
    at org.hibernate.event.def.AbstractFlushingEventListe ner.postFlush(AbstractFlushingEventListener.java:3 05)
    at org.hibernate.event.def.DefaultFlushEventListener. onFlush(DefaultFlushEventListener.java:28)
    at org.hibernate.impl.SessionImpl.flush(SessionImpl.j ava:678)
    at org.hibernate.impl.SessionImpl.managedFlush(Sessio nImpl.java:309)
    at org.hibernate.transaction.JDBCTransaction.commit(J DBCTransaction.java:86)
    at org.springframework.orm.hibernate3.HibernateTransa ctionManager.doCommit(HibernateTransactionManager. java:470)
    at org.springframework.transaction.support.AbstractPl atformTransactionManager.commit(AbstractPlatformTr ansactionManager.java:401)
    at org.springframework.transaction.interceptor.Transa ctionAspectSupport.doCommitTransactionAfterReturni ng(TransactionAspectSupport.java:256)
    at org.springframework.transaction.interceptor.Transa ctionInterceptor.invoke(TransactionInterceptor.jav a:67)
    at org.springframework.aop.framework.ReflectiveMethod Invocation.proceed(ReflectiveMethodInvocation.java :144)
    at org.springframework.aop.framework.Cglib2AopProxy$D ynamicAdvisedInterceptor.intercept(Cglib2AopProxy. java:606)
    at com.xactly.icm.org.dao.OrgDAOImplEx$$EnhancerByCGL IB$$8dac1f63_5.savePosition(<generated>)
    at com.xactly.icm.webapp.actions.design.ReferenceData Save.execute(ReferenceDataSave.java:68)
    at com.xactly.icm.webapp.actions.BasicAction.execute( BasicAction.java:35)
    at org.apache.struts.action.RequestProcessor.processA ctionPerform(RequestProcessor.java:421)
    at org.apache.struts.action.RequestProcessor.process( RequestProcessor.java:226)
    at com.xactly.icm.webapp.servlets.IcmRequestProcessor .process(IcmRequestProcessor.java:75)
    at org.apache.struts.action.ActionServlet.process(Act ionServlet.java:1164)
    at org.apache.struts.action.ActionServlet.doGet(Actio nServlet.java:397)
    at javax.servlet.http.HttpServlet.service(HttpServlet .java:697)
    at javax.servlet.http.HttpServlet.service(HttpServlet .java:810)
    at org.apache.catalina.core.ApplicationFilterChain.in ternalDoFilter(ApplicationFilterChain.java:237)
    at org.apache.catalina.core.ApplicationFilterChain.do Filter(ApplicationFilterChain.java:157)
    at org.springframework.orm.hibernate3.support.OpenSes sionInViewFilter.doFilterInternal(OpenSessionInVie wFilter.java:172)
    at org.springframework.web.filter.OncePerRequestFilte r.doFilter(OncePerRequestFilter.java:76)
    at org.apache.catalina.core.ApplicationFilterChain.in ternalDoFilter(ApplicationFilterChain.java:186)
    at org.apache.catalina.core.ApplicationFilterChain.do Filter(ApplicationFilterChain.java:157)
    at org.jboss.web.tomcat.filters.ReplyHeaderFilter.doF ilter(ReplyHeaderFilter.java:75)
    at org.apache.catalina.core.ApplicationFilterChain.in ternalDoFilter(ApplicationFilterChain.java:186)
    at org.apache.catalina.core.ApplicationFilterChain.do Filter(ApplicationFilterChain.java:157)
    at org.apache.catalina.core.StandardWrapperValve.invo ke(StandardWrapperValve.java:214)
    at org.apache.catalina.core.StandardValveContext.invo keNext(StandardValveContext.java:104)
    at org.apache.catalina.core.StandardPipeline.invoke(S tandardPipeline.java:520)
    at org.apache.catalina.core.StandardContextValve.invo keInternal(StandardContextValve.java:198)
    at org.apache.catalina.core.StandardContextValve.invo ke(StandardContextValve.java:152)
    at org.apache.catalina.core.StandardValveContext.invo keNext(StandardValveContext.java:104)
    at org.jboss.web.tomcat.security.CustomPrincipalValve .invoke(CustomPrincipalValve.java:66)
    at org.apache.catalina.core.StandardValveContext.invo keNext(StandardValveContext.java:102)
    at org.jboss.web.tomcat.security.SecurityAssociationV alve.invoke(SecurityAssociationValve.java:150)
    at org.apache.catalina.core.StandardValveContext.invo keNext(StandardValveContext.java:102)
    at org.jboss.web.tomcat.security.JaccContextValve.inv oke(JaccContextValve.java:54)
    at org.apache.catalina.core.StandardValveContext.invo keNext(StandardValveContext.java:102)
    at org.apache.catalina.core.StandardPipeline.invoke(S tandardPipeline.java:520)
    at org.apache.catalina.core.StandardHostValve.invoke( StandardHostValve.java:137)
    at org.apache.catalina.core.StandardValveContext.invo keNext(StandardValveContext.java:104)
    at org.apache.catalina.valves.ErrorReportValve.invoke (ErrorReportValve.java:118)
    at org.apache.catalina.core.StandardValveContext.invo keNext(StandardValveContext.java:102)
    at org.apache.catalina.core.StandardPipeline.invoke(S tandardPipeline.java:520)
    at org.apache.catalina.core.StandardEngineValve.invok e(StandardEngineValve.java:109)
    at org.apache.catalina.core.StandardValveContext.invo keNext(StandardValveContext.java:104)
    at org.apache.catalina.core.StandardPipeline.invoke(S tandardPipeline.java:520)
    at org.apache.catalina.core.ContainerBase.invoke(Cont ainerBase.java:929)
    at org.apache.coyote.tomcat5.CoyoteAdapter.service(Co yoteAdapter.java:160)
    at org.apache.coyote.http11.Http11Processor.process(H ttp11Processor.java:799)
    at org.apache.coyote.http11.Http11Protocol$Http11Conn ectionHandler.processConnection(Http11Protocol.jav a:705)
    at org.apache.tomcat.util.net.TcpWorkerThread.runIt(P oolTcpEndpoint.java:577)
    at org.apache.tomcat.util.threads.ThreadPool$ControlR unnable.run(ThreadPool.java:683)
    at java.lang.Thread.run(Thread.java:595)

  • #2
    Looks like a bug in hibernate: Listener registration cause

    Actually I had Listeners for update and save-update. All i did was print some information and called super.update. Registering alistener caused this assertion failure. When I removed my listeners it started working

    Comment

    Working...
    X