Uploaded image for project: 'PatientManager'
  1. PatientManager
  2. PAM-590

Patient Manager -> Administration -> Manage Companies faults on delete

    Details

    • Type: Bug
    • Status: Closed
    • Priority: Major
    • Resolution: Fixed
    • Affects Version/s: 9.10.10
    • Fix Version/s: 9.11.0
    • Component/s: None
    • Labels:
      None

      Description

      When you hit the trash icon, the tool crashes because we missed a cascade on delete for IPs.

      2019-01-07 08:06:45,991 WARN (aberge) [com.arjuna.ats.arjuna] (ajp-/127.0.0.1:8309-40 /index.html) ARJUNA012125: TwoPhaseCoordinator.beforeCompletion - failed for SynchronizationImple< 0:ffff7f000101:-685cb40d:5c2fc441:12d30, org.hibernate.engine.transaction.synchronization.internal.RegisteredSynchronization@7fd787cf >: javax.persistence.PersistenceException: org.hibernate.exception.ConstraintViolationException: could not execute batch
      at org.hibernate.ejb.AbstractEntityManagerImpl.convert(AbstractEntityManagerImpl.java:1387) [hibernate-entitymanager-4.2.20.Final.jar:4.2.20.Final]
      at org.hibernate.ejb.AbstractEntityManagerImpl.convert(AbstractEntityManagerImpl.java:1310) [hibernate-entitymanager-4.2.20.Final.jar:4.2.20.Final]
      at org.hibernate.ejb.AbstractEntityManagerImpl.convert(AbstractEntityManagerImpl.java:1316) [hibernate-entitymanager-4.2.20.Final.jar:4.2.20.Final]
      at org.hibernate.ejb.AbstractEntityManagerImpl$CallbackExceptionMapperImpl.mapManagedFlushFailure(AbstractEntityManagerImpl.java:1510) [hibernate-entitymanager-4.2.20.Final.jar:4.2.20.Final]
      at org.hibernate.engine.transaction.synchronization.internal.SynchronizationCallbackCoordinatorNonTrackingImpl.beforeCompletion(SynchronizationCallbackCoordinatorNonTrackingImpl.java:114) [hibernate-core-4.2.20.Final.jar:4.2.20.Final]
      at org.hibernate.engine.transaction.synchronization.internal.RegisteredSynchronization.beforeCompletion(RegisteredSynchronization.java:53) [hibernate-core-4.2.20.Final.jar:4.2.20.Final]
      at com.arjuna.ats.internal.jta.resources.arjunacore.SynchronizationImple.beforeCompletion(SynchronizationImple.java:76)
      at com.arjuna.ats.arjuna.coordinator.TwoPhaseCoordinator.beforeCompletion(TwoPhaseCoordinator.java:273)
      at com.arjuna.ats.arjuna.coordinator.TwoPhaseCoordinator.end(TwoPhaseCoordinator.java:93)
      at com.arjuna.ats.arjuna.AtomicAction.commit(AtomicAction.java:162)
      at com.arjuna.ats.internal.jta.transaction.arjunacore.TransactionImple.commitAndDisassociate(TransactionImple.java:1165)
      at com.arjuna.ats.internal.jta.transaction.arjunacore.BaseTransaction.commit(BaseTransaction.java:126)
      at com.arjuna.ats.jbossatx.BaseTransactionManagerDelegate.commit(BaseTransactionManagerDelegate.java:75)
      at org.jboss.tm.usertx.client.ServerVMClientUserTransaction.commit(ServerVMClientUserTransaction.java:167)
      at org.jboss.seam.transaction.UTTransaction.commit(UTTransaction.java:52) [jboss-seam.jar:2.3.1.Final]
      at org.jboss.seam.jsf.SeamPhaseListener.commitOrRollback(SeamPhaseListener.java:617) [jboss-seam.jar:2.3.1.Final]
      at org.jboss.seam.jsf.SeamPhaseListener.commitOrRollback(SeamPhaseListener.java:608) [jboss-seam.jar:2.3.1.Final]
      at org.jboss.seam.jsf.SeamPhaseListener.handleTransactionsAfterPhase(SeamPhaseListener.java:344) [jboss-seam.jar:2.3.1.Final]
      at org.jboss.seam.jsf.SeamPhaseListener.afterServletPhase(SeamPhaseListener.java:244) [jboss-seam.jar:2.3.1.Final]
      at org.jboss.seam.jsf.SeamPhaseListener.afterPhase(SeamPhaseListener.java:195) [jboss-seam.jar:2.3.1.Final]
      at com.sun.faces.lifecycle.Phase.handleAfterPhase(Phase.java:189) [jsf-impl-2.1.18-jbossorg-1.jar:]
      at com.sun.faces.lifecycle.Phase.doPhase(Phase.java:107) [jsf-impl-2.1.18-jbossorg-1.jar:]
      at com.sun.faces.lifecycle.LifecycleImpl.execute(LifecycleImpl.java:118) [jsf-impl-2.1.18-jbossorg-1.jar:]
      at javax.faces.webapp.FacesServlet.service(FacesServlet.java:593) [jboss-jsf-api_2.1_spec-2.1.18.Final.jar:2.1.18.Final]
      at org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:295) [jbossweb-7.2.0.Final.jar:7.2.0.Final]
      at org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:214) [jbossweb-7.2.0.Final.jar:7.2.0.Final]
      at org.jasig.cas.client.util.HttpServletRequestWrapperFilter.doFilter(HttpServletRequestWrapperFilter.java:71) [cas-client-core-3.4.1.jar:3.4.1]
      at org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:246) [jbossweb-7.2.0.Final.jar:7.2.0.Final]
      at org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:214) [jbossweb-7.2.0.Final.jar:7.2.0.Final]
      at org.jasig.cas.client.validation.AbstractTicketValidationFilter.doFilter(AbstractTicketValidationFilter.java:236) [cas-client-core-3.4.1.jar:3.4.1]
      at org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:246) [jbossweb-7.2.0.Final.jar:7.2.0.Final]
      at org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:214) [jbossweb-7.2.0.Final.jar:7.2.0.Final]
      at org.jasig.cas.client.session.SingleSignOutFilter.doFilter(SingleSignOutFilter.java:97) [cas-client-core-3.4.1.jar:3.4.1]
      at org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:246) [jbossweb-7.2.0.Final.jar:7.2.0.Final]
      at org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:214) [jbossweb-7.2.0.Final.jar:7.2.0.Final]
      at org.jboss.seam.servlet.SeamFilter$FilterChainImpl.doFilter(SeamFilter.java:83) [jboss-seam.jar:2.3.1.Final]
      at net.ihe.gazelle.common.servletfilter.GeneratedFileFilter.doFilter(GeneratedFileFilter.java:56) [gazelle-seam-tools-jar.jar:3.0.41]
      at org.jboss.seam.servlet.SeamFilter$FilterChainImpl.doFilter(SeamFilter.java:69) [jboss-seam.jar:2.3.1.Final]
      at org.jboss.seam.web.LoggingFilter.doFilter(LoggingFilter.java:60) [jboss-seam.jar:2.3.1.Final]
      at org.jboss.seam.servlet.SeamFilter$FilterChainImpl.doFilter(SeamFilter.java:69) [jboss-seam.jar:2.3.1.Final]
      at net.ihe.gazelle.common.servletfilter.StaticFilter.doFilter(StaticFilter.java:56) [gazelle-seam-tools-jar.jar:3.0.41]
      at org.jboss.seam.servlet.SeamFilter$FilterChainImpl.doFilter(SeamFilter.java:78) [jboss-seam.jar:2.3.1.Final]
      at net.ihe.gazelle.common.servletfilter.CSPHeaderFilter.doFilter(CSPHeaderFilter.java:74) [gazelle-seam-tools-jar.jar:3.0.41]
      at org.jboss.seam.servlet.SeamFilter$FilterChainImpl.doFilter(SeamFilter.java:69) [jboss-seam.jar:2.3.1.Final]
      at org.jboss.seam.web.ExceptionFilter.doFilter(ExceptionFilter.java:64) [jboss-seam.jar:2.3.1.Final]
      at org.jboss.seam.servlet.SeamFilter$FilterChainImpl.doFilter(SeamFilter.java:69) [jboss-seam.jar:2.3.1.Final]
      at org.jboss.seam.web.RedirectFilter.doFilter(RedirectFilter.java:45) [jboss-seam.jar:2.3.1.Final]
      at org.jboss.seam.servlet.SeamFilter$FilterChainImpl.doFilter(SeamFilter.java:69) [jboss-seam.jar:2.3.1.Final]
      at net.ihe.gazelle.common.servletfilter.SQLinjectionFilter.doFilter(SQLinjectionFilter.java:67) [gazelle-seam-tools-jar.jar:3.0.41]
      at org.jboss.seam.servlet.SeamFilter$FilterChainImpl.doFilter(SeamFilter.java:69) [jboss-seam.jar:2.3.1.Final]
      at org.jboss.seam.web.CharacterEncodingFilter.doFilter(CharacterEncodingFilter.java:42) [jboss-seam.jar:2.3.1.Final]
      at org.jboss.seam.servlet.SeamFilter$FilterChainImpl.doFilter(SeamFilter.java:69) [jboss-seam.jar:2.3.1.Final]
      at org.jboss.seam.web.IdentityFilter.doFilter(IdentityFilter.java:40) [jboss-seam.jar:2.3.1.Final]
      at org.jboss.seam.servlet.SeamFilter$FilterChainImpl.doFilter(SeamFilter.java:69) [jboss-seam.jar:2.3.1.Final]
      at net.ihe.gazelle.common.servletfilter.IEHeaderFilter.doFilter(IEHeaderFilter.java:50) [gazelle-seam-tools-jar.jar:3.0.41]
      at org.jboss.seam.servlet.SeamFilter$FilterChainImpl.doFilter(SeamFilter.java:69) [jboss-seam.jar:2.3.1.Final]
      at net.ihe.gazelle.common.fineuploader.FineuploaderFilter.doFilter(FineuploaderFilter.java:75) [gazelle-seam-tools-jar.jar:3.0.41]
      at org.jboss.seam.servlet.SeamFilter$FilterChainImpl.doFilter(SeamFilter.java:69) [jboss-seam.jar:2.3.1.Final]
      at org.jboss.seam.servlet.SeamFilter.doFilter(SeamFilter.java:158) [jboss-seam.jar:2.3.1.Final]
      at org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:246) [jbossweb-7.2.0.Final.jar:7.2.0.Final]
      at org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:214) [jbossweb-7.2.0.Final.jar:7.2.0.Final]
      at org.apache.catalina.core.StandardWrapperValve.invoke(StandardWrapperValve.java:230) [jbossweb-7.2.0.Final.jar:7.2.0.Final]
      at org.apache.catalina.core.StandardContextValve.invoke(StandardContextValve.java:149) [jbossweb-7.2.0.Final.jar:7.2.0.Final]
      at org.apache.catalina.authenticator.AuthenticatorBase.invoke(AuthenticatorBase.java:389) [jbossweb-7.2.0.Final.jar:7.2.0.Final]
      at org.jboss.as.jpa.interceptor.WebNonTxEmCloserValve.invoke(WebNonTxEmCloserValve.java:50) [jboss-as-jpa-7.2.0.Final.jar:7.2.0.Final]
      at org.jboss.as.jpa.interceptor.WebNonTxEmCloserValve.invoke(WebNonTxEmCloserValve.java:50) [jboss-as-jpa-7.2.0.Final.jar:7.2.0.Final]
      at org.jboss.as.web.security.SecurityContextAssociationValve.invoke(SecurityContextAssociationValve.java:169) [jboss-as-web-7.2.0.Final.jar:7.2.0.Final]
      at org.apache.catalina.core.StandardHostValve.invoke(StandardHostValve.java:145) [jbossweb-7.2.0.Final.jar:7.2.0.Final]
      at org.apache.catalina.valves.ErrorReportValve.invoke(ErrorReportValve.java:97) [jbossweb-7.2.0.Final.jar:7.2.0.Final]
      at org.apache.catalina.core.StandardEngineValve.invoke(StandardEngineValve.java:102) [jbossweb-7.2.0.Final.jar:7.2.0.Final]
      at org.apache.catalina.connector.CoyoteAdapter.service(CoyoteAdapter.java:336) [jbossweb-7.2.0.Final.jar:7.2.0.Final]
      at org.apache.coyote.ajp.AjpProcessor.process(AjpProcessor.java:488) [jbossweb-7.2.0.Final.jar:7.2.0.Final]
      at org.apache.coyote.ajp.AjpProtocol$AjpConnectionHandler.process(AjpProtocol.java:420) [jbossweb-7.2.0.Final.jar:7.2.0.Final]
      at org.apache.tomcat.util.net.JIoEndpoint$Worker.run(JIoEndpoint.java:920) [jbossweb-7.2.0.Final.jar:7.2.0.Final]
      at java.lang.Thread.run(Thread.java:748) [rt.jar:1.7.0_171]
      Caused by: org.hibernate.exception.ConstraintViolationException: could not execute batch
      at org.hibernate.exception.internal.SQLStateConversionDelegate.convert(SQLStateConversionDelegate.java:129) [hibernate-core-4.2.20.Final.jar:4.2.20.Final]
      at org.hibernate.exception.internal.StandardSQLExceptionConverter.convert(StandardSQLExceptionConverter.java:49) [hibernate-core-4.2.20.Final.jar:4.2.20.Final]
      at org.hibernate.engine.jdbc.spi.SqlExceptionHelper.convert(SqlExceptionHelper.java:124) [hibernate-core-4.2.20.Final.jar:4.2.20.Final]
      at org.hibernate.engine.jdbc.batch.internal.BatchingBatch.performExecution(BatchingBatch.java:122) [hibernate-core-4.2.20.Final.jar:4.2.20.Final]
      at org.hibernate.engine.jdbc.batch.internal.BatchingBatch.doExecuteBatch(BatchingBatch.java:101) [hibernate-core-4.2.20.Final.jar:4.2.20.Final]
      at org.hibernate.engine.jdbc.batch.internal.AbstractBatchImpl.execute(AbstractBatchImpl.java:161) [hibernate-core-4.2.20.Final.jar:4.2.20.Final]
      at org.hibernate.engine.jdbc.internal.JdbcCoordinatorImpl.executeBatch(JdbcCoordinatorImpl.java:207) [hibernate-core-4.2.20.Final.jar:4.2.20.Final]
      at org.hibernate.engine.spi.ActionQueue.executeActions(ActionQueue.java:390) [hibernate-core-4.2.20.Final.jar:4.2.20.Final]
      at org.hibernate.engine.spi.ActionQueue.executeActions(ActionQueue.java:310) [hibernate-core-4.2.20.Final.jar:4.2.20.Final]
      at org.hibernate.event.internal.AbstractFlushingEventListener.performExecutions(AbstractFlushingEventListener.java:349) [hibernate-core-4.2.20.Final.jar:4.2.20.Final]
      at org.hibernate.event.internal.DefaultFlushEventListener.onFlush(DefaultFlushEventListener.java:56) [hibernate-core-4.2.20.Final.jar:4.2.20.Final]
      at org.hibernate.internal.SessionImpl.flush(SessionImpl.java:1195) [hibernate-core-4.2.20.Final.jar:4.2.20.Final]
      at org.hibernate.internal.SessionImpl.managedFlush(SessionImpl.java:404) [hibernate-core-4.2.20.Final.jar:4.2.20.Final]
      at org.hibernate.engine.transaction.synchronization.internal.SynchronizationCallbackCoordinatorNonTrackingImpl.beforeCompletion(SynchronizationCallbackCoordinatorNonTrackingImpl.java:109) [hibernate-core-4.2.20.Final.jar:4.2.20.Final]
      ... 70 more
      Caused by: java.sql.BatchUpdateException: Batch entry 0 delete from public.cmn_company_details where id=3 was aborted: ERROR: update or delete on table "cmn_company_details" violates foreign key constraint "fk_8b3pqht8rw1vyiu1o0dm1ewtt" on table "cmn_ip_address"
        Detail: Key (id)=(3) is still referenced from table "cmn_ip_address". Call getNextException to see other errors in the batch.
      at org.postgresql.jdbc.BatchResultHandler.handleCompletion(BatchResultHandler.java:163) [postgresql-42.2.1.jre7.jar:42.2.1.jre7]
      at org.postgresql.core.v3.QueryExecutorImpl.execute(QueryExecutorImpl.java:490) [postgresql-42.2.1.jre7.jar:42.2.1.jre7]
      at org.postgresql.jdbc.PgStatement.executeBatch(PgStatement.java:835) [postgresql-42.2.1.jre7.jar:42.2.1.jre7]
      at org.postgresql.jdbc.PgPreparedStatement.executeBatch(PgPreparedStatement.java:1556) [postgresql-42.2.1.jre7.jar:42.2.1.jre7]
      at com.mchange.v2.c3p0.impl.NewProxyPreparedStatement.executeBatch(NewProxyPreparedStatement.java:1723) [c3p0-0.9.1.2.jar:0.9.1.2]
      at org.hibernate.engine.jdbc.batch.internal.BatchingBatch.performExecution(BatchingBatch.java:113) [hibernate-core-4.2.20.Final.jar:4.2.20.Final]
      ... 80 more
      Caused by: org.postgresql.util.PSQLException: ERROR: update or delete on table "cmn_company_details" violates foreign key constraint "fk_8b3pqht8rw1vyiu1o0dm1ewtt" on table "cmn_ip_address"
        Detail: Key (id)=(3) is still referenced from table "cmn_ip_address".
      at org.postgresql.core.v3.QueryExecutorImpl.receiveErrorResponse(QueryExecutorImpl.java:2422) [postgresql-42.2.1.jre7.jar:42.2.1.jre7]
      at org.postgresql.core.v3.QueryExecutorImpl.processResults(QueryExecutorImpl.java:2167) [postgresql-42.2.1.jre7.jar:42.2.1.jre7]
      at org.postgresql.core.v3.QueryExecutorImpl.execute(QueryExecutorImpl.java:479) [postgresql-42.2.1.jre7.jar:42.2.1.jre7]
      ... 84 more

        Attachments

          Activity

            People

            • Assignee:
              wbars Wylem Bars
              Reporter:
              aberge Anne-Gaelle Berge
            • Votes:
              0 Vote for this issue
              Watchers:
              2 Start watching this issue

              Dates

              • Created:
                Updated:
                Resolved:

                Time Tracking

                Estimated:
                Original Estimate - 1 hour
                1h
                Remaining:
                Remaining Estimate - 0 minutes
                0m
                Logged:
                Time Spent - 1 hour
                1h

                  Potential Duplicates