-->
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: supernatural session stickyness?
PostPosted: Thu Feb 16, 2006 3:30 am 
Regular
Regular

Joined: Wed Oct 15, 2003 4:40 pm
Posts: 67
Hi,

I wonder how it is possible to get a

Code:
org.hibernate.HibernateException: Don't change the reference to a collection with cascade="all-delete-orphan": model.Order.orderRows


When I have an attached object that I first serialize to XML, then encrypt, then post to a servlet and there the reverse operations are done?

The recieving servlet (under a different context root) then tries to clear the keys on the object hierarchy and insert it into a different DB using Hibernate.

The posting is done using Jakarta HttpClient so there should really be no connection between the two Hibernate sessions(?)


Top
 Profile  
 
 Post subject: just a thought
PostPosted: Thu Feb 16, 2006 1:59 pm 
Expert
Expert

Joined: Fri Jul 22, 2005 2:42 pm
Posts: 670
Location: Seattle, WA
It looks like your XML serialization is pretty accurate :) so it delivered H collection proxy across that keeps association to the old session, invalid by now of course.
You may need to go through your object and replace H implementations of collection interfaces with standard java ones before sending. For example: o.setList( new ArrayList( o.getList() ) );

_________________
--------------
Konstantin

SourceLabs - dependable OpenSource systems


Top
 Profile  
 
 Post subject: Re: just a thought
PostPosted: Fri Feb 17, 2006 5:04 am 
Regular
Regular

Joined: Wed Oct 15, 2003 4:40 pm
Posts: 67
kgignatyev wrote:
It looks like your XML serialization is pretty accurate :)


Indeed - that did the trick! I should have examined the incoming data instead of just assuming that it was the same as I tought I had constructed :-/


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.