Hibernate + MySQL + Mapping Problem

Ich hänge leider immernoch an diesem Problem.

@Thomas: Bei deiner Lösung tritt eine re-saved... error message auf.
 
Leider bin ich immernoch keinen Schritt weitergekommen. Und finde auch keine (weder bei hibernate.org oder sonstigen Foren) Hilfe für mein Problem.

Wäre für jede noch so kleine Hilfe dankbar.

Gruß

Romsl
 
Code:
org.springframework.orm.hibernate3.HibernateObjectRetrievalFailureException: deleted object would be re-saved by cascade (remove deleted object from associations): [ebooking.module.base.bean.person.Person#8]; nested exception is org.hibernate.ObjectDeletedException: deleted object would be re-saved by cascade (remove deleted object from associations): [ebooking.module.base.bean.person.Person#8]
org.hibernate.ObjectDeletedException: deleted object would be re-saved by cascade (remove deleted object from associations): [ebooking.module.base.bean.person.Person#8]
	at org.hibernate.impl.SessionImpl.forceFlush(SessionImpl.java:690)
	at org.hibernate.event.def.DefaultSaveOrUpdateEventListener.entityIsTransient(DefaultSaveOrUpdateEventListener.java:166)
	at org.hibernate.event.def.DefaultSaveOrUpdateEventListener.performSaveOrUpdate(DefaultSaveOrUpdateEventListener.java:96)
	at org.hibernate.event.def.DefaultSaveOrUpdateEventListener.onSaveOrUpdate(DefaultSaveOrUpdateEventListener.java:69)
	at org.hibernate.impl.SessionImpl.saveOrUpdate(SessionImpl.java:432)
	at org.hibernate.engine.Cascades$5.cascade(Cascades.java:153)
	at org.hibernate.engine.Cascades.cascade(Cascades.java:721)
	at org.hibernate.engine.Cascades.cascadeCollection(Cascades.java:860)
	at org.hibernate.engine.Cascades.cascade(Cascades.java:739)
	at org.hibernate.engine.Cascades.cascade(Cascades.java:817)
	at org.hibernate.event.def.AbstractFlushingEventListener.cascadeOnFlush(AbstractFlushingEventListener.java:121)
	at org.hibernate.event.def.AbstractFlushingEventListener.prepareEntityFlushes(AbstractFlushingEventListener.java:112)
	at org.hibernate.event.def.AbstractFlushingEventListener.flushEverythingToExecutions(AbstractFlushingEventListener.java:59)
	at org.hibernate.event.def.DefaultFlushEventListener.onFlush(DefaultFlushEventListener.java:26)
	at org.hibernate.impl.SessionImpl.flush(SessionImpl.java:678)
	at org.hibernate.impl.SessionImpl.managedFlush(SessionImpl.java:309)
	at org.hibernate.transaction.JDBCTransaction.commit(JDBCTransaction.java:86)
	at org.springframework.orm.hibernate3.HibernateTransactionManager.doCommit(HibernateTransactionManager.java:470)
	at org.springframework.transaction.support.AbstractPlatformTransactionManager.commit(AbstractPlatformTransactionManager.java:401)
	at org.springframework.transaction.interceptor.TransactionAspectSupport.doCommitTransactionAfterReturning(TransactionAspectSupport.java:256)
	at org.springframework.transaction.interceptor.TransactionInterceptor.invoke(TransactionInterceptor.java:67)
	at org.springframework.aop.framework.ReflectiveMethodInvocation.proceed(ReflectiveMethodInvocation.java:144)
	at org.springframework.aop.framework.JdkDynamicAopProxy.invoke(JdkDynamicAopProxy.java:174)
	at $Proxy1.deleteCustomerByPersonId(Unknown Source)
	at ebooking.module.base.controller.CustomerController.deleteCustomerForm(CustomerController.java:84)
	at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
	at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:39)
	at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:25)
	at java.lang.reflect.Method.invoke(Method.java:324)
	at org.springframework.web.servlet.mvc.multiaction.MultiActionController.invokeNamedMethod(MultiActionController.java:351)
	at org.springframework.web.servlet.mvc.multiaction.MultiActionController.handleRequestInternal(MultiActionController.java:305)
	at org.springframework.web.servlet.mvc.AbstractController.handleRequest(AbstractController.java:128)
	at org.springframework.web.servlet.mvc.SimpleControllerHandlerAdapter.handle(SimpleControllerHandlerAdapter.java:44)
	at org.springframework.web.servlet.DispatcherServlet.doDispatch(DispatcherServlet.java:675)
	at org.springframework.web.servlet.DispatcherServlet.doService(DispatcherServlet.java:623)
	at org.springframework.web.servlet.FrameworkServlet.serviceWrapper(FrameworkServlet.java:384)
	at org.springframework.web.servlet.FrameworkServlet.doGet(FrameworkServlet.java:344)
	at javax.servlet.http.HttpServlet.service(HttpServlet.java:689)
	at javax.servlet.http.HttpServlet.service(HttpServlet.java:802)
	at org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:252)
	at org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:173)
	at org.apache.catalina.core.StandardWrapperValve.invoke(StandardWrapperValve.java:214)
	at org.apache.catalina.core.StandardValveContext.invokeNext(StandardValveContext.java:104)
	at org.apache.catalina.core.StandardPipeline.invoke(StandardPipeline.java:520)
	at org.apache.catalina.core.StandardContextValve.invokeInternal(StandardContextValve.java:198)
	at org.apache.catalina.core.StandardContextValve.invoke(StandardContextValve.java:152)
	at org.apache.catalina.core.StandardValveContext.invokeNext(StandardValveContext.java:104)
	at org.apache.catalina.core.StandardPipeline.invoke(StandardPipeline.java:520)
	at org.apache.catalina.core.StandardHostValve.invoke(StandardHostValve.java:137)
	at org.apache.catalina.core.StandardValveContext.invokeNext(StandardValveContext.java:104)
	at org.apache.catalina.valves.ErrorReportValve.invoke(ErrorReportValve.java:118)
	at org.apache.catalina.core.StandardValveContext.invokeNext(StandardValveContext.java:102)
	at org.apache.catalina.core.StandardPipeline.invoke(StandardPipeline.java:520)
	at org.apache.catalina.core.StandardEngineValve.invoke(StandardEngineValve.java:109)
	at org.apache.catalina.core.StandardValveContext.invokeNext(StandardValveContext.java:104)
	at org.apache.catalina.core.StandardPipeline.invoke(StandardPipeline.java:520)
	at org.apache.catalina.core.ContainerBase.invoke(ContainerBase.java:929)
	at org.apache.coyote.tomcat5.CoyoteAdapter.service(CoyoteAdapter.java:160)
	at org.apache.coyote.http11.Http11Processor.process(Http11Processor.java:799)
	at org.apache.coyote.http11.Http11Protocol$Http11ConnectionHandler.processConnection(Http11Protocol.java:705)
	at org.apache.tomcat.util.net.TcpWorkerThread.runIt(PoolTcpEndpoint.java:577)
	at org.apache.tomcat.util.threads.ThreadPool$ControlRunnable.run(ThreadPool.java:684)
	at java.lang.Thread.run(Thread.java:534)
 
Hallo,
ich habe das selbe Problem. Das wäre nett, wenn Du mir sagen, falls Du schon das Problem gelöst hast, wie?
Gruss,
 
Ich hab das cascading auf save-update gesetzt und prüfe jetzt jedesmal nach ob es zu einer Adresse noch eine Person gibt. Wenn nicht lösche ich die Adresse auch, falls doch lasse ich das mit dem Löschen.

Es geht bestimmt auch besser, aber wie kann ich Dir leider nicht sagen. Falls du was besseres hast, lass es mich bitte wissen.
 
Zurück