This content has been marked as final.
Show 3 replies
-
1. Re: Error while deleting Entities (FetchType)
elkner Oct 12, 2005 11:41 AM (in response to ckrammer)I've seen this, when one uses entities with a @Version, and the appropriate value in the DB is null ...
-
2. Re: Error while deleting Entities (FetchType)
abriah Oct 12, 2005 11:42 PM (in response to ckrammer)Hello: I'm having the same problem trying to delete any record, I'm not sure if the problem is related with the database, I've tested postgres 7.4 and 8 but I keep receiving the same error.
Any ideal will be appreciated:
This is the stack:java.lang.RuntimeException: org.jboss.tm.JBossRollbackException: Unable to commit, tx=TransactionImpl:XidImpl[FormatId=257, GlobalId=athlon/16, BranchQual=, localId=16] status=STATUS_NO_TRANSACTION; - nested throwable: (org.hibernate.ObjectDeletedException: deleted entity passed to persist: [com.corgil.db.Permisosadmins#<null>]) org.jboss.aspects.tx.TxPolicy.handleEndTransactionException(TxPolicy.java:185) org.jboss.aspects.tx.TxPolicy.endTransaction(TxPolicy.java:167) org.jboss.aspects.tx.TxPolicy.invokeInOurTx(TxPolicy.java:74) org.jboss.aspects.tx.TxInterceptor$Required.invoke(TxInterceptor.java:134) org.jboss.aop.joinpoint.MethodInvocation.invokeNext(MethodInvocation.java:88) org.jboss.aspects.tx.TxPropagationInterceptor.invoke(TxPropagationInterceptor.java:61) org.jboss.aop.joinpoint.MethodInvocation.invokeNext(MethodInvocation.java:88) org.jboss.ejb3.stateless.StatelessInstanceInterceptor.invoke(StatelessInstanceInterceptor.java:39) org.jboss.aop.joinpoint.MethodInvocation.invokeNext(MethodInvocation.java:88) org.jboss.aspects.security.AuthenticationInterceptor.invoke(AuthenticationInterceptor.java:63) org.jboss.aop.joinpoint.MethodInvocation.invokeNext(MethodInvocation.java:88) org.jboss.ejb3.asynchronous.AsynchronousInterceptor.invoke(AsynchronousInterceptor.java:91) org.jboss.aop.joinpoint.MethodInvocation.invokeNext(MethodInvocation.java:88) org.jboss.ejb3.stateless.StatelessContainer.dynamicInvoke(StatelessContainer.java:195) org.jboss.aop.Dispatcher.invoke(Dispatcher.java:107) org.jboss.ejb3.remoting.IsLocalInterceptor.invoke(IsLocalInterceptor.java:37) org.jboss.aop.joinpoint.MethodInvocation.invokeNext(MethodInvocation.java:88) org.jboss.ejb3.stateless.StatelessRemoteProxy.invoke(StatelessRemoteProxy.java:88) $Proxy90.eliminarPermiso(Unknown Source) org.apache.jsp.lstAdministradores_jsp._jspService(org.apache.jsp.lstAdministradores_jsp:123) org.apache.jasper.runtime.HttpJspBase.service(HttpJspBase.java:97) javax.servlet.http.HttpServlet.service(HttpServlet.java:810) org.apache.jasper.servlet.JspServletWrapper.service(JspServletWrapper.java:322) org.apache.jasper.servlet.JspServlet.serviceJspFile(JspServlet.java:314) org.apache.jasper.servlet.JspServlet.service(JspServlet.java:264) javax.servlet.http.HttpServlet.service(HttpServlet.java:810) org.jboss.web.tomcat.filters.ReplyHeaderFilter.doFilter(ReplyHeaderFilter.java:81)
Thanks -
3. Re: Error while deleting Entities (FetchType)
epbernard Oct 20, 2005 6:39 PM (in response to ckrammer)"ckrammer" wrote:
When I change the FetchType to LAZY it just works fine. Can anybody give me a hint _WHY_ this is the case? What influence does the FetchType have on the process of deleting entities?
I can only guess but IMO you do not remove the object fromt the collection on the other side and you have cascade persist on it
=> the deleted object is repersistec by cascade.