-->
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: Ids Altered exception.....
PostPosted: Tue Apr 25, 2006 11:55 am 
Newbie

Joined: Wed Jan 18, 2006 4:17 pm
Posts: 8
Hibernate version: 3.0

Full stack trace of any exception that occurs:

116e679 SessionFactor E org.springframework.orm.hibernate3.SessionFactoryUtils beforeCommit callback threw exception
116e679 SessionFactor E org.springframework.orm.hibernate3.SessionFactoryUtils TRAS0014I: The following exception was logged org.springframework.orm.hibernate3.HibernateSystemException: identifier of an instance of <someclass> altered from 137784 to 137772; nested exception is org.hibernate.HibernateException: identifier of an instance of <someclass> altered from 137784 to 137772
org.hibernate.HibernateException: identifier of an instance of <someclass> altered from 137784 to 137772
at org.hibernate.event.def.DefaultFlushEntityEventListener.checkId(DefaultFlushEntityEventListener.java:51)
at org.hibernate.event.def.DefaultFlushEntityEventListener.onFlushEntity(DefaultFlushEntityEventListener.java:82)
at org.hibernate.event.def.AbstractFlushingEventListener.flushEntities(AbstractFlushingEventListener.java:190)
at org.hibernate.event.def.AbstractFlushingEventListener.flushEverythingToExecutions(AbstractFlushingEventListener.java:70)
at org.hibernate.event.def.DefaultFlushEventListener.onFlush(DefaultFlushEventListener.java:26)
at org.hibernate.impl.SessionImpl.flush(SessionImpl.java:730)
at org.springframework.orm.hibernate3.SessionFactoryUtils$SpringSessionSynchronization.beforeCommit(SessionFactoryUtils.java:875)
at org.springframework.orm.hibernate3.SessionFactoryUtils$JtaSessionSynchronization.beforeCompletion(SessionFactoryUtils.java:999)
at com.ibm.ws.Transaction.JTA.RegisteredSyncs.distributeBefore(RegisteredSyncs.java:136)
at com.ibm.ws.Transaction.JTA.TransactionImpl.internalPrepare(TransactionImpl.java:1234)
at com.ibm.ws.Transaction.JTA.TransactionImpl.commit(TransactionImpl.java:983)
at com.ibm.ws.Transaction.JTA.TranManagerImpl.commit(TranManagerImpl.java:150)
at com.ibm.ws.Transaction.JTA.TranManagerSet.commit(TranManagerSet.java:177)
at com.ibm.ejs.csi.TranStrategy.commit(TranStrategy.java:712)
at com.ibm.ejs.csi.TranStrategy.postInvoke(TranStrategy.java:167)
at com.ibm.ejs.csi.TransactionControlImpl.postInvoke(TransactionControlImpl.java:570)
at com.ibm.ejs.csi.UOWControlImpl.postInvoke(UOWControlImpl.java:376)
at com.ibm.ejs.container.EJSContainer.postInvoke(EJSContainer.java:3068)
at com.ibm.ejs.container.EJSContainer.postInvoke(EJSContainer.java:2946)
at package.application.service.EJSRemoteStatelessAppIndResourcesAssetIncome_8aa6af97.saveOrUpdateInfo(Unknown Source)
at package.application.service._AppIndResourcesAssetIncome_Stub.saveOrUpdateInfo(Unknown Source)
at sun.reflect.GeneratedMethodAccessor558.invoke(Unknown Source)
at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:25)
at java.lang.reflect.Method.invoke(Method.java:324)
at com.ibm.ws.webservices.engine.providers.java.RPCProvider.invokeMethod(RPCProvider.java:408)
at com.ibm.ws.webservices.engine.providers.java.RPCProvider.processRequestResponse(RPCProvider.java:300)
at com.ibm.ws.webservices.engine.providers.java.RPCProvider.processMessage(RPCProvider.java:263)
at com.ibm.ws.webservices.engine.providers.java.JavaProvider.invoke(JavaProvider.java:289)
at com.ibm.ws.webservices.engine.PivotHandlerWrapper.invoke(PivotHandlerWrapper.java:212)
at com.ibm.ws.webservices.engine.handlers.WrappedHandler.invoke(WrappedHandler.java:61)
at com.ibm.ws.webservices.engine.PivotHandlerWrapper.invoke(PivotHandlerWrapper.java:212)
at com.ibm.ws.webservices.engine.PivotHandlerWrapper.invoke(PivotHandlerWrapper.java:212)
at com.ibm.ws.webservices.engine.WebServicesEngine.invoke(WebServicesEngine.java:255)
at com.ibm.ws.webservices.engine.transport.http.WebServicesServlet.doPost(WebServicesServlet.java:897)
at javax.servlet.http.HttpServlet.service(HttpServlet.java:760)
at com.ibm.ws.webservices.engine.transport.http.WebServicesServletBase.service(WebServicesServletBase.java:341)
at javax.servlet.http.HttpServlet.service(HttpServlet.java:853)
at com.ibm.ws.webcontainer.servlet.StrictServletInstance.doService(StrictServletInstance.java:110)
at com.ibm.ws.webcontainer.servlet.StrictLifecycleServlet._service(StrictLifecycleServlet.java:174)
at com.ibm.ws.webcontainer.servlet.IdleServletState.service(StrictLifecycleServlet.java:313)
at com.ibm.ws.webcontainer.servlet.StrictLifecycleServlet.service(StrictLifecycleServlet.java:116)
at com.ibm.ws.webcontainer.servlet.ServletInstance.service(ServletInstance.java:283)
at com.ibm.ws.webcontainer.servlet.ValidServletReferenceState.dispatch(ValidServletReferenceState.java:42)
at com.ibm.ws.webcontainer.servlet.ServletInstanceReference.dispatch(ServletInstanceReference.java:40)
at com.ibm.ws.webcontainer.webapp.WebAppRequestDispatcher.handleWebAppDispatch(WebAppRequestDispatcher.java:1171)
at com.ibm.ws.webcontainer.webapp.WebAppRequestDispatcher.dispatch(WebAppRequestDispatcher.java:676)
at com.ibm.ws.webcontainer.webapp.WebAppRequestDispatcher.forward(WebAppRequestDispatcher.java:203)
at com.ibm.ws.webcontainer.srt.WebAppInvoker.doForward(WebAppInvoker.java:125)
at com.ibm.ws.webcontainer.srt.WebAppInvoker.handleInvocationHook(WebAppInvoker.java:294)
at com.ibm.ws.webcontainer.cache.invocation.CachedInvocation.handleInvocation(CachedInvocation.java:71)
at com.ibm.ws.webcontainer.cache.invocation.CacheableInvocationContext.invoke(CacheableInvocationContext.java:116)
at com.ibm.ws.webcontainer.srp.ServletRequestProcessor.dispatchByURI(ServletRequestProcessor.java:226)
at com.ibm.ws.webcontainer.oselistener.OSEListenerDispatcher.service(OSEListener.java:334)
at com.ibm.ws.webcontainer.http.HttpConnection.handleRequest(HttpConnection.java:56)
at com.ibm.ws.http.HttpConnection.readAndHandleRequest(HttpConnection.java:652)
at com.ibm.ws.http.HttpConnection.run(HttpConnection.java:448)
at com.ibm.ws.util.ThreadPool$Worker.run(ThreadPool.java:912)
.
org.springframework.orm.hibernate3.HibernateSystemException: identifier of an instance of <someclass> altered from 137784 to 137772; nested exception is org.hibernate.HibernateException: identifier of an instance of <someclass> altered from 137784 to 137772
org.hibernate.HibernateException: identifier of an instance of <someclass> altered from 137784 to 137772
at org.hibernate.event.def.DefaultFlushEntityEventListener.checkId(DefaultFlushEntityEventListener.java:51)
at org.hibernate.event.def.DefaultFlushEntityEventListener.onFlushEntity(DefaultFlushEntityEventListener.java:82)
at org.hibernate.event.def.AbstractFlushingEventListener.flushEntities(AbstractFlushingEventListener.java:190)
at org.hibernate.event.def.AbstractFlushingEventListener.flushEverythingToExecutions(AbstractFlushingEventListener.java:70)
at org.hibernate.event.def.DefaultFlushEventListener.onFlush(DefaultFlushEventListener.java:26)
at org.hibernate.impl.SessionImpl.flush(SessionImpl.java:730)
at org.springframework.orm.hibernate3.SessionFactoryUtils$SpringSessionSynchronization.beforeCommit(SessionFactoryUtils.java:875)
at org.springframework.orm.hibernate3.SessionFactoryUtils$JtaSessionSynchronization.beforeCompletion(SessionFactoryUtils.java:999)
at com.ibm.ws.Transaction.JTA.RegisteredSyncs.distributeBefore(RegisteredSyncs.java:136)
at com.ibm.ws.Transaction.JTA.TransactionImpl.internalPrepare(TransactionImpl.java:1234)
at com.ibm.ws.Transaction.JTA.TransactionImpl.commit(TransactionImpl.java:983)
at com.ibm.ws.Transaction.JTA.TranManagerImpl.commit(TranManagerImpl.java:150)
at com.ibm.ws.Transaction.JTA.TranManagerSet.commit(TranManagerSet.java:177)
at com.ibm.ejs.csi.TranStrategy.commit(TranStrategy.java:712)
at com.ibm.ejs.csi.TranStrategy.postInvoke(TranStrategy.java:167)
at com.ibm.ejs.csi.TransactionControlImpl.postInvoke(TransactionControlImpl.java:570)
at com.ibm.ejs.csi.UOWControlImpl.postInvoke(UOWControlImpl.java:376)
at com.ibm.ejs.container.EJSContainer.postInvoke(EJSContainer.java:3068)
at com.ibm.ejs.container.EJSContainer.postInvoke(EJSContainer.java:2946)
at package.application.service.EJSRemoteStatelessAppIndResourcesAssetIncome_8aa6af97.saveOrUpdateInfo(Unknown Source)
at package.application.service._AppIndResourcesAssetIncome_Stub.saveOrUpdateInfo(Unknown Source)
at sun.reflect.GeneratedMethodAccessor558.invoke(Unknown Source)
at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:25)
at java.lang.reflect.Method.invoke(Method.java:324)
at com.ibm.ws.webservices.engine.providers.java.RPCProvider.invokeMethod(RPCProvider.java:408)
at com.ibm.ws.webservices.engine.providers.java.RPCProvider.processRequestResponse(RPCProvider.java:300)
at com.ibm.ws.webservices.engine.providers.java.RPCProvider.processMessage(RPCProvider.java:263)
at com.ibm.ws.webservices.engine.providers.java.JavaProvider.invoke(JavaProvider.java:289)
at com.ibm.ws.webservices.engine.PivotHandlerWrapper.invoke(PivotHandlerWrapper.java:212)
at com.ibm.ws.webservices.engine.handlers.WrappedHandler.invoke(WrappedHandler.java:61)
at com.ibm.ws.webservices.engine.PivotHandlerWrapper.invoke(PivotHandlerWrapper.java:212)
at com.ibm.ws.webservices.engine.PivotHandlerWrapper.invoke(PivotHandlerWrapper.java:212)
at com.ibm.ws.webservices.engine.WebServicesEngine.invoke(WebServicesEngine.java:255)
at com.ibm.ws.webservices.engine.transport.http.WebServicesServlet.doPost(WebServicesServlet.java:897)
at javax.servlet.http.HttpServlet.service(HttpServlet.java:760)
at com.ibm.ws.webservices.engine.transport.http.WebServicesServletBase.service(WebServicesServletBase.java:341)
at javax.servlet.http.HttpServlet.service(HttpServlet.java:853)
at com.ibm.ws.webcontainer.servlet.StrictServletInstance.doService(StrictServletInstance.java:110)
at com.ibm.ws.webcontainer.servlet.StrictLifecycleServlet._service(StrictLifecycleServlet.java:174)
at com.ibm.ws.webcontainer.servlet.IdleServletState.service(StrictLifecycleServlet.java:313)
at com.ibm.ws.webcontainer.servlet.StrictLifecycleServlet.service(StrictLifecycleServlet.java:116)
at com.ibm.ws.webcontainer.servlet.ServletInstance.service(ServletInstance.java:283)
at com.ibm.ws.webcontainer.servlet.ValidServletReferenceState.dispatch(ValidServletReferenceState.java:42)
at com.ibm.ws.webcontainer.servlet.ServletInstanceReference.dispatch(ServletInstanceReference.java:40)
at com.ibm.ws.webcontainer.webapp.WebAppRequestDispatcher.handleWebAppDispatch(WebAppRequestDispatcher.java:1171)
at com.ibm.ws.webcontainer.webapp.WebAppRequestDispatcher.dispatch(WebAppRequestDispatcher.java:676)
at com.ibm.ws.webcontainer.webapp.WebAppRequestDispatcher.forward(WebAppRequestDispatcher.java:203)
at com.ibm.ws.webcontainer.srt.WebAppInvoker.doForward(WebAppInvoker.java:125)
at com.ibm.ws.webcontainer.srt.WebAppInvoker.handleInvocationHook(WebAppInvoker.java:294)
at com.ibm.ws.webcontainer.cache.invocation.CachedInvocation.handleInvocation(CachedInvocation.java:71)
at com.ibm.ws.webcontainer.cache.invocation.CacheableInvocationContext.invoke(CacheableInvocationContext.java:116)
at com.ibm.ws.webcontainer.srp.ServletRequestProcessor.dispatchByURI(ServletRequestProcessor.java:226)
at com.ibm.ws.webcontainer.oselistener.OSEListenerDispatcher.service(OSEListener.java:334)
at com.ibm.ws.webcontainer.http.HttpConnection.handleRequest(HttpConnection.java:56)
at com.ibm.ws.http.HttpConnection.readAndHandleRequest(HttpConnection.java:652)
at com.ibm.ws.http.HttpConnection.run(HttpConnection.java:448)
at com.ibm.ws.util.ThreadPool$Worker.run(ThreadPool.java:912)

Name and version of the database you are using:Oracle


Can someone please explain me what causes this kind of exception and how can I resolve it. I am unable to generate this exception in our test environment but we get it in Production. Hence its critical... looking forward to your replies...

thanks in advance.

crazee_dude


Top
 Profile  
 
 Post subject: Did you resolve this issue?
PostPosted: Tue Apr 25, 2006 3:57 pm 
Newbie

Joined: Tue Apr 25, 2006 3:52 pm
Posts: 1
We are also having this problem when we migrated from Jboss 4.0.1 to Jboss 4.0.2. Your reply would be appreciated.


Top
 Profile  
 
 Post subject: Ids Altered exception.....
PostPosted: Thu Apr 27, 2006 3:52 pm 
Newbie

Joined: Wed Jan 18, 2006 4:17 pm
Posts: 8
Hi ...

I found what the problem is. In my case i have two objects with the same data and when I try to save them to the database using the hibernate saveOrUpdate it confuses it and then changes the id of the first object with the id of the second object. This seems to be due to the complex programming logic tht was involved in the implementation. So once I corrected it, it is working fine.

So I would suggest you to check that you are not trying to save the objects with the same data and then retirve there ids. Best thing would be to save one object and get its id then then save the other object and get its id and it should solve it. Let me know how it goes

Thanks


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.