-->
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: reassociating proxies after session closed
PostPosted: Tue Sep 20, 2005 1:33 pm 
Newbie

Joined: Thu Nov 04, 2004 1:37 pm
Posts: 10
I have a question that is specific to Hibernate internals and not so much my code. If I send an object via rmi then it becomes detached, correct? In addition, if I close the session the object becomes detached? The problem is that after I do either of the above options Hibernate attempts to reassociate the proxy in the next session I create. This is fustrating to me because I want to clear the identifier and save it again with a new one. To be more specific I need to retrieve an object, send it via rmi, and then save it on the other side. Each side of the rmi connection has its own schema, but during my testing both sides are the same jvm/machine. I guess besides all that I am just curious as to how/why Hibernate is try to reassociate the proxy for me. I don't want it to, and I am not telling it to.

Thanks, Shane





Need help with Hibernate? Read this first:
http://www.hibernate.org/ForumMailingli ... AskForHelp

Hibernate version:

2.1.x

Mapping documents:

Code between sessionFactory.openSession() and session.close():

Full stack trace of any exception that occurs:

Caused by: net.sf.hibernate.AssertionFailure: null identifier
at net.sf.hibernate.engine.Key.<init>(Key.java:23)
at net.sf.hibernate.engine.Key.<init>(Key.java:34)
at net.sf.hibernate.impl.SessionImpl.reassociateProxy(SessionImpl.java:1025)
at net.sf.hibernate.impl.SessionImpl.unproxyAndReassociate(SessionImpl.java:1011)
at net.sf.hibernate.impl.SessionImpl.saveOrUpdate(SessionImpl.java:1377)

Name and version of the database you are using:

oracle 8i

The generated SQL (show_sql=true):

Debug level Hibernate log excerpt:


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.