-->
These old forums are deprecated now and set to read-only. We are waiting for you on our new forums!
More modern, Discourse-based and with GitHub/Google/Twitter authentication built-in.

All times are UTC - 5 hours [ DST ]



Forum locked This topic is locked, you cannot edit posts or make further replies.  [ 3 posts ] 
Author Message
 Post subject: Self Referencing entity (tree model) update fails on cascade
PostPosted: Wed Apr 09, 2008 4:22 am 
Newbie

Joined: Wed Apr 09, 2008 3:37 am
Posts: 4
Location: Tel Aviv, Israel
Hi there,

I'm using Hibernate 3.25GA along with Spring Framework 2.0.

I have an entity Node which represents a single node in a tree, persisted into a self referencing database table. Each Node has a parent node and a sorted set of children. Each node also has a nullable OneToOne relation to a Condition entity instance created solely for that node, which holds some business logic data.

Tree editing is performed in-memory (interactive UI for the user to edit the tree), and when the user clicks 'save', I'm calling saveOrUpdate on the instance.

The first call (e.g. save) for this instance works. Then I'm deleting a node (can be a terminal or non-terminal, it doesn't matter), and the consequent call to saveOrUpdate (e.g. update), fail with the infamous deleted object would be re-saved by cascade (remove deleted object from associations)
exception. The culprit seems to be the Condition entity, but when I removed the mapping for the Condition entity, the error persisted with the Node as the culprit (either Parent or Child, I'm not sure from the exception description). Also, the error occurs even when the deleted node doesn't have any condition defined (condition is null).

This is my annotated Node entity:

Code:
@Entity
@Table(name="SEG_NODES")
public class Node implements Comparable<Node>, Serializable, Cloneable
{
   @Id
   @Column(name = "ID", precision = 18, scale = 0)
   private Long id;

   @Column(name = "NODE_ORDER", precision = 3, scale = 0)
   private int order;

   @Column(name = "NODE_NAME", nullable = true, length = 50)
   private String name;
   
   @OneToOne(fetch = FetchType.EAGER, cascade=CascadeType.ALL, optional = true)
   @JoinColumn(name = "CONDITION_ID", nullable = true)   
   @Cascade({   org.hibernate.annotations.CascadeType.ALL,
            org.hibernate.annotations.CascadeType.SAVE_UPDATE,
            org.hibernate.annotations.CascadeType.DELETE_ORPHAN})
   private Condition condition;   
   
   @ManyToOne(fetch = FetchType.EAGER, cascade=CascadeType.ALL, optional = true)
   @JoinColumn(name = "PARENT_NODE_ID", nullable = true)
   @Fetch(FetchMode.SELECT)
   @Cascade({   org.hibernate.annotations.CascadeType.ALL,
            org.hibernate.annotations.CascadeType.SAVE_UPDATE,
            org.hibernate.annotations.CascadeType.DELETE_ORPHAN})
   private Node parent;   
      
   @OneToMany(cascade = CascadeType.ALL, fetch = FetchType.EAGER, mappedBy="parent")
   @Sort(type = SortType.NATURAL)
   @Fetch(FetchMode.SUBSELECT)
   @Cascade({   org.hibernate.annotations.CascadeType.ALL,
            org.hibernate.annotations.CascadeType.SAVE_UPDATE,
            org.hibernate.annotations.CascadeType.DELETE_ORPHAN})
   private SortedSet<Node> children = new TreeSet<Node>();

...
getters and setters removed
....
}


Note that the exception occurs either with or without the org.hibernate.annotations.CascadeType annotations, their presence is the result of a few hours of Googling this type of exception.

The code used for persistence is fairly simple. As I'm using Spring (HibernateDaoSupport), I'm not the one opening or closing the session, but I don't think it matters for this specific issue (I'm actually using a GenericDao pattern, the implementation of which extends HibernateDaoSupport).

I've looked into posts regarding this exception, most of them involve a simple collection rather than a self referencing collection. I'm quite stuck here, so any help would be greatly appreciated.

Thanks

Full stack trace of any exception that occurs:
Code:
10:42:21,670 INFO  [STDOUT] Hibernate: /* get current state com.ewave.topit.segmentation.model.Node */ select node_.ID, node_.CONDITION_ID as CONDITION4_59_, node_.NODE_NAME as NODE2_59_, node_.NODE_ORDER as NODE3_59_, node_.PARENT_NODE_ID as PARENT5_59_ from SEG_NODES node_ where node_.ID=?
10:42:21,670 INFO  [STDOUT] Hibernate: /* get current state com.ewave.topit.segmentation.model.Node */ select node_.ID, node_.CONDITION_ID as CONDITION4_59_, node_.NODE_NAME as NODE2_59_, node_.NODE_ORDER as NODE3_59_, node_.PARENT_NODE_ID as PARENT5_59_ from SEG_NODES node_ where node_.ID=?
10:42:21,670 INFO  [STDOUT] Hibernate: /* get current state com.ewave.topit.segmentation.model.Node */ select node_.ID, node_.CONDITION_ID as CONDITION4_59_, node_.NODE_NAME as NODE2_59_, node_.NODE_ORDER as NODE3_59_, node_.PARENT_NODE_ID as PARENT5_59_ from SEG_NODES node_ where node_.ID=?
10:42:21,670 INFO  [STDOUT] Hibernate: /* get current state com.ewave.topit.conditiontool.model.Condition */ select condition_.CONDITION_ID, condition_.CONDITION as CONDITION35_, condition_.CONDITION_STATE as CONDITION3_35_ from TI_CONDITION condition_ where condition_.CONDITION_ID=?
10:42:21,685 ERROR [STDERR] 09/04/2008 10:42:21 com.sun.faces.application.ActionListenerImpl processAction
SEVERE: org.hibernate.ObjectDeletedException: deleted object would be re-saved by cascade (remove deleted object from associations): [com.ewave.topit.conditiontool.model.Condition#2125]
javax.faces.el.EvaluationException: org.hibernate.ObjectDeletedException: deleted object would be re-saved by cascade (remove deleted object from associations): [com.ewave.topit.conditiontool.model.Condition#2125]
   at javax.faces.component.MethodBindingMethodExpressionAdapter.invoke(MethodBindingMethodExpressionAdapter.java:91)
   at com.sun.faces.application.ActionListenerImpl.processAction(ActionListenerImpl.java:91)
   at javax.faces.component.UICommand.broadcast(UICommand.java:383)
   at org.ajax4jsf.component.AjaxViewRoot.processEvents(AjaxViewRoot.java:184)
   at org.ajax4jsf.component.AjaxViewRoot.broadcastEvents(AjaxViewRoot.java:162)
   at org.ajax4jsf.component.AjaxViewRoot.processApplication(AjaxViewRoot.java:350)
   at com.sun.faces.lifecycle.InvokeApplicationPhase.execute(InvokeApplicationPhase.java:97)
   at com.sun.faces.lifecycle.LifecycleImpl.phase(LifecycleImpl.java:251)
   at com.sun.faces.lifecycle.LifecycleImpl.execute(LifecycleImpl.java:117)
   at javax.faces.webapp.FacesServlet.service(FacesServlet.java:244)
   at org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:290)
   at org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:206)
   at org.ajax4jsf.webapp.BaseXMLFilter.doXmlFilter(BaseXMLFilter.java:141)
   at org.ajax4jsf.webapp.BaseFilter.doFilter(BaseFilter.java:281)
   at org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:235)
   at org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:206)
   at org.acegisecurity.util.FilterChainProxy$VirtualFilterChain.doFilter(FilterChainProxy.java:265)
   at org.acegisecurity.ui.switchuser.SwitchUserProcessingFilter.doFilter(SwitchUserProcessingFilter.java:341)
   at org.acegisecurity.util.FilterChainProxy$VirtualFilterChain.doFilter(FilterChainProxy.java:275)
   at org.acegisecurity.intercept.web.FilterSecurityInterceptor.invoke(FilterSecurityInterceptor.java:107)
   at org.acegisecurity.intercept.web.FilterSecurityInterceptor.doFilter(FilterSecurityInterceptor.java:72)
   at org.acegisecurity.util.FilterChainProxy$VirtualFilterChain.doFilter(FilterChainProxy.java:275)
   at org.acegisecurity.ui.ExceptionTranslationFilter.doFilter(ExceptionTranslationFilter.java:110)
   at org.acegisecurity.util.FilterChainProxy$VirtualFilterChain.doFilter(FilterChainProxy.java:275)
   at org.acegisecurity.ui.rememberme.RememberMeProcessingFilter.doFilter(RememberMeProcessingFilter.java:142)
   at org.acegisecurity.util.FilterChainProxy$VirtualFilterChain.doFilter(FilterChainProxy.java:275)
   at org.acegisecurity.wrapper.SecurityContextHolderAwareRequestFilter.doFilter(SecurityContextHolderAwareRequestFilter.java:81)
   at org.acegisecurity.util.FilterChainProxy$VirtualFilterChain.doFilter(FilterChainProxy.java:275)
   at org.acegisecurity.ui.basicauth.BasicProcessingFilter.doFilter(BasicProcessingFilter.java:175)
   at org.acegisecurity.util.FilterChainProxy$VirtualFilterChain.doFilter(FilterChainProxy.java:275)
   at org.acegisecurity.ui.AbstractProcessingFilter.doFilter(AbstractProcessingFilter.java:229)
   at org.acegisecurity.util.FilterChainProxy$VirtualFilterChain.doFilter(FilterChainProxy.java:275)
   at org.acegisecurity.ui.logout.LogoutFilter.doFilter(LogoutFilter.java:106)
   at org.acegisecurity.util.FilterChainProxy$VirtualFilterChain.doFilter(FilterChainProxy.java:275)
   at org.acegisecurity.context.HttpSessionContextIntegrationFilter.doFilter(HttpSessionContextIntegrationFilter.java:286)
   at org.acegisecurity.util.FilterChainProxy$VirtualFilterChain.doFilter(FilterChainProxy.java:275)
   at org.acegisecurity.util.FilterChainProxy.doFilter(FilterChainProxy.java:149)
   at org.acegisecurity.util.FilterToBeanProxy.doFilter(FilterToBeanProxy.java:98)
   at org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:235)
   at org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:206)
   at org.jboss.web.tomcat.filters.ReplyHeaderFilter.doFilter(ReplyHeaderFilter.java:96)
   at org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:235)
   at org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:206)
   at org.apache.catalina.core.StandardWrapperValve.invoke(StandardWrapperValve.java:230)
   at org.apache.catalina.core.StandardContextValve.invoke(StandardContextValve.java:175)
   at org.jboss.web.tomcat.security.SecurityAssociationValve.invoke(SecurityAssociationValve.java:179)
   at org.jboss.web.tomcat.security.JaccContextValve.invoke(JaccContextValve.java:84)
   at org.apache.catalina.core.StandardHostValve.invoke(StandardHostValve.java:127)
   at org.apache.catalina.valves.ErrorReportValve.invoke(ErrorReportValve.java:102)
   at org.jboss.web.tomcat.service.jca.CachedConnectionValve.invoke(CachedConnectionValve.java:157)
   at org.apache.catalina.core.StandardEngineValve.invoke(StandardEngineValve.java:109)
   at org.apache.catalina.connector.CoyoteAdapter.service(CoyoteAdapter.java:262)
   at org.apache.coyote.http11.Http11Processor.process(Http11Processor.java:844)
   at org.apache.coyote.http11.Http11Protocol$Http11ConnectionHandler.process(Http11Protocol.java:583)
   at org.apache.tomcat.util.net.JIoEndpoint$Worker.run(JIoEndpoint.java:446)
   at java.lang.Thread.run(Thread.java:619)
Caused by: org.hibernate.ObjectDeletedException: deleted object would be re-saved by cascade (remove deleted object from associations): [com.ewave.topit.conditiontool.model.Condition#2125]
   at org.hibernate.impl.SessionImpl.forceFlush(SessionImpl.java:1014)
   at org.hibernate.event.def.DefaultSaveOrUpdateEventListener.entityIsTransient(DefaultSaveOrUpdateEventListener.java:165)
   at org.hibernate.event.def.DefaultSaveOrUpdateEventListener.performSaveOrUpdate(DefaultSaveOrUpdateEventListener.java:94)
   at org.hibernate.event.def.DefaultSaveOrUpdateEventListener.onSaveOrUpdate(DefaultSaveOrUpdateEventListener.java:70)
   at org.hibernate.impl.SessionImpl.fireSaveOrUpdate(SessionImpl.java:507)
   at org.hibernate.impl.SessionImpl.saveOrUpdate(SessionImpl.java:499)
   at org.hibernate.engine.CascadingAction$5.cascade(CascadingAction.java:218)
   at org.hibernate.engine.Cascade.cascadeToOne(Cascade.java:268)
   at org.hibernate.engine.Cascade.cascadeAssociation(Cascade.java:216)
   at org.hibernate.engine.Cascade.cascadeProperty(Cascade.java:169)
   at org.hibernate.engine.Cascade.cascade(Cascade.java:130)
   at org.hibernate.engine.Cascade.cascade(Cascade.java:97)
   at org.hibernate.event.def.DefaultSaveOrUpdateEventListener.cascadeOnUpdate(DefaultSaveOrUpdateEventListener.java:357)
   at org.hibernate.event.def.DefaultSaveOrUpdateEventListener.performUpdate(DefaultSaveOrUpdateEventListener.java:329)
   at org.hibernate.event.def.DefaultSaveOrUpdateEventListener.entityIsDetached(DefaultSaveOrUpdateEventListener.java:223)
   at org.hibernate.event.def.DefaultSaveOrUpdateEventListener.performSaveOrUpdate(DefaultSaveOrUpdateEventListener.java:89)
   at org.hibernate.event.def.DefaultSaveOrUpdateEventListener.onSaveOrUpdate(DefaultSaveOrUpdateEventListener.java:70)
   at org.hibernate.impl.SessionImpl.fireSaveOrUpdate(SessionImpl.java:507)
   at org.hibernate.impl.SessionImpl.saveOrUpdate(SessionImpl.java:499)
   at org.hibernate.impl.SessionImpl.saveOrUpdate(SessionImpl.java:495)
   at com.ewave.topit.segmentation.dao.impl.SegmentationDaoHibernateImpl.saveOrUpdate(SegmentationDaoHibernateImpl.java:302)
   at com.ewave.topit.segmentation.service.impl.SegmentationServiceImpl.persistSegmentation(SegmentationServiceImpl.java:198)
   at com.ewave.topit.segmentation.service.impl.SegmentationServiceImpl$$FastClassByCGLIB$$f40f1cff.invoke(<generated>)
   at net.sf.cglib.proxy.MethodProxy.invoke(MethodProxy.java:149)
   at org.springframework.aop.framework.Cglib2AopProxy$CglibMethodInvocation.invokeJoinpoint(Cglib2AopProxy.java:700)
   


Name and version of the database you are using:
Database is Oracle 10g Enterprise, but again, it shouldn't matter as the error occurs in the Hibernate logic before any DB write is actually attempted

The generated SQL (show_sql=true):
No SQL has been generated before the exception occurs

Debug level Hibernate log excerpt:
Code:
11:08:30,776 INFO  [STDOUT] 2008-04-09 11:08:30,776 [http-8080-2] DEBUG org.hibernate.impl.SessionImpl (SessionImpl.java:220) - opened session at timestamp: 12077285107
11:08:30,776 INFO  [STDOUT] 2008-04-09 11:08:30,776 [http-8080-2] DEBUG org.hibernate.transaction.JDBCTransaction (JDBCTransaction.java:54) - begin
11:08:30,776 INFO  [STDOUT] 2008-04-09 11:08:30,776 [http-8080-2] DEBUG org.hibernate.jdbc.ConnectionManager (ConnectionManager.java:421) - opening JDBC connection
11:08:30,776 INFO  [STDOUT] 2008-04-09 11:08:30,776 [http-8080-2] DEBUG org.hibernate.transaction.JDBCTransaction (JDBCTransaction.java:59) - current autocommit status: true
11:08:30,776 INFO  [STDOUT] 2008-04-09 11:08:30,776 [http-8080-2] DEBUG org.hibernate.transaction.JDBCTransaction (JDBCTransaction.java:62) - disabling autocommit
11:08:30,776 INFO  [STDOUT] 2008-04-09 11:08:30,776 [http-8080-2] DEBUG org.hibernate.jdbc.JDBCContext (JDBCContext.java:210) - after transaction begin
11:08:30,823 INFO  [STDOUT] 2008-04-09 11:08:30,808 [http-8080-2] DEBUG org.hibernate.jdbc.AbstractBatcher (AbstractBatcher.java:366) - about to open PreparedStatement (open PreparedStatements: 0, globally: 0)
11:08:30,823 INFO  [STDOUT] 2008-04-09 11:08:30,823 [http-8080-2] DEBUG org.hibernate.jdbc.AbstractBatcher (AbstractBatcher.java:401) - select * from ( /* criteria query */ select this_.DATA_SET_ID as DATA1_45_0_, this_.ETL_DATE as ETL2_45_0_, this_.FOR_DATE as FOR3_45_0_ from TI_DATA_SETS this_ order by this_.FOR_DATE desc ) where rownum <= ?
11:08:30,823 INFO  [STDOUT] Hibernate: select * from ( /* criteria query */ select this_.DATA_SET_ID as DATA1_45_0_, this_.ETL_DATE as ETL2_45_0_, this_.FOR_DATE as FOR3_45_0_ from TI_DATA_SETS this_ order by this_.FOR_DATE desc ) where rownum <= ?
11:08:30,823 INFO  [STDOUT] 2008-04-09 11:08:30,823 [http-8080-2] DEBUG org.hibernate.jdbc.AbstractBatcher (AbstractBatcher.java:484) - preparing statement
11:08:30,823 INFO  [STDOUT] 2008-04-09 11:08:30,823 [http-8080-2] DEBUG org.hibernate.jdbc.AbstractBatcher (AbstractBatcher.java:382) - about to open ResultSet (open ResultSets: 0, globally: 0)
11:08:30,823 INFO  [STDOUT] 2008-04-09 11:08:30,823 [http-8080-2] DEBUG org.hibernate.loader.Loader (Loader.java:694) - processing result set
11:08:30,823 INFO  [STDOUT] 2008-04-09 11:08:30,823 [http-8080-2] DEBUG org.hibernate.loader.Loader (Loader.java:699) - result set row: 0
11:08:30,823 INFO  [STDOUT] 2008-04-09 11:08:30,823 [http-8080-2] DEBUG org.hibernate.type.NullableType (NullableType.java:172) - returning '5' as column: DATA1_45_0_
11:08:30,823 INFO  [STDOUT] 2008-04-09 11:08:30,823 [http-8080-2] DEBUG org.hibernate.loader.Loader (Loader.java:1173) - result row: EntityKey[com.ewave.topit.etl.model.DataSet#5]
11:08:30,839 INFO  [STDOUT] 2008-04-09 11:08:30,823 [http-8080-2] DEBUG org.hibernate.loader.Loader (Loader.java:1355) - Initializing object from ResultSet: [com.ewave.topit.etl.model.DataSet#5]
11:08:30,839 INFO  [STDOUT] 2008-04-09 11:08:30,839 [http-8080-2] DEBUG org.hibernate.persister.entity.AbstractEntityPersister (AbstractEntityPersister.java:2031) - Hydrating entity: [com.ewave.topit.etl.model.DataSet#5]
11:08:30,839 INFO  [STDOUT] 2008-04-09 11:08:30,839 [http-8080-2] DEBUG org.hibernate.type.NullableType (NullableType.java:172) - returning '2008-03-17 00:00:00' as column: ETL2_45_0_
11:08:30,839 INFO  [STDOUT] 2008-04-09 11:08:30,839 [http-8080-2] DEBUG org.hibernate.type.NullableType (NullableType.java:172) - returning '2008-03-17 00:00:00' as column: FOR3_45_0_
11:08:30,839 INFO  [STDOUT] 2008-04-09 11:08:30,839 [http-8080-2] DEBUG org.hibernate.loader.Loader (Loader.java:721) - done processing result set (1 rows)
11:08:30,839 INFO  [STDOUT] 2008-04-09 11:08:30,839 [http-8080-2] DEBUG org.hibernate.jdbc.AbstractBatcher (AbstractBatcher.java:389) - about to close ResultSet (open ResultSets: 1, globally: 1)
11:08:30,839 INFO  [STDOUT] 2008-04-09 11:08:30,839 [http-8080-2] DEBUG org.hibernate.jdbc.AbstractBatcher (AbstractBatcher.java:374) - about to close PreparedStatement (open PreparedStatements: 1, globally: 1)
11:08:30,839 INFO  [STDOUT] 2008-04-09 11:08:30,839 [http-8080-2] DEBUG org.hibernate.jdbc.AbstractBatcher (AbstractBatcher.java:533) - closing statement
11:08:30,839 INFO  [STDOUT] 2008-04-09 11:08:30,839 [http-8080-2] DEBUG org.hibernate.loader.Loader (Loader.java:851) - total objects hydrated: 1
11:08:30,839 INFO  [STDOUT] 2008-04-09 11:08:30,839 [http-8080-2] DEBUG org.hibernate.engine.TwoPhaseLoad (TwoPhaseLoad.java:107) - resolving associations for [com.ewave.topit.etl.model.DataSet#5]
11:08:30,839 INFO  [STDOUT] 2008-04-09 11:08:30,839 [http-8080-2] DEBUG org.hibernate.engine.TwoPhaseLoad (TwoPhaseLoad.java:206) - done materializing entity [com.ewave.topit.etl.model.DataSet#5]
11:08:30,839 INFO  [STDOUT] 2008-04-09 11:08:30,839 [http-8080-2] DEBUG org.hibernate.engine.StatefulPersistenceContext (StatefulPersistenceContext.java:790) - initializing non-lazy collections
11:08:30,839 INFO  [STDOUT] 2008-04-09 11:08:30,839 [http-8080-2] DEBUG org.hibernate.transform.DistinctRootEntityResultTransformer (DistinctRootEntityResultTransformer.java:46) - transformed: 1 rows to: 1 distinct results
11:08:30,839 INFO  [STDOUT] 2008-04-09 11:08:30,839 [http-8080-2] DEBUG org.hibernate.engine.IdentifierValue$4 (IdentifierValue.java:77) - id unsaved-value strategy UNDEFINED
11:08:30,839 INFO  [STDOUT] 2008-04-09 11:08:30,839 [http-8080-2] DEBUG org.hibernate.persister.entity.AbstractEntityPersister (AbstractEntityPersister.java:1013) - Getting current persistent state for: [com.ewave.topit.segmentation.model.Node#1037]
11:08:30,839 INFO  [STDOUT] 2008-04-09 11:08:30,839 [http-8080-2] DEBUG org.hibernate.jdbc.AbstractBatcher (AbstractBatcher.java:366) - about to open PreparedStatement (open PreparedStatements: 0, globally: 0)
11:08:30,839 INFO  [STDOUT] 2008-04-09 11:08:30,839 [http-8080-2] DEBUG org.hibernate.jdbc.AbstractBatcher (AbstractBatcher.java:401) - /* get current state com.ewave.topit.segmentation.model.Node */ select node_.ID, node_.CONDITION_ID as CONDITION5_59_, node_.NODE_NAME as NODE2_59_, node_.NODE_ORDER as NODE3_59_, node_.PARENT_NODE_ID as PARENT4_59_ from SEG_NODES node_ where node_.ID=?
11:08:30,839 INFO  [STDOUT] Hibernate: /* get current state com.ewave.topit.segmentation.model.Node */ select node_.ID, node_.CONDITION_ID as CONDITION5_59_, node_.NODE_NAME as NODE2_59_, node_.NODE_ORDER as NODE3_59_, node_.PARENT_NODE_ID as PARENT4_59_ from SEG_NODES node_ where node_.ID=?
11:08:30,839 INFO  [STDOUT] 2008-04-09 11:08:30,839 [http-8080-2] DEBUG org.hibernate.jdbc.AbstractBatcher (AbstractBatcher.java:484) - preparing statement
11:08:30,839 INFO  [STDOUT] 2008-04-09 11:08:30,839 [http-8080-2] DEBUG org.hibernate.type.NullableType (NullableType.java:133) - binding '1037' to parameter: 1
11:08:30,855 INFO  [STDOUT] 2008-04-09 11:08:30,855 [http-8080-2] DEBUG org.hibernate.type.NullableType (NullableType.java:172) - returning '2125' as column: CONDITION5_59_
11:08:30,855 INFO  [STDOUT] 2008-04-09 11:08:30,855 [http-8080-2] DEBUG org.hibernate.type.NullableType (NullableType.java:166) - returning null as column: NODE2_59_
11:08:30,855 INFO  [STDOUT] 2008-04-09 11:08:30,855 [http-8080-2] DEBUG org.hibernate.type.NullableType (NullableType.java:172) - returning '0' as column: NODE3_59_
11:08:30,855 INFO  [STDOUT] 2008-04-09 11:08:30,855 [http-8080-2] DEBUG org.hibernate.type.NullableType (NullableType.java:166) - returning null as column: PARENT4_59_
11:08:30,855 INFO  [STDOUT] 2008-04-09 11:08:30,855 [http-8080-2] DEBUG org.hibernate.jdbc.AbstractBatcher (AbstractBatcher.java:374) - about to close PreparedStatement (open PreparedStatements: 1, globally: 1)
11:08:30,855 INFO  [STDOUT] 2008-04-09 11:08:30,855 [http-8080-2] DEBUG org.hibernate.jdbc.AbstractBatcher (AbstractBatcher.java:533) - closing statement
11:08:30,855 INFO  [STDOUT] 2008-04-09 11:08:30,855 [http-8080-2] DEBUG org.hibernate.event.def.AbstractSaveEventListener (AbstractSaveEventListener.java:523) - detached instance of: com.ewave.topit.segmentation.model.Node
11:08:30,855 INFO  [STDOUT] 2008-04-09 11:08:30,855 [http-8080-2] DEBUG org.hibernate.event.def.DefaultSaveOrUpdateEventListener (DefaultSaveOrUpdateEventListener.java:205) - updating detached instance
11:08:30,855 INFO  [STDOUT] 2008-04-09 11:08:30,855 [http-8080-2] DEBUG org.hibernate.event.def.DefaultSaveOrUpdateEventListener (DefaultSaveOrUpdateEventListener.java:272) - updating [com.ewave.topit.segmentation.model.Node#1037]
11:08:30,855 INFO  [STDOUT] 2008-04-09 11:08:30,855 [http-8080-2] DEBUG org.hibernate.event.def.DefaultSaveOrUpdateEventListener (DefaultSaveOrUpdateEventListener.java:323) - updating [com.ewave.topit.segmentation.model.Node#1037]
11:08:30,855 INFO  [STDOUT] 2008-04-09 11:08:30,855 [http-8080-2] DEBUG org.hibernate.engine.Cascade (Cascade.java:115) - processing cascade ACTION_SAVE_UPDATE for: com.ewave.topit.segmentation.model.Node
11:08:30,855 INFO  [STDOUT] 2008-04-09 11:08:30,855 [http-8080-2] DEBUG org.hibernate.engine.Cascade (Cascade.java:291) - cascade ACTION_SAVE_UPDATE for collection: com.ewave.topit.segmentation.model.Node.children
11:08:30,855 INFO  [STDOUT] 2008-04-09 11:08:30,855 [http-8080-2] DEBUG org.hibernate.engine.Cascade (Cascade.java:306) - done cascade ACTION_SAVE_UPDATE for collection: com.ewave.topit.segmentation.model.Node.children
11:08:30,855 INFO  [STDOUT] 2008-04-09 11:08:30,855 [http-8080-2] DEBUG org.hibernate.engine.Cascade (Cascade.java:317) - deleting orphans for collection: com.ewave.topit.segmentation.model.Node.children
11:08:30,855 INFO  [STDOUT] 2008-04-09 11:08:30,855 [http-8080-2] DEBUG org.hibernate.engine.Cascade (Cascade.java:353) - deleting orphaned entity instance: com.ewave.topit.segmentation.model.Node
11:08:30,855 INFO  [STDOUT] 2008-04-09 11:08:30,855 [http-8080-2] DEBUG org.hibernate.event.def.DefaultDeleteEventListener (DefaultDeleteEventListener.java:76) - entity was not persistent in delete processing
11:08:30,871 INFO  [STDOUT] 2008-04-09 11:08:30,855 [http-8080-2] DEBUG org.hibernate.engine.IdentifierValue$4 (IdentifierValue.java:77) - id unsaved-value strategy UNDEFINED
11:08:30,871 INFO  [STDOUT] 2008-04-09 11:08:30,871 [http-8080-2] DEBUG org.hibernate.persister.entity.AbstractEntityPersister (AbstractEntityPersister.java:1013) - Getting current persistent state for: [com.ewave.topit.segmentation.model.Node#1052]
11:08:30,871 INFO  [STDOUT] 2008-04-09 11:08:30,871 [http-8080-2] DEBUG org.hibernate.jdbc.AbstractBatcher (AbstractBatcher.java:366) - about to open PreparedStatement (open PreparedStatements: 0, globally: 0)
11:08:30,871 INFO  [STDOUT] 2008-04-09 11:08:30,871 [http-8080-2] DEBUG org.hibernate.jdbc.AbstractBatcher (AbstractBatcher.java:401) - /* get current state com.ewave.topit.segmentation.model.Node */ select node_.ID, node_.CONDITION_ID as CONDITION5_59_, node_.NODE_NAME as NODE2_59_, node_.NODE_ORDER as NODE3_59_, node_.PARENT_NODE_ID as PARENT4_59_ from SEG_NODES node_ where node_.ID=?
11:08:30,871 INFO  [STDOUT] Hibernate: /* get current state com.ewave.topit.segmentation.model.Node */ select node_.ID, node_.CONDITION_ID as CONDITION5_59_, node_.NODE_NAME as NODE2_59_, node_.NODE_ORDER as NODE3_59_, node_.PARENT_NODE_ID as PARENT4_59_ from SEG_NODES node_ where node_.ID=?
11:08:30,871 INFO  [STDOUT] 2008-04-09 11:08:30,871 [http-8080-2] DEBUG org.hibernate.jdbc.AbstractBatcher (AbstractBatcher.java:484) - preparing statement
11:08:30,871 INFO  [STDOUT] 2008-04-09 11:08:30,871 [http-8080-2] DEBUG org.hibernate.type.NullableType (NullableType.java:133) - binding '1052' to parameter: 1
11:08:30,871 INFO  [STDOUT] 2008-04-09 11:08:30,871 [http-8080-2] DEBUG org.hibernate.type.NullableType (NullableType.java:166) - returning null as column: CONDITION5_59_
11:08:30,871 INFO  [STDOUT] 2008-04-09 11:08:30,871 [http-8080-2] DEBUG org.hibernate.type.NullableType (NullableType.java:166) - returning null as column: NODE2_59_
11:08:30,871 INFO  [STDOUT] 2008-04-09 11:08:30,871 [http-8080-2] DEBUG org.hibernate.type.NullableType (NullableType.java:172) - returning '2' as column: NODE3_59_
11:08:30,871 INFO  [STDOUT] 2008-04-09 11:08:30,871 [http-8080-2] DEBUG org.hibernate.type.NullableType (NullableType.java:172) - returning '1037' as column: PARENT4_59_
11:08:30,871 INFO  [STDOUT] 2008-04-09 11:08:30,871 [http-8080-2] DEBUG org.hibernate.jdbc.AbstractBatcher (AbstractBatcher.java:374) - about to close PreparedStatement (open PreparedStatements: 1, globally: 1)
11:08:30,871 INFO  [STDOUT] 2008-04-09 11:08:30,871 [http-8080-2] DEBUG org.hibernate.jdbc.AbstractBatcher (AbstractBatcher.java:533) - closing statement
11:08:30,871 INFO  [STDOUT] 2008-04-09 11:08:30,871 [http-8080-2] DEBUG org.hibernate.event.def.DefaultDeleteEventListener (DefaultDeleteEventListener.java:213) - deleting [com.ewave.topit.segmentation.model.Node#1052]
11:08:30,871 INFO  [STDOUT] 2008-04-09 11:08:30,871 [http-8080-2] DEBUG org.hibernate.impl.SessionImpl (SessionImpl.java:1308) - setting cache mode to: GET
11:08:30,871 INFO  [STDOUT] 2008-04-09 11:08:30,871 [http-8080-2] DEBUG org.hibernate.engine.Cascade (Cascade.java:115) - processing cascade ACTION_DELETE for: com.ewave.topit.segmentation.model.Node
11:08:30,871 INFO  [STDOUT] 2008-04-09 11:08:30,871 [http-8080-2] DEBUG org.hibernate.engine.Cascade (Cascade.java:291) - cascade ACTION_DELETE for collection: com.ewave.topit.segmentation.model.Node.children
11:08:30,871 INFO  [STDOUT] 2008-04-09 11:08:30,871 [http-8080-2] DEBUG org.hibernate.engine.Cascade (Cascade.java:306) - done cascade ACTION_DELETE for collection: com.ewave.topit.segmentation.model.Node.children
11:08:30,871 INFO  [STDOUT] 2008-04-09 11:08:30,871 [http-8080-2] DEBUG org.hibernate.engine.Cascade (Cascade.java:317) - deleting orphans for collection: com.ewave.topit.segmentation.model.Node.children
11:08:30,871 INFO  [STDOUT] 2008-04-09 11:08:30,871 [http-8080-2] DEBUG org.hibernate.engine.Cascade (Cascade.java:327) - done deleting orphans for collection: com.ewave.topit.segmentation.model.Node.children
11:08:30,871 INFO  [STDOUT] 2008-04-09 11:08:30,871 [http-8080-2] DEBUG org.hibernate.engine.Cascade (Cascade.java:150) - done processing cascade ACTION_DELETE for: com.ewave.topit.segmentation.model.Node
11:08:30,871 INFO  [STDOUT] 2008-04-09 11:08:30,871 [http-8080-2] DEBUG org.hibernate.impl.SessionImpl (SessionImpl.java:1308) - setting cache mode to: NORMAL
11:08:30,886 INFO  [STDOUT] 2008-04-09 11:08:30,886 [http-8080-2] DEBUG org.hibernate.impl.SessionImpl (SessionImpl.java:1308) - setting cache mode to: GET
11:08:30,886 INFO  [STDOUT] 2008-04-09 11:08:30,886 [http-8080-2] DEBUG org.hibernate.engine.Cascade (Cascade.java:115) - processing cascade ACTION_DELETE for: com.ewave.topit.segmentation.model.Node
11:08:30,886 INFO  [STDOUT] 2008-04-09 11:08:30,886 [http-8080-2] DEBUG org.hibernate.engine.CascadingAction$1 (CascadingAction.java:119) - cascading to delete: com.ewave.topit.segmentation.model.Node
11:08:30,886 INFO  [STDOUT] 2008-04-09 11:08:30,886 [http-8080-2] DEBUG org.hibernate.event.def.DefaultDeleteEventListener (DefaultDeleteEventListener.java:119) - deleting a persistent instance
11:08:30,886 INFO  [STDOUT] 2008-04-09 11:08:30,886 [http-8080-2] DEBUG org.hibernate.event.def.DefaultDeleteEventListener (DefaultDeleteEventListener.java:213) - deleting [com.ewave.topit.segmentation.model.Node#1037]
11:08:30,886 INFO  [STDOUT] 2008-04-09 11:08:30,886 [http-8080-2] DEBUG org.hibernate.impl.SessionImpl (SessionImpl.java:1308) - setting cache mode to: GET
11:08:30,886 INFO  [STDOUT] 2008-04-09 11:08:30,886 [http-8080-2] DEBUG org.hibernate.engine.Cascade (Cascade.java:115) - processing cascade ACTION_DELETE for: com.ewave.topit.segmentation.model.Node
11:08:30,886 INFO  [STDOUT] 2008-04-09 11:08:30,886 [http-8080-2] DEBUG org.hibernate.engine.Cascade (Cascade.java:291) - cascade ACTION_DELETE for collection: com.ewave.topit.segmentation.model.Node.children
11:08:30,886 INFO  [STDOUT] 2008-04-09 11:08:30,886 [http-8080-2] DEBUG org.hibernate.engine.Cascade (Cascade.java:306) - done cascade ACTION_DELETE for collection: com.ewave.topit.segmentation.model.Node.children
11:08:30,886 INFO  [STDOUT] 2008-04-09 11:08:30,886 [http-8080-2] DEBUG org.hibernate.engine.Cascade (Cascade.java:317) - deleting orphans for collection: com.ewave.topit.segmentation.model.Node.children
11:08:30,886 INFO  [STDOUT] 2008-04-09 11:08:30,886 [http-8080-2] DEBUG org.hibernate.engine.Cascade (Cascade.java:353) - deleting orphaned entity instance: com.ewave.topit.segmentation.model.Node
11:08:30,886 INFO  [STDOUT] 2008-04-09 11:08:30,886 [http-8080-2] DEBUG org.hibernate.event.def.DefaultDeleteEventListener (DefaultDeleteEventListener.java:119) - deleting a persistent instance
11:08:30,886 INFO  [STDOUT] 2008-04-09 11:08:30,886 [http-8080-2] DEBUG org.hibernate.event.def.DefaultDeleteEventListener (DefaultDeleteEventListener.java:122) - object was already deleted
11:08:30,886 INFO  [STDOUT] 2008-04-09 11:08:30,886 [http-8080-2] DEBUG org.hibernate.engine.Cascade (Cascade.java:353) - deleting orphaned entity instance: com.ewave.topit.segmentation.model.Node
11:08:30,886 INFO  [STDOUT] 2008-04-09 11:08:30,886 [http-8080-2] DEBUG org.hibernate.event.def.DefaultDeleteEventListener (DefaultDeleteEventListener.java:76) - entity was not persistent in delete processing
11:08:30,886 INFO  [STDOUT] 2008-04-09 11:08:30,886 [http-8080-2] DEBUG org.hibernate.engine.IdentifierValue$4 (IdentifierValue.java:77) - id unsaved-value strategy UNDEFINED
11:08:30,886 INFO  [STDOUT] 2008-04-09 11:08:30,886 [http-8080-2] DEBUG org.hibernate.persister.entity.AbstractEntityPersister (AbstractEntityPersister.java:1013) - Getting current persistent state for: [com.ewave.topit.segmentation.model.Node#1051]
11:08:30,902 INFO  [STDOUT] 2008-04-09 11:08:30,886 [http-8080-2] DEBUG org.hibernate.jdbc.AbstractBatcher (AbstractBatcher.java:366) - about to open PreparedStatement (open PreparedStatements: 0, globally: 0)
11:08:30,902 INFO  [STDOUT] 2008-04-09 11:08:30,902 [http-8080-2] DEBUG org.hibernate.jdbc.AbstractBatcher (AbstractBatcher.java:401) - /* get current state com.ewave.topit.segmentation.model.Node */ select node_.ID, node_.CONDITION_ID as CONDITION5_59_, node_.NODE_NAME as NODE2_59_, node_.NODE_ORDER as NODE3_59_, node_.PARENT_NODE_ID as PARENT4_59_ from SEG_NODES node_ where node_.ID=?
11:08:30,902 INFO  [STDOUT] Hibernate: /* get current state com.ewave.topit.segmentation.model.Node */ select node_.ID, node_.CONDITION_ID as CONDITION5_59_, node_.NODE_NAME as NODE2_59_, node_.NODE_ORDER as NODE3_59_, node_.PARENT_NODE_ID as PARENT4_59_ from SEG_NODES node_ where node_.ID=?
11:08:30,902 INFO  [STDOUT] 2008-04-09 11:08:30,902 [http-8080-2] DEBUG org.hibernate.jdbc.AbstractBatcher (AbstractBatcher.java:484) - preparing statement
11:08:30,902 INFO  [STDOUT] 2008-04-09 11:08:30,902 [http-8080-2] DEBUG org.hibernate.type.NullableType (NullableType.java:133) - binding '1051' to parameter: 1
11:08:30,902 INFO  [STDOUT] 2008-04-09 11:08:30,902 [http-8080-2] DEBUG org.hibernate.type.NullableType (NullableType.java:166) - returning null as column: CONDITION5_59_
11:08:30,902 INFO  [STDOUT] 2008-04-09 11:08:30,902 [http-8080-2] DEBUG org.hibernate.type.NullableType (NullableType.java:166) - returning null as column: NODE2_59_
11:08:30,902 INFO  [STDOUT] 2008-04-09 11:08:30,902 [http-8080-2] DEBUG org.hibernate.type.NullableType (NullableType.java:172) - returning '1' as column: NODE3_59_
11:08:30,902 INFO  [STDOUT] 2008-04-09 11:08:30,902 [http-8080-2] DEBUG org.hibernate.type.NullableType (NullableType.java:172) - returning '1037' as column: PARENT4_59_
11:08:30,902 INFO  [STDOUT] 2008-04-09 11:08:30,902 [http-8080-2] DEBUG org.hibernate.jdbc.AbstractBatcher (AbstractBatcher.java:374) - about to close PreparedStatement (open PreparedStatements: 1, globally: 1)
11:08:30,902 INFO  [STDOUT] 2008-04-09 11:08:30,902 [http-8080-2] DEBUG org.hibernate.jdbc.AbstractBatcher (AbstractBatcher.java:533) - closing statement
11:08:30,902 INFO  [STDOUT] 2008-04-09 11:08:30,902 [http-8080-2] DEBUG org.hibernate.event.def.DefaultDeleteEventListener (DefaultDeleteEventListener.java:213) - deleting [com.ewave.topit.segmentation.model.Node#1051]
11:08:30,902 INFO  [STDOUT] 2008-04-09 11:08:30,902 [http-8080-2] DEBUG org.hibernate.impl.SessionImpl (SessionImpl.java:1308) - setting cache mode to: GET
11:08:30,902 INFO  [STDOUT] 2008-04-09 11:08:30,902 [http-8080-2] DEBUG org.hibernate.engine.Cascade (Cascade.java:115) - processing cascade ACTION_DELETE for: com.ewave.topit.segmentation.model.Node
11:08:30,902 INFO  [STDOUT] 2008-04-09 11:08:30,902 [http-8080-2] DEBUG org.hibernate.engine.Cascade (Cascade.java:291) - cascade ACTION_DELETE for collection: com.ewave.topit.segmentation.model.Node.children
11:08:30,902 INFO  [STDOUT] 2008-04-09 11:08:30,902 [http-8080-2] DEBUG org.hibernate.engine.Cascade (Cascade.java:306) - done cascade ACTION_DELETE for collection: com.ewave.topit.segmentation.model.Node.children
11:08:30,902 INFO  [STDOUT] 2008-04-09 11:08:30,902 [http-8080-2] DEBUG org.hibernate.engine.Cascade (Cascade.java:317) - deleting orphans for collection: com.ewave.topit.segmentation.model.Node.children
11:08:30,902 INFO  [STDOUT] 2008-04-09 11:08:30,902 [http-8080-2] DEBUG org.hibernate.engine.Cascade (Cascade.java:327) - done deleting orphans for collection: com.ewave.topit.segmentation.model.Node.children
11:08:30,902 INFO  [STDOUT] 2008-04-09 11:08:30,902 [http-8080-2] DEBUG org.hibernate.engine.Cascade (Cascade.java:150) - done processing cascade ACTION_DELETE for: com.ewave.topit.segmentation.model.Node
11:08:30,902 INFO  [STDOUT] 2008-04-09 11:08:30,902 [http-8080-2] DEBUG org.hibernate.impl.SessionImpl (SessionImpl.java:1308) - setting cache mode to: GET
11:08:30,902 INFO  [STDOUT] 2008-04-09 11:08:30,902 [http-8080-2] DEBUG org.hibernate.impl.SessionImpl (SessionImpl.java:1308) - setting cache mode to: GET
11:08:30,902 INFO  [STDOUT] 2008-04-09 11:08:30,902 [http-8080-2] DEBUG org.hibernate.engine.Cascade (Cascade.java:115) - processing cascade ACTION_DELETE for: com.ewave.topit.segmentation.model.Node
11:08:30,902 INFO  [STDOUT] 2008-04-09 11:08:30,902 [http-8080-2] DEBUG org.hibernate.engine.CascadingAction$1 (CascadingAction.java:119) - cascading to delete: com.ewave.topit.segmentation.model.Node
11:08:30,902 INFO  [STDOUT] 2008-04-09 11:08:30,902 [http-8080-2] DEBUG org.hibernate.event.def.DefaultDeleteEventListener (DefaultDeleteEventListener.java:119) - deleting a persistent instance
11:08:30,902 INFO  [STDOUT] 2008-04-09 11:08:30,902 [http-8080-2] DEBUG org.hibernate.event.def.DefaultDeleteEventListener (DefaultDeleteEventListener.java:122) - object was already deleted
11:08:30,918 INFO  [STDOUT] 2008-04-09 11:08:30,902 [http-8080-2] DEBUG org.hibernate.engine.Cascade (Cascade.java:150) - done processing cascade ACTION_DELETE for: com.ewave.topit.segmentation.model.Node
11:08:30,918 INFO  [STDOUT] 2008-04-09 11:08:30,918 [http-8080-2] DEBUG org.hibernate.impl.SessionImpl (SessionImpl.java:1308) - setting cache mode to: GET
11:08:30,918 INFO  [STDOUT] 2008-04-09 11:08:30,918 [http-8080-2] DEBUG org.hibernate.engine.Cascade (Cascade.java:327) - done deleting orphans for collection: com.ewave.topit.segmentation.model.Node.children
11:08:30,918 INFO  [STDOUT] 2008-04-09 11:08:30,918 [http-8080-2] DEBUG org.hibernate.engine.Cascade (Cascade.java:150) - done processing cascade ACTION_DELETE for: com.ewave.topit.segmentation.model.Node
11:08:30,918 INFO  [STDOUT] 2008-04-09 11:08:30,918 [http-8080-2] DEBUG org.hibernate.impl.SessionImpl (SessionImpl.java:1308) - setting cache mode to: GET
11:08:30,918 INFO  [STDOUT] 2008-04-09 11:08:30,918 [http-8080-2] DEBUG org.hibernate.engine.IdentifierValue$4 (IdentifierValue.java:77) - id unsaved-value strategy UNDEFINED
11:08:30,918 INFO  [STDOUT] 2008-04-09 11:08:30,918 [http-8080-2] DEBUG org.hibernate.persister.entity.AbstractEntityPersister (AbstractEntityPersister.java:1013) - Getting current persistent state for: [com.ewave.topit.conditiontool.model.Condition#2125]
11:08:30,918 INFO  [STDOUT] 2008-04-09 11:08:30,918 [http-8080-2] DEBUG org.hibernate.jdbc.AbstractBatcher (AbstractBatcher.java:366) - about to open PreparedStatement (open PreparedStatements: 0, globally: 0)
11:08:30,918 INFO  [STDOUT] 2008-04-09 11:08:30,918 [http-8080-2] DEBUG org.hibernate.jdbc.AbstractBatcher (AbstractBatcher.java:401) - /* get current state com.ewave.topit.conditiontool.model.Condition */ select condition_.CONDITION_ID, condition_.CONDITION as CONDITION35_, condition_.CONDITION_STATE as CONDITION3_35_ from TI_CONDITION condition_ where condition_.CONDITION_ID=?
11:08:30,918 INFO  [STDOUT] Hibernate: /* get current state com.ewave.topit.conditiontool.model.Condition */ select condition_.CONDITION_ID, condition_.CONDITION as CONDITION35_, condition_.CONDITION_STATE as CONDITION3_35_ from TI_CONDITION condition_ where condition_.CONDITION_ID=?
11:08:30,918 INFO  [STDOUT] 2008-04-09 11:08:30,918 [http-8080-2] DEBUG org.hibernate.jdbc.AbstractBatcher (AbstractBatcher.java:484) - preparing statement
11:08:30,918 INFO  [STDOUT] 2008-04-09 11:08:30,918 [http-8080-2] DEBUG org.hibernate.type.NullableType (NullableType.java:133) - binding '2125' to parameter: 1
11:08:30,918 INFO  [STDOUT] 2008-04-09 11:08:30,918 [http-8080-2] DEBUG org.hibernate.type.NullableType (NullableType.java:172) - returning '(SUBSCRIBER is not null)' as column: CONDITION35_
11:08:30,918 INFO  [STDOUT] 2008-04-09 11:08:30,918 [http-8080-2] DEBUG org.hibernate.type.NullableType (NullableType.java:172) - returning 'Basic' as column: CONDITION3_35_
11:08:30,918 INFO  [STDOUT] 2008-04-09 11:08:30,918 [http-8080-2] DEBUG org.hibernate.jdbc.AbstractBatcher (AbstractBatcher.java:374) - about to close PreparedStatement (open PreparedStatements: 1, globally: 1)
11:08:30,918 INFO  [STDOUT] 2008-04-09 11:08:30,918 [http-8080-2] DEBUG org.hibernate.jdbc.AbstractBatcher (AbstractBatcher.java:533) - closing statement
11:08:30,918 INFO  [STDOUT] 2008-04-09 11:08:30,918 [http-8080-2] DEBUG org.hibernate.impl.SessionImpl (SessionImpl.java:1308) - setting cache mode to: GET
11:08:30,918 INFO  [STDOUT] 2008-04-09 11:08:30,918 [http-8080-2] DEBUG org.hibernate.engine.Cascade (Cascade.java:115) - processing cascade ACTION_DELETE for: com.ewave.topit.segmentation.model.Node
11:08:30,918 INFO  [STDOUT] 2008-04-09 11:08:30,918 [http-8080-2] DEBUG org.hibernate.engine.CascadingAction$1 (CascadingAction.java:119) - cascading to delete: com.ewave.topit.conditiontool.model.Condition
11:08:30,918 INFO  [STDOUT] 2008-04-09 11:08:30,918 [http-8080-2] DEBUG org.hibernate.event.def.DefaultDeleteEventListener (DefaultDeleteEventListener.java:76) - entity was not persistent in delete processing
11:08:30,918 INFO  [STDOUT] 2008-04-09 11:08:30,918 [http-8080-2] DEBUG org.hibernate.engine.IdentifierValue$4 (IdentifierValue.java:77) - id unsaved-value strategy UNDEFINED
11:08:30,918 INFO  [STDOUT] 2008-04-09 11:08:30,918 [http-8080-2] DEBUG org.hibernate.event.def.DefaultDeleteEventListener (DefaultDeleteEventListener.java:213) - deleting [com.ewave.topit.conditiontool.model.Condition#2125]
11:08:30,918 INFO  [STDOUT] 2008-04-09 11:08:30,918 [http-8080-2] DEBUG org.hibernate.impl.SessionImpl (SessionImpl.java:1308) - setting cache mode to: GET
11:08:30,918 INFO  [STDOUT] 2008-04-09 11:08:30,918 [http-8080-2] DEBUG org.hibernate.engine.Cascade (Cascade.java:115) - processing cascade ACTION_DELETE for: com.ewave.topit.conditiontool.model.Condition
11:08:30,918 INFO  [STDOUT] 2008-04-09 11:08:30,918 [http-8080-2] DEBUG org.hibernate.engine.Cascade (Cascade.java:291) - cascade ACTION_DELETE for collection: com.ewave.topit.conditiontool.model.Condition.tiConditionDetails
11:08:30,918 INFO  [STDOUT] 2008-04-09 11:08:30,918 [http-8080-2] DEBUG org.hibernate.engine.Cascade (Cascade.java:306) - done cascade ACTION_DELETE for collection: com.ewave.topit.conditiontool.model.Condition.tiConditionDetails
11:08:30,918 INFO  [STDOUT] 2008-04-09 11:08:30,918 [http-8080-2] DEBUG org.hibernate.engine.Cascade (Cascade.java:150) - done processing cascade ACTION_DELETE for: com.ewave.topit.conditiontool.model.Condition
11:08:30,933 INFO  [STDOUT] 2008-04-09 11:08:30,918 [http-8080-2] DEBUG org.hibernate.impl.SessionImpl (SessionImpl.java:1308) - setting cache mode to: GET
11:08:30,933 INFO  [STDOUT] 2008-04-09 11:08:30,933 [http-8080-2] DEBUG org.hibernate.impl.SessionImpl (SessionImpl.java:1308) - setting cache mode to: GET
11:08:30,933 INFO  [STDOUT] 2008-04-09 11:08:30,933 [http-8080-2] DEBUG org.hibernate.engine.Cascade (Cascade.java:115) - processing cascade ACTION_DELETE for: com.ewave.topit.conditiontool.model.Condition
11:08:30,933 INFO  [STDOUT] 2008-04-09 11:08:30,933 [http-8080-2] DEBUG org.hibernate.engine.Cascade (Cascade.java:150) - done processing cascade ACTION_DELETE for: com.ewave.topit.conditiontool.model.Condition
11:08:30,933 INFO  [STDOUT] 2008-04-09 11:08:30,933 [http-8080-2] DEBUG org.hibernate.impl.SessionImpl (SessionImpl.java:1308) - setting cache mode to: GET
11:08:30,933 INFO  [STDOUT] 2008-04-09 11:08:30,933 [http-8080-2] DEBUG org.hibernate.engine.Cascade (Cascade.java:150) - done processing cascade ACTION_DELETE for: com.ewave.topit.segmentation.model.Node
11:08:30,933 INFO  [STDOUT] 2008-04-09 11:08:30,933 [http-8080-2] DEBUG org.hibernate.impl.SessionImpl (SessionImpl.java:1308) - setting cache mode to: GET
11:08:30,933 INFO  [STDOUT] 2008-04-09 11:08:30,933 [http-8080-2] DEBUG org.hibernate.engine.Cascade (Cascade.java:150) - done processing cascade ACTION_DELETE for: com.ewave.topit.segmentation.model.Node
11:08:30,933 INFO  [STDOUT] 2008-04-09 11:08:30,933 [http-8080-2] DEBUG org.hibernate.impl.SessionImpl (SessionImpl.java:1308) - setting cache mode to: NORMAL
11:08:30,933 INFO  [STDOUT] 2008-04-09 11:08:30,933 [http-8080-2] DEBUG org.hibernate.engine.Cascade (Cascade.java:353) - deleting orphaned entity instance: com.ewave.topit.segmentation.model.Node
11:08:30,933 INFO  [STDOUT] 2008-04-09 11:08:30,933 [http-8080-2] DEBUG org.hibernate.event.def.DefaultDeleteEventListener (DefaultDeleteEventListener.java:119) - deleting a persistent instance
11:08:30,933 INFO  [STDOUT] 2008-04-09 11:08:30,933 [http-8080-2] DEBUG org.hibernate.event.def.DefaultDeleteEventListener (DefaultDeleteEventListener.java:122) - object was already deleted
11:08:30,933 INFO  [STDOUT] 2008-04-09 11:08:30,933 [http-8080-2] DEBUG org.hibernate.engine.Cascade (Cascade.java:327) - done deleting orphans for collection: com.ewave.topit.segmentation.model.Node.children
11:08:30,933 INFO  [STDOUT] 2008-04-09 11:08:30,933 [http-8080-2] DEBUG org.hibernate.engine.CascadingAction$5 (CascadingAction.java:216) - cascading to saveOrUpdate: com.ewave.topit.conditiontool.model.Condition
11:08:30,933 INFO  [STDOUT] 2008-04-09 11:08:30,933 [http-8080-2] DEBUG org.hibernate.event.def.AbstractSaveEventListener (AbstractSaveEventListener.java:498) - deleted instance of: com.ewave.topit.conditiontool.model.Condition
11:08:30,933 INFO  [STDOUT] 2008-04-09 11:08:30,933 [http-8080-2] DEBUG org.hibernate.event.def.DefaultSaveOrUpdateEventListener (DefaultSaveOrUpdateEventListener.java:158) - saving transient instance
11:08:30,933 INFO  [STDOUT] 2008-04-09 11:08:30,933 [http-8080-2] DEBUG org.hibernate.impl.SessionImpl (SessionImpl.java:1007) - flushing to force deletion of re-saved object: [com.ewave.topit.conditiontool.model.Condition#2125]
11:08:30,996 INFO  [STDOUT] 2008-04-09 11:08:30,996 [http-8080-2] DEBUG org.hibernate.transaction.JDBCTransaction (JDBCTransaction.java:152) - rollback
11:08:30,996 INFO  [STDOUT] 2008-04-09 11:08:30,996 [http-8080-2] DEBUG org.hibernate.transaction.JDBCTransaction (JDBCTransaction.java:193) - re-enabling autocommit
11:08:30,996 INFO  [STDOUT] 2008-04-09 11:08:30,996 [http-8080-2] DEBUG org.hibernate.transaction.JDBCTransaction (JDBCTransaction.java:163) - rolled back JDBC Connection
11:08:30,996 INFO  [STDOUT] 2008-04-09 11:08:30,996 [http-8080-2] DEBUG org.hibernate.jdbc.JDBCContext (JDBCContext.java:215) - after transaction completion
11:08:30,996 INFO  [STDOUT] 2008-04-09 11:08:30,996 [http-8080-2] DEBUG org.hibernate.jdbc.ConnectionManager (ConnectionManager.java:302) - transaction completed on session with on_close connection release mode; be sure to close the session to release JDBC resources!
11:08:30,996 INFO  [STDOUT] 2008-04-09 11:08:30,996 [http-8080-2] DEBUG org.hibernate.impl.SessionImpl (SessionImpl.java:422) - after transaction completion
11:08:30,996 INFO  [STDOUT] 2008-04-09 11:08:30,996 [http-8080-2] DEBUG org.hibernate.impl.SessionImpl (SessionImpl.java:273) - closing session
11:08:30,996 INFO  [STDOUT] 2008-04-09 11:08:30,996 [http-8080-2] DEBUG org.hibernate.jdbc.ConnectionManager (ConnectionManager.java:380) - performing cleanup
11:08:30,996 INFO  [STDOUT] 2008-04-09 11:08:30,996 [http-8080-2] DEBUG org.hibernate.jdbc.ConnectionManager (ConnectionManager.java:441) - releasing JDBC connection [ (open PreparedStatements: 0, globally: 0) (open ResultSets: 0, globally: 0)]
11:08:30,996 INFO  [STDOUT] 2008-04-09 11:08:30,996 [http-8080-2] DEBUG org.hibernate.jdbc.JDBCContext (JDBCContext.java:215) - after transaction completion
11:08:30,996 INFO  [STDOUT] 2008-04-09 11:08:30,996 [http-8080-2] DEBUG org.hibernate.jdbc.ConnectionManager (ConnectionManager.java:302) - transaction completed on session with on_close connection release mode; be sure to close the session to release JDBC resources!
11:08:30,996 INFO  [STDOUT] 2008-04-09 11:08:30,996 [http-8080-2] DEBUG org.hibernate.impl.SessionImpl (SessionImpl.java:422) - after transaction completion
11:08:31,028 ERROR [STDERR] 09/04/2008 11:08:31 com.sun.faces.application.ActionListenerImpl processAction
SEVERE: org.hibernate.ObjectDeletedException: deleted object would be re-saved by cascade (remove deleted object from associations): [com.ewave.topit.conditiontool.model.Condition#2125]



[/code]


Top
 Profile  
 
 Post subject:
PostPosted: Thu Apr 10, 2008 1:07 pm 
Newbie

Joined: Fri Mar 21, 2008 2:20 pm
Posts: 10
Location: London
Hi,

I would think it's more likely that you are not deleting all references to the object(s) being deleted before calling update - this is the usual (only?) cause of the deleted object would be re-saved exception.

I'd check the following is being done for the subtree that is being deleted, let's say the subtree has a root node object called root -

1. The root node is being removed from the child set of the parent node of the root node, e.g. root.getParent().getChildren().remove( root.getParent().getChildren().indexOf(root) )

2. The parent field of the root node of the subtree being deleted is set null, e.g. root.setParent(null);

3. The nodes in the subtree aren't referenced by any other object in the object graph.

Andy.

PS. Just noticed you are using a TreeSet to hold the children of a node. Maybe you have a specific reason for that, but of course the simplest way of modelling an n-ary tree is simply for all elements to be of the same class, E.g. Node, and for the Node to have a parent field, and a List<Node> children field

I'd be tempted to try and simplify the data model if you don't need a TreeSet for some specific purpose.

_________________
http:// www.techfoundry.com


Top
 Profile  
 
 Post subject:
PostPosted: Sun Apr 13, 2008 4:02 am 
Newbie

Joined: Wed Apr 09, 2008 3:37 am
Posts: 4
Location: Tel Aviv, Israel
Quote:
2. The parent field of the root node of the subtree being deleted is set null, e.g. root.setParent(null);


This seemed to have done the trick; however, I'm still baffled as to why this was causing any problem - it was the node being deleted which was holding a reference to its parent, not the other way around.

Quote:
PS. Just noticed you are using a TreeSet to hold the children of a node. Maybe you have a specific reason for that, but of course the simplest way of modelling an n-ary tree is simply for all elements to be of the same class, E.g. Node, and for the Node to have a parent field, and a List<Node> children field


I am implementing it using the simplest way you have described; the TreeSet is simply an implementation of SortedSet. It has nothing to do with my implementation of a Tree model :)

Moreover, I tend to use Sets instead of Lists wherever possible, to avoid problems with Bag semantics, etc, and generally because in most cases, you don't really need a list.

Anyway, thanks, +1.

Shai


Top
 Profile  
 
Display posts from previous:  Sort by  
Forum locked This topic is locked, you cannot edit posts or make further replies.  [ 3 posts ] 

All times are UTC - 5 hours [ DST ]


You cannot post new topics in this forum
You cannot reply to topics in this forum
You cannot edit your posts in this forum
You cannot delete your posts in this forum

Search for:
© Copyright 2014, Red Hat Inc. All rights reserved. JBoss and Hibernate are registered trademarks and servicemarks of Red Hat, Inc.