-->
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: Need help with session.flush();
PostPosted: Tue Dec 06, 2005 6:49 pm 
Beginner
Beginner

Joined: Sun Dec 04, 2005 4:28 pm
Posts: 24
org.hibernate.HibernateException: identifier of an instance of FileToSave was altered from somepicture to C:\TEMP\Receipt.jpg
org.hibernate.event.def.DefaultFlushEntityEventListener.checkId(DefaultFlushEntityEventListener.java:51)
org.hibernate.event.def.DefaultFlushEntityEventListener.getValues(DefaultFlushEntityEventListener.java:140)
org.hibernate.event.def.DefaultFlushEntityEventListener.onFlushEntity(DefaultFlushEntityEventListener.java:97)
org.hibernate.event.def.AbstractFlushingEventListener.flushEntities(AbstractFlushingEventListener.java:195)
org.hibernate.event.def.AbstractFlushingEventListener.flushEverythingToExecutions(AbstractFlushingEventListener.java:76)
org.hibernate.event.def.DefaultFlushEventListener.onFlush(DefaultFlushEventListener.java:26)
org.hibernate.impl.SessionImpl.flush(SessionImpl.java:908)
Upload.doPost(Upload.java:68)
javax.servlet.http.HttpServlet.service(HttpServlet.java:709)
javax.servlet.http.HttpServlet.service(HttpServlet.java:802)
org.apache.catalina.servlets.InvokerServlet.serveRequest(InvokerServlet.java:419)
org.apache.catalina.servlets.InvokerServlet.doPost(InvokerServlet.java:169)
javax.servlet.http.HttpServlet.service(HttpServlet.java:709)
javax.servlet.http.HttpServlet.service(HttpServlet.java:802)


Top
 Profile  
 
 Post subject: Re: Need help with session.flush();
PostPosted: Tue Dec 06, 2005 9:47 pm 
Beginner
Beginner

Joined: Sun Dec 04, 2005 4:28 pm
Posts: 24
tnthe wrote:
org.hibernate.HibernateException: identifier of an instance of FileToSave was altered from somepicture to C:\TEMP\Receipt.jpg
org.hibernate.event.def.DefaultFlushEntityEventListener.checkId(DefaultFlushEntityEventListener.java:51)
org.hibernate.event.def.DefaultFlushEntityEventListener.getValues(DefaultFlushEntityEventListener.java:140)
org.hibernate.event.def.DefaultFlushEntityEventListener.onFlushEntity(DefaultFlushEntityEventListener.java:97)
org.hibernate.event.def.AbstractFlushingEventListener.flushEntities(AbstractFlushingEventListener.java:195)
org.hibernate.event.def.AbstractFlushingEventListener.flushEverythingToExecutions(AbstractFlushingEventListener.java:76)
org.hibernate.event.def.DefaultFlushEventListener.onFlush(DefaultFlushEventListener.java:26)
org.hibernate.impl.SessionImpl.flush(SessionImpl.java:908)
Upload.doPost(Upload.java:68)
javax.servlet.http.HttpServlet.service(HttpServlet.java:709)
javax.servlet.http.HttpServlet.service(HttpServlet.java:802)
org.apache.catalina.servlets.InvokerServlet.serveRequest(InvokerServlet.java:419)
org.apache.catalina.servlets.InvokerServlet.doPost(InvokerServlet.java:169)
javax.servlet.http.HttpServlet.service(HttpServlet.java:709)
javax.servlet.http.HttpServlet.service(HttpServlet.java:802)

-----------
I got this to work now. It is got to do with saving data session.save(etc) to the database.


Top
 Profile  
 
 Post subject:
PostPosted: Wed Dec 07, 2005 5:40 am 
Expert
Expert

Joined: Tue Dec 07, 2004 6:57 am
Posts: 285
Location: Nürnberg, Germany
You are using the file name of FileToSave as the primary key? You MUST NOT change primary keys!!


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.