RemoteException: --- java.lang.RuntimeException: org.springframework.transaction.TransactionSystemException: Could not commit JPA transaction; nested exception is org.apache.openjpa.persistence.RollbackException: org.springframework.orm.jpa.JpaSystemException: The transaction has been rolled back. See the nested exceptions for details on the errors that occurred.; nested exception is org.apache.openjpa.persistence.PersistenceException: The transaction has been rolled back. See the nested exceptions for details on the errors that occurred. FailedObject: com.company.magazin.entity.WorkCalendar-a0ef83ea-2016-88e0-6993-a8f594cd8e44 --- org.springframework.transaction.TransactionSystemException: Could not commit JPA transaction; nested exception is org.apache.openjpa.persistence.RollbackException: org.springframework.orm.jpa.JpaSystemException: The transaction has been rolled back. See the nested exceptions for details on the errors that occurred.; nested exception is org.apache.openjpa.persistence.PersistenceException: The transaction has been rolled back. See the nested exceptions for details on the errors that occurred. FailedObject: com.company.magazin.entity.WorkCalendar-a0ef83ea-2016-88e0-6993-a8f594cd8e44 --- org.apache.openjpa.persistence.RollbackException: org.springframework.orm.jpa.JpaSystemException: The transaction has been rolled back. See the nested exceptions for details on the errors that occurred.; nested exception is org.apache.openjpa.persistence.PersistenceException: The transaction has been rolled back. See the nested exceptions for details on the errors that occurred. FailedObject: com.company.magazin.entity.WorkCalendar-a0ef83ea-2016-88e0-6993-a8f594cd8e44 --- java.lang.RuntimeException: org.springframework.orm.jpa.JpaSystemException: The transaction has been rolled back. See the nested exceptions for details on the errors that occurred.; nested exception is org.apache.openjpa.persistence.PersistenceException: The transaction has been rolled back. See the nested exceptions for details on the errors that occurred. FailedObject: com.company.magazin.entity.WorkCalendar-a0ef83ea-2016-88e0-6993-a8f594cd8e44 --- org.springframework.orm.jpa.JpaSystemException: The transaction has been rolled back. See the nested exceptions for details on the errors that occurred.; nested exception is org.apache.openjpa.persistence.PersistenceException: The transaction has been rolled back. See the nested exceptions for details on the errors that occurred. FailedObject: com.company.magazin.entity.WorkCalendar-a0ef83ea-2016-88e0-6993-a8f594cd8e44 --- org.apache.openjpa.persistence.PersistenceException: The transaction has been rolled back. See the nested exceptions for details on the errors that occurred. --- org.apache.openjpa.persistence.PersistenceException: ERROR: update or delete on table "magazin_work_periods" violates foreign key constraint "fk_magazin_work_periods_parent_period_id" on table "magazin_work_periods" Подробности: Key (id)=(a0ef83ea-2016-88e0-6993-a8f594cd8e44) is still referenced from table "magazin_work_periods". {prepstmnt 587436802 DELETE FROM public.MAGAZIN_WORK_PERIODS WHERE id = ? AND version = ? [params=(Object) a0ef83ea-2016-88e0-6993-a8f594cd8e44, (int) 3]} [code=0, state=23503] --- org.apache.openjpa.lib.jdbc.ReportingSQLException: ERROR: update or delete on table "magazin_work_periods" violates foreign key constraint "fk_magazin_work_periods_parent_period_id" on table "magazin_work_periods" Подробности: Key (id)=(a0ef83ea-2016-88e0-6993-a8f594cd8e44) is still referenced from table "magazin_work_periods". {prepstmnt 587436802 DELETE FROM public.MAGAZIN_WORK_PERIODS WHERE id = ? AND version = ? [params=(Object) a0ef83ea-2016-88e0-6993-a8f594cd8e44, (int) 3]} [code=0, state=23503] --- org.postgresql.util.PSQLException: ERROR: update or delete on table "magazin_work_periods" violates foreign key constraint "fk_magazin_work_periods_parent_period_id" on table "magazin_work_periods" Подробности: Key (id)=(a0ef83ea-2016-88e0-6993-a8f594cd8e44) is still referenced from table "magazin_work_periods". at com.haulmont.cuba.core.sys.ServiceInterceptor.aroundInvoke(ServiceInterceptor.java:73) at sun.reflect.GeneratedMethodAccessor60.invoke(Unknown Source) at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43) at java.lang.reflect.Method.invoke(Method.java:497) at org.springframework.aop.aspectj.AbstractAspectJAdvice.invokeAdviceMethodWithGivenArgs(AbstractAspectJAdvice.java:621) at org.springframework.aop.aspectj.AbstractAspectJAdvice.invokeAdviceMethod(AbstractAspectJAdvice.java:610) at org.springframework.aop.aspectj.AspectJAroundAdvice.invoke(AspectJAroundAdvice.java:65) at org.springframework.aop.framework.ReflectiveMethodInvocation.proceed(ReflectiveMethodInvocation.java:161) at org.springframework.aop.interceptor.ExposeInvocationInterceptor.invoke(ExposeInvocationInterceptor.java:91) at org.springframework.aop.framework.ReflectiveMethodInvocation.proceed(ReflectiveMethodInvocation.java:172) at org.springframework.aop.framework.JdkDynamicAopProxy.invoke(JdkDynamicAopProxy.java:204) at com.sun.proxy.$Proxy137.commit(Unknown Source) at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method) at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:62) at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43) at java.lang.reflect.Method.invoke(Method.java:497) at com.haulmont.cuba.core.sys.remoting.LocalServiceInvokerImpl.invoke(LocalServiceInvokerImpl.java:71) at com.haulmont.cuba.web.sys.remoting.LocalServiceProxy$LocalServiceInvocationHandler.invoke(LocalServiceProxy.java:115) at com.sun.proxy.$Proxy17.commit(Unknown Source) at com.haulmont.cuba.client.sys.DataManagerClientImpl.commit(DataManagerClientImpl.java:88) at com.haulmont.cuba.gui.data.impl.GenericDataSupplier.commit(GenericDataSupplier.java:75) at com.haulmont.cuba.gui.data.impl.AbstractCollectionDatasource.commit(AbstractCollectionDatasource.java:432) at com.haulmont.cuba.gui.components.actions.RemoveAction.doRemove(RemoveAction.java:227) at com.haulmont.cuba.gui.components.actions.RemoveAction$1.actionPerform(RemoveAction.java:145) at com.haulmont.cuba.web.WebWindowManager$12.buttonClick(WebWindowManager.java:1102) at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method) at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:62) at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43) at java.lang.reflect.Method.invoke(Method.java:497) at com.vaadin.event.ListenerMethod.receiveEvent(ListenerMethod.java:508) at com.vaadin.event.EventRouter.fireEvent(EventRouter.java:198) at com.vaadin.event.EventRouter.fireEvent(EventRouter.java:161) at com.vaadin.server.AbstractClientConnector.fireEvent(AbstractClientConnector.java:986) at com.vaadin.ui.Button.fireClick(Button.java:393) at com.haulmont.cuba.web.toolkit.ui.CubaButton.fireClick(CubaButton.java:42) at com.vaadin.ui.Button$1.click(Button.java:61) at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method) at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:62) at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43) at java.lang.reflect.Method.invoke(Method.java:497) at com.vaadin.server.ServerRpcManager.applyInvocation(ServerRpcManager.java:168) at com.vaadin.server.ServerRpcManager.applyInvocation(ServerRpcManager.java:118) at com.vaadin.server.communication.ServerRpcHandler.handleInvocations(ServerRpcHandler.java:291) at com.vaadin.server.communication.ServerRpcHandler.handleRpc(ServerRpcHandler.java:184) at com.vaadin.server.communication.UidlRequestHandler.synchronizedHandleRequest(UidlRequestHandler.java:92) at com.vaadin.server.SynchronizedRequestHandler.handleRequest(SynchronizedRequestHandler.java:41) at com.vaadin.server.VaadinService.handleRequest(VaadinService.java:1408) at com.vaadin.server.VaadinServlet.service(VaadinServlet.java:355) at com.haulmont.cuba.web.sys.CubaApplicationServlet.serviceAppRequest(CubaApplicationServlet.java:164) at com.haulmont.cuba.web.sys.CubaApplicationServlet.service(CubaApplicationServlet.java:119) at javax.servlet.http.HttpServlet.service(HttpServlet.java:731) at org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:303) at org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:208) at org.apache.tomcat.websocket.server.WsFilter.doFilter(WsFilter.java:52) at org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:241) at org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:208) at com.haulmont.cuba.web.sys.CubaHttpFilter.handleNotFiltered(CubaHttpFilter.java:99) at com.haulmont.cuba.web.sys.CubaHttpFilter.doFilter(CubaHttpFilter.java:86) at org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:241) at org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:208) at org.apache.catalina.core.StandardWrapperValve.invoke(StandardWrapperValve.java:220) at org.apache.catalina.core.StandardContextValve.invoke(StandardContextValve.java:122) at org.apache.catalina.authenticator.AuthenticatorBase.invoke(AuthenticatorBase.java:505) at org.apache.catalina.core.StandardHostValve.invoke(StandardHostValve.java:170) at org.apache.catalina.valves.ErrorReportValve.invoke(ErrorReportValve.java:103) at org.apache.catalina.valves.AccessLogValve.invoke(AccessLogValve.java:957) at org.apache.catalina.core.StandardEngineValve.invoke(StandardEngineValve.java:116) at org.apache.catalina.connector.CoyoteAdapter.service(CoyoteAdapter.java:423) at org.apache.coyote.http11.AbstractHttp11Processor.process(AbstractHttp11Processor.java:1079) at org.apache.coyote.AbstractProtocol$AbstractConnectionHandler.process(AbstractProtocol.java:620) at org.apache.tomcat.util.net.JIoEndpoint$SocketProcessor.run(JIoEndpoint.java:318) at java.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1142) at java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:617) at org.apache.tomcat.util.threads.TaskThread$WrappingRunnable.run(TaskThread.java:61) at java.lang.Thread.run(Thread.java:745)