-->
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.  [ 1 post ] 
Author Message
 Post subject: org.hibernate.NonUniqueObjectException
PostPosted: Sun Mar 05, 2006 1:11 pm 
Newbie

Joined: Sun Mar 05, 2006 12:43 pm
Posts: 5
Need help with Hibernate? Read this first:
http://www.hibernate.org/ForumMailingli ... AskForHelp

Hibernate version:3.1.2

Mapping documents:
<?xml version="1.0" encoding="UTF-8"?>

<!DOCTYPE hibernate-mapping PUBLIC
"-//Hibernate/Hibernate Mapping DTD 3.0//EN"
"http://hibernate.sourceforge.net/hibernate-mapping-3.0.dtd">

<hibernate-mapping
>
<class
name="com.stufftolet.model.posting.PostingDetails"
table="posting_details"
>
<cache usage="transactional" />

<id
name="id"
type="java.lang.Long"
unsaved-value="none"
>
<column
name="id"
sql-type="BIGINT(12) UNSIGNED"
/>
<generator class="assigned">
<!--
To add non XDoclet generator parameters, create a file named
hibernate-generator-params-PostingDetails.xml
containing the additional parameters and place it in your merge dir.
-->
</generator>
</id>

<many-to-one
name="category"
class="com.stufftolet.model.posting.Category"
cascade="none"
outer-join="auto"
update="true"
insert="true"
column="fk_category_id"
not-null="true"
/>

<many-to-one
name="createdBy"
class="com.stufftolet.model.users.User"
cascade="none"
outer-join="auto"
update="false"
insert="true"
column="created_by"
not-null="true"
/>

<property
name="created"
type="java.util.Date"
update="false"
insert="true"
column="created"
not-null="true"
/>

<property
name="start"
type="java.util.Date"
update="true"
insert="true"
column="start"
not-null="true"
/>

<property
name="updated"
type="java.util.Date"
update="true"
insert="true"
column="updated"
not-null="false"
/>

<property
name="expire"
type="java.util.Date"
update="true"
insert="true"
column="expire"
not-null="true"
/>

<many-to-one
name="timeZone"
class="com.stufftolet.model.TimeZone"
cascade="none"
outer-join="auto"
update="true"
insert="true"
column="fk_time_zone_id"
not-null="true"
/>

<property
name="resubmit"
type="java.lang.Integer"
update="true"
insert="true"
>
<column
name="resubmit"
not-null="false"
sql-type="TINYINT UNSIGNED ZEROFILL"
/>
</property>

<set
name="lessorAddress"
lazy="true"
inverse="true"
cascade="all-delete-orphan"
sort="unsorted"
access="field"
>

<key
column="post_id"
>
</key>

<one-to-many
class="com.stufftolet.model.posting.LessorAddress"
/>

</set>

<set
name="lessorContact"
lazy="true"
inverse="true"
cascade="all-delete-orphan"
sort="unsorted"
access="field"
>

<key
column="post_id"
>
</key>

<one-to-many
class="com.stufftolet.model.posting.LessorContact"
/>

</set>

<set
name="postingImages"
lazy="true"
inverse="true"
cascade="all-delete-orphan"
sort="unsorted"
order-by="image_name"
access="field"
>

<key
column="post_id"
>
</key>

<one-to-many
class="com.stufftolet.model.posting.PostingImages"
/>

</set>

<property
name="description"
type="text"
update="true"
insert="true"
>
<column
name="description"
/>
</property>

<property
name="title"
type="java.lang.String"
update="true"
insert="true"
column="title"
length="100"
not-null="true"
/>

<property
name="subtitle"
type="java.lang.String"
update="true"
insert="true"
column="subtitle"
length="200"
not-null="false"
/>

<property
name="duration"
type="java.lang.Integer"
update="true"
insert="true"
>
<column
name="duration"
not-null="true"
sql-type="SMALLINT UNSIGNED"
/>
</property>

<set
name="rental"
lazy="true"
inverse="true"
cascade="all-delete-orphan"
sort="unsorted"
>

<key
column="fk_post_id"
>
</key>

<one-to-many
class="com.stufftolet.model.posting.Rental"
/>

</set>

<property
name="availableDate"
type="java.util.Date"
update="true"
insert="true"
column="available_date"
not-null="true"
/>

<!--
To add non XDoclet property mappings, create a file named
hibernate-properties-PostingDetails.xml
containing the additional properties and place it in your merge dir.
-->

<joined-subclass
name="com.stufftolet.model.posting.RealEstate"
table="real_estate"
>
<key
column="id"
/>
<property
name="agent"
type="yes_no"
update="true"
insert="true"
column="agent"
/>

<property
name="realEstateSetting"
type="java.lang.String"
update="true"
insert="true"
column="real_estate_setting"
length="2"
not-null="true"
/>

<property
name="sqfootage"
type="big_decimal"
update="true"
insert="true"
>
<column
name="sqfootage"
sql-type="numeric(8,2)"
/>
</property>

<property
name="displayContact"
type="yes_no"
update="true"
insert="true"
column="display_contact"
/>

<joined-subclass
name="com.stufftolet.model.posting.CommercialRealEstate"
table="commercial_real_estate"
>
<key
column="id"
/>

</joined-subclass>
<joined-subclass
name="com.stufftolet.model.posting.ResidentialRealEstate"
table="residential_real_estate"
>
<key
column="id"
/>

<component
name="residentialRealEstateFacilities"
class="com.stufftolet.model.posting.ResidentialRealEstateFacilities"
>
<property
name="balcony"
type="yes_no"
update="true"
insert="true"
column="balcony"
/>

<property
name="controlledAccess"
type="yes_no"
update="true"
insert="true"
column="controlled_access"
/>

<property
name="elevator"
type="yes_no"
update="true"
insert="true"
column="elevator"
/>

<property
name="fitnessCentre"
type="yes_no"
update="true"
insert="true"
column="fitness_centre"
/>

<property
name="parkingSpace"
type="yes_no"
update="true"
insert="true"
column="parking_space"
/>

<property
name="playground"
type="yes_no"
update="true"
insert="true"
column="playground"
/>

<property
name="pool"
type="yes_no"
update="true"
insert="true"
column="pool"
/>

<property
name="spa"
type="yes_no"
update="true"
insert="true"
column="spa"
/>

<property
name="tennisCourt"
type="yes_no"
update="true"
insert="true"
column="tennis_court"
/>

</component>

<component
name="residentialRealEstateFeatures"
class="com.stufftolet.model.posting.ResidentialRealEstateFeatures"
>
<property
name="aircon"
type="yes_no"
update="true"
insert="true"
column="aircon"
/>

<property
name="cableReady"
type="yes_no"
update="true"
insert="true"
column="cable_ready"
/>

<property
name="ceilingFan"
type="yes_no"
update="true"
insert="true"
column="ceiling_fan"
/>

<property
name="dryer"
type="yes_no"
update="true"
insert="true"
column="dryer"
/>

<property
name="flooring"
type="yes_no"
update="true"
insert="true"
column="flooring"
/>

<property
name="furnish"
type="char"
update="true"
insert="true"
column="furnish"
not-null="true"
/>

<property
name="microwave"
type="yes_no"
update="true"
insert="true"
column="microwave"
/>

<property
name="oven"
type="yes_no"
update="true"
insert="true"
column="oven"
/>

<property
name="refrigerator"
type="yes_no"
update="true"
insert="true"
column="refrigerator"
/>

<property
name="washer"
type="yes_no"
update="true"
insert="true"
column="washer"
/>

</component>

<component
name="residentialRealEstatePolicy"
class="com.stufftolet.model.posting.ResidentialRealEstatePolicy"
>
<property
name="allowpet"
type="yes_no"
update="true"
insert="true"
column="allow_pet"
/>

<property
name="cooking"
type="char"
update="true"
insert="true"
column="cooking"
not-null="true"
/>

</component>

<property
name="bedroom"
type="char"
update="true"
insert="true"
column="bedroom"
not-null="true"
/>

<property
name="bathroom"
type="java.lang.Integer"
update="true"
insert="true"
>
<column
name="bathroom"
not-null="true"
sql-type="TINYINT(1) UNSIGNED ZEROFILL"
/>
</property>

<property
name="entireUnit"
type="yes_no"
update="true"
insert="true"
column="entire_unit"
/>

</joined-subclass>

</joined-subclass>

</class>

<query name="PostingDetail"><![CDATA[
from PostingDetails pid where pid.id = ?
]]></query>
<query name="ResidentialRealEstateByFurnishCondition"><![CDATA[
from ResidentialRealEstate rp where rp.residentialRealEstateFeatures.furnish = ?
]]></query>
<query name="ResidentialRealEstateByCookingPolicy"><![CDATA[
from ResidentialRealEstate rp where rp.residentialRealEstatePolicy.cooking = ?
]]></query>
<query name="ResidentialRealEstateByRealEstateSetting"><![CDATA[
from ResidentialRealEstate rp where rp.realEstateSetting = ?
]]></query>
<query name="PostingListByPostId"><![CDATA[
from PostingDetails pid where pid.id in (:pids)
]]></query>
<query name="findPostingDetailsByCategoryAndCity"><![CDATA[
from PostingDetails as pid left join pid.lessorAddress as addr where addr.city = ? and pid.category.id = ?
]]></query>
<query name="PostingListByCategoryId"><![CDATA[
from PostingDetails pd where pd.expire > (:today) and pd.start <= (:today) and pd.category.id in (:cids) and pd.timeZone.id = (:timeZoneId) order by pd.created DESC
]]></query>
<query name="findUserPostingList"><![CDATA[
from PostingDetails pd where pd.createdBy.username = ? order by pd.created DESC
]]></query>

</hibernate-mapping>



Code between sessionFactory.openSession() and session.close():
public void updatePostingDetails(final PostingDetails pid) {
getHibernateTemplate().update(pid);
}


Full stack trace of any exception that occurs:
javax.faces.FacesException: Error calling action method of component with id postingConfirmForm:commercialRealEstateSubmit
at org.apache.myfaces.application.ActionListenerImpl.processAction(ActionListenerImpl.java:74)
at javax.faces.component.UICommand.broadcast(UICommand.java:106)
at javax.faces.component.UIViewRoot._broadcastForPhase(UIViewRoot.java:90)
at javax.faces.component.UIViewRoot.processApplication(UIViewRoot.java:164)
at org.apache.myfaces.lifecycle.LifecycleImpl.invokeApplication(LifecycleImpl.java:316)
at org.apache.myfaces.lifecycle.LifecycleImpl.execute(LifecycleImpl.java:86)
at javax.faces.webapp.FacesServlet.service(FacesServlet.java:106)
at org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:252)
at org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:173)
at org.apache.myfaces.component.html.util.ExtensionsFilter.doFilter(ExtensionsFilter.java:122)
at org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:202)
at org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:173)
at com.stufftolet.webapp.filter.MessageFilter.doFilter(MessageFilter.java:52)
at org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:202)
at org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:173)
at com.opensymphony.module.sitemesh.filter.PageFilter.parsePage(PageFilter.java:118)
at com.opensymphony.module.sitemesh.filter.PageFilter.doFilter(PageFilter.java:52)
at org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:202)
at org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:173)
at org.tuckey.web.filters.urlrewrite.UrlRewriteFilter.doFilter(UrlRewriteFilter.java:738)
at org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:202)
at org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:173)
at com.stufftolet.webapp.filter.GZIPFilter.doFilterInternal(GZIPFilter.java:42)
at org.springframework.web.filter.OncePerRequestFilter.doFilter(OncePerRequestFilter.java:76)
at org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:202)
at org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:173)
at org.displaytag.filter.ResponseOverrideFilter.doFilter(ResponseOverrideFilter.java:125)
at org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:202)
at org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:173)
at org.springframework.web.filter.CharacterEncodingFilter.doFilterInternal(CharacterEncodingFilter.java:75)
at org.springframework.web.filter.OncePerRequestFilter.doFilter(OncePerRequestFilter.java:76)
at org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:202)
at org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:173)
at com.opensymphony.clickstream.ClickstreamFilter.doFilter(ClickstreamFilter.java:42)
at org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:202)
at org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:173)
at org.springframework.orm.hibernate3.support.OpenSessionInViewFilter.doFilterInternal(OpenSessionInViewFilter.java:174)
at org.springframework.web.filter.OncePerRequestFilter.doFilter(OncePerRequestFilter.java:76)
at org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:202)
at org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:173)
at org.acegisecurity.util.FilterChainProxy$VirtualFilterChain.doFilter(FilterChainProxy.java:292)
at org.acegisecurity.intercept.web.FilterSecurityInterceptor.invoke(FilterSecurityInterceptor.java:108)
at org.acegisecurity.intercept.web.SecurityEnforcementFilter.doFilter(SecurityEnforcementFilter.java:197)
at org.acegisecurity.util.FilterChainProxy$VirtualFilterChain.doFilter(FilterChainProxy.java:303)
at org.acegisecurity.providers.anonymous.AnonymousProcessingFilter.doFilter(AnonymousProcessingFilter.java:143)
at org.acegisecurity.util.FilterChainProxy$VirtualFilterChain.doFilter(FilterChainProxy.java:303)
at org.acegisecurity.ui.rememberme.RememberMeProcessingFilter.doFilter(RememberMeProcessingFilter.java:154)
at org.acegisecurity.util.FilterChainProxy$VirtualFilterChain.doFilter(FilterChainProxy.java:303)
at org.acegisecurity.wrapper.SecurityContextHolderAwareRequestFilter.doFilter(SecurityContextHolderAwareRequestFilter.java:50)
at org.acegisecurity.util.FilterChainProxy$VirtualFilterChain.doFilter(FilterChainProxy.java:303)
at org.acegisecurity.ui.AbstractProcessingFilter.doFilter(AbstractProcessingFilter.java:246)
at org.acegisecurity.util.FilterChainProxy$VirtualFilterChain.doFilter(FilterChainProxy.java:303)
at org.acegisecurity.context.HttpSessionContextIntegrationFilter.doFilter(HttpSessionContextIntegrationFilter.java:220)
at org.acegisecurity.util.FilterChainProxy$VirtualFilterChain.doFilter(FilterChainProxy.java:303)
at org.acegisecurity.util.FilterChainProxy.doFilter(FilterChainProxy.java:173)
at org.acegisecurity.util.FilterToBeanProxy.doFilter(FilterToBeanProxy.java:120)
at org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:202)
at org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:173)
at org.jboss.web.tomcat.filters.ReplyHeaderFilter.doFilter(ReplyHeaderFilter.java:81)
at org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:202)
at org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:173)
at org.apache.catalina.core.StandardWrapperValve.invoke(StandardWrapperValve.java:213)
at org.apache.catalina.core.StandardContextValve.invoke(StandardContextValve.java:178)
at org.jboss.web.tomcat.security.CustomPrincipalValve.invoke(CustomPrincipalValve.java:39)
at org.jboss.web.tomcat.security.SecurityAssociationValve.invoke(SecurityAssociationValve.java:159)
at org.jboss.web.tomcat.tc5.session.ClusteredSessionValve.invoke(ClusteredSessionValve.java:81)
at org.jboss.web.tomcat.tc5.session.JvmRouteValve.invoke(JvmRouteValve.java:73)
at org.jboss.web.tomcat.security.JaccContextValve.invoke(JaccContextValve.java:59)
at org.apache.catalina.core.StandardHostValve.invoke(StandardHostValve.java:126)
at org.apache.catalina.valves.ErrorReportValve.invoke(ErrorReportValve.java:105)
at org.apache.catalina.core.StandardEngineValve.invoke(StandardEngineValve.java:107)
at org.apache.catalina.connector.CoyoteAdapter.service(CoyoteAdapter.java:148)
at org.apache.jk.server.JkCoyoteHandler.invoke(JkCoyoteHandler.java:307)
at org.apache.jk.common.HandlerRequest.invoke(HandlerRequest.java:385)
at org.apache.jk.common.ChannelSocket.invoke(ChannelSocket.java:748)
at org.apache.jk.common.ChannelSocket.processConnection(ChannelSocket.java:678)
at org.apache.jk.common.SocketConnection.runIt(ChannelSocket.java:871)
at org.apache.tomcat.util.threads.ThreadPool$ControlRunnable.run(ThreadPool.java:684)
at java.lang.Thread.run(Thread.java:595)
Caused by: javax.faces.el.EvaluationException: Exception while invoking expression #{commercialRealEstateConfirmForm.submit}
at org.apache.myfaces.el.MethodBindingImpl.invoke(MethodBindingImpl.java:153)
at org.apache.myfaces.application.ActionListenerImpl.processAction(ActionListenerImpl.java:63)
... 78 more
Caused by: org.springframework.orm.hibernate3.HibernateSystemException: a different object with the same identifier value was already associated with the session: [com.stufftolet.model.posting.CommercialRealEstate#8326012814]; nested exception is org.hibernate.NonUniqueObjectException: a different object with the same identifier value was already associated with the session: [com.stufftolet.model.posting.CommercialRealEstate#8326012814]
at org.springframework.orm.hibernate3.SessionFactoryUtils.convertHibernateAccessException(SessionFactoryUtils.java:661)
at org.springframework.orm.hibernate3.HibernateAccessor.convertHibernateAccessException(HibernateAccessor.java:413)
at org.springframework.orm.hibernate3.HibernateTemplate.execute(HibernateTemplate.java:370)
at org.springframework.orm.hibernate3.HibernateTemplate.save(HibernateTemplate.java:612)
at com.stufftolet.dao.hibernate.BaseDAOHibernate.saveObject(BaseDAOHibernate.java:43)
at com.stufftolet.dao.hibernate.PostingDAOHibernate.savePostingDetails(PostingDAOHibernate.java:21)
at com.stufftolet.service.impl.PostingManagerImpl.savePostingDetails(PostingManagerImpl.java:83)
at com.stufftolet.service.impl.PostingManagerImpl.savePostingDetails(PostingManagerImpl.java:80)
at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:39)
at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:25)
at java.lang.reflect.Method.invoke(Method.java:585)
at org.springframework.aop.support.AopUtils.invokeJoinpointUsingReflection(AopUtils.java:335)
at org.springframework.aop.framework.ReflectiveMethodInvocation.invokeJoinpoint(ReflectiveMethodInvocation.java:181)
at org.springframework.aop.framework.ReflectiveMethodInvocation.proceed(ReflectiveMethodInvocation.java:148)
at org.springframework.transaction.interceptor.TransactionInterceptor.invoke(TransactionInterceptor.java:96)
at org.springframework.aop.framework.ReflectiveMethodInvocation.proceed(ReflectiveMethodInvocation.java:170)
at org.springframework.aop.framework.JdkDynamicAopProxy.invoke(JdkDynamicAopProxy.java:176)
at $Proxy50.savePostingDetails(Unknown Source)
at com.stufftolet.webapp.action.posting.CommercialRealEstateConfirmForm.submit(CommercialRealEstateConfirmForm.java:363)
at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:39)
at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:25)
at java.lang.reflect.Method.invoke(Method.java:585)
at org.apache.myfaces.el.MethodBindingImpl.invoke(MethodBindingImpl.java:129)
... 79 more
Caused by: org.hibernate.NonUniqueObjectException: a different object with the same identifier value was already associated with the session: [com.stufftolet.model.posting.CommercialRealEstate#8326012814]
at org.hibernate.engine.StatefulPersistenceContext.checkUniqueness(StatefulPersistenceContext.java:629)
at org.hibernate.event.def.DefaultSaveOrUpdateEventListener.performUpdate(DefaultSaveOrUpdateEventListener.java:258)
at org.hibernate.event.def.DefaultSaveOrUpdateEventListener.entityIsDetached(DefaultSaveOrUpdateEventListener.java:216)
at org.hibernate.event.def.DefaultSaveOrUpdateEventListener.performSaveOrUpdate(DefaultSaveOrUpdateEventListener.java:93)
at org.hibernate.event.def.DefaultSaveOrUpdateEventListener.onSaveOrUpdate(DefaultSaveOrUpdateEventListener.java:70)
at org.hibernate.impl.SessionImpl.fireSaveOrUpdate(SessionImpl.java:531)
at org.hibernate.impl.SessionImpl.saveOrUpdate(SessionImpl.java:523)
at org.hibernate.engine.CascadingAction$1.cascade(CascadingAction.java:134)
at org.hibernate.engine.Cascade.cascadeToOne(Cascade.java:213)
at org.hibernate.engine.Cascade.cascadeAssociation(Cascade.java:157)
at org.hibernate.engine.Cascade.cascadeProperty(Cascade.java:108)
at org.hibernate.engine.Cascade.cascade(Cascade.java:248)
at org.hibernate.engine.Cascade.cascade(Cascade.java:223)
at org.hibernate.event.def.DefaultSaveOrUpdateEventListener.cascadeOnUpdate(DefaultSaveOrUpdateEventListener.java:331)
at org.hibernate.event.def.DefaultSaveOrUpdateEventListener.performUpdate(DefaultSaveOrUpdateEventListener.java:303)
at org.hibernate.event.def.DefaultSaveOrUpdateEventListener.entityIsDetached(DefaultSaveOrUpdateEventListener.java:216)
at org.hibernate.event.def.DefaultSaveOrUpdateEventListener.performSaveOrUpdate(DefaultSaveOrUpdateEventListener.java:93)
at org.hibernate.event.def.DefaultSaveOrUpdateEventListener.onSaveOrUpdate(DefaultSaveOrUpdateEventListener.java:70)
at org.hibernate.impl.SessionImpl.fireSaveOrUpdate(SessionImpl.java:531)
at org.hibernate.impl.SessionImpl.saveOrUpdate(SessionImpl.java:523)
at org.hibernate.engine.CascadingAction$1.cascade(CascadingAction.java:134)
at org.hibernate.engine.Cascade.cascadeToOne(Cascade.java:213)
at org.hibernate.engine.Cascade.cascadeAssociation(Cascade.java:157)
at org.hibernate.engine.Cascade.cascadeProperty(Cascade.java:108)
at org.hibernate.engine.Cascade.cascadeCollectionElements(Cascade.java:290)
at org.hibernate.engine.Cascade.cascadeCollection(Cascade.java:185)
at org.hibernate.engine.Cascade.cascadeAssociation(Cascade.java:160)
at org.hibernate.engine.Cascade.cascadeProperty(Cascade.java:108)
at org.hibernate.engine.Cascade.cascade(Cascade.java:248)
at org.hibernate.event.def.AbstractSaveEventListener.cascadeAfterSave(AbstractSaveEventListener.java:410)
at org.hibernate.event.def.AbstractSaveEventListener.performSaveOrReplicate(AbstractSaveEventListener.java:299)
at org.hibernate.event.def.AbstractSaveEventListener.performSave(AbstractSaveEventListener.java:167)
at org.hibernate.event.def.AbstractSaveEventListener.saveWithGeneratedId(AbstractSaveEventListener.java:114)
at org.hibernate.event.def.DefaultSaveOrUpdateEventListener.saveWithGeneratedOrRequestedId(DefaultSaveOrUpdateEventListener.java:186)
at org.hibernate.event.def.DefaultSaveEventListener.saveWithGeneratedOrRequestedId(DefaultSaveEventListener.java:33)
at org.hibernate.event.def.DefaultSaveOrUpdateEventListener.entityIsTransient(DefaultSaveOrUpdateEventListener.java:175)
at org.hibernate.event.def.DefaultSaveEventListener.performSaveOrUpdate(DefaultSaveEventListener.java:27)
at org.hibernate.event.def.DefaultSaveOrUpdateEventListener.onSaveOrUpdate(DefaultSaveOrUpdateEventListener.java:70)
at org.hibernate.impl.SessionImpl.fireSave(SessionImpl.java:559)
at org.hibernate.impl.SessionImpl.save(SessionImpl.java:547)
at org.hibernate.impl.SessionImpl.save(SessionImpl.java:543)
at org.springframework.orm.hibernate3.HibernateTemplate$12.doInHibernate(HibernateTemplate.java:615)
at org.springframework.orm.hibernate3.HibernateTemplate.execute(HibernateTemplate.java:365)
... 101 more

Name and version of the database you are using:MySql 5.0

Hi guys,

I never get this problem when unit testing it. But when I load the PostingDetails object into UI layer (JSF) and try to update it, I got this error message. I have been searching around but without any solution. I have found solution like:

- http://www.laliluna.de/257.html
- http://forum.hibernate.org/viewtopic.php?t=933689
- http://www.hibernate.org/116.html

but doesn't solve my problem. Please kindly help, Thanks !

regards,
Mark


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

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.