{"action":"opened","issue":{"url":"https://api.github.com/repos/dcm4che/dcm4chee-arc-light/issues/946","repository_url":"https://api.github.com/repos/dcm4che/dcm4chee-arc-light","labels_url":"https://api.github.com/repos/dcm4che/dcm4chee-arc-light/issues/946/labels{/name}","comments_url":"https://api.github.com/repos/dcm4che/dcm4chee-arc-light/issues/946/comments","events_url":"https://api.github.com/repos/dcm4che/dcm4chee-arc-light/issues/946/events","html_url":"https://github.com/dcm4che/dcm4chee-arc-light/issues/946","id":253950104,"number":946,"title":"UI2: PID issuer not sent when deleting patient","user":{"login":"fdd-rev","id":19839712,"avatar_url":"https://avatars3.githubusercontent.com/u/19839712?v=4","gravatar_id":"","url":"https://api.github.com/users/fdd-rev","html_url":"https://github.com/fdd-rev","followers_url":"https://api.github.com/users/fdd-rev/followers","following_url":"https://api.github.com/users/fdd-rev/following{/other_user}","gists_url":"https://api.github.com/users/fdd-rev/gists{/gist_id}","starred_url":"https://api.github.com/users/fdd-rev/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/fdd-rev/subscriptions","organizations_url":"https://api.github.com/users/fdd-rev/orgs","repos_url":"https://api.github.com/users/fdd-rev/repos","events_url":"https://api.github.com/users/fdd-rev/events{/privacy}","received_events_url":"https://api.github.com/users/fdd-rev/received_events","type":"User","site_admin":false},"labels":[],"state":"open","locked":false,"assignee":null,"assignees":[],"milestone":null,"comments":0,"created_at":"2017-08-30T10:24:37Z","updated_at":"2017-08-30T10:24:37Z","closed_at":null,"author_association":"NONE","body":"The delete request for a patient doesn't include the Patient ID Issuer, so it fails (500) when multiple patients with same ID but different issuer exist.\r\n<details>\r\n  <summary>Full trace</summary>\r\n\r\n```\r\n2017-08-30 11:59:18,132 INFO  [org.dcm4chee.arc.iocm.rs.IocmRS] (default task-1) Process DELETE /dcm4chee-arc/aets/DCM4CHEE/rs/patients/999999 from 08f8af44-587f-4669-83d8-f27d8bbc5648@10.0.0.1\r\n2017-08-30 11:59:18,198 ERROR [org.jboss.as.ejb3.invocation] (default task-1) WFLYEJB0034: EJB Invocation failed on component PatientServiceEJB for method public org.dcm4chee.arc.entity.Patient org.dcm4chee.arc.patient.impl.PatientServiceEJB.findPatient(org.dcm4che3.data.IDWithIssuer) throws org.dcm4chee.arc.patient.NonUniquePatientException,org.dcm4chee.arc.patient.PatientMergedException: javax.ejb.EJBException: org.dcm4chee.arc.patient.NonUniquePatientException: Multiple Patients with ID 999999\r\n\tat org.jboss.as.ejb3.tx.CMTTxInterceptor.handleExceptionInOurTx(CMTTxInterceptor.java:187)\r\n\tat org.jboss.as.ejb3.tx.CMTTxInterceptor.invokeInOurTx(CMTTxInterceptor.java:277)\r\n\tat org.jboss.as.ejb3.tx.CMTTxInterceptor.required(CMTTxInterceptor.java:327)\r\n\tat org.jboss.as.ejb3.tx.CMTTxInterceptor.processInvocation(CMTTxInterceptor.java:239)\r\n\tat org.jboss.invocation.InterceptorContext.proceed(InterceptorContext.java:340)\r\n\tat org.jboss.as.ejb3.component.interceptors.CurrentInvocationContextInterceptor.processInvocation(CurrentInvocationContextInterceptor.java:41)\r\n\tat org.jboss.invocation.InterceptorContext.proceed(InterceptorContext.java:340)\r\n\tat org.jboss.as.ejb3.component.invocationmetrics.WaitTimeInterceptor.processInvocation(WaitTimeInterceptor.java:47)\r\n\tat org.jboss.invocation.InterceptorContext.proceed(InterceptorContext.java:340)\r\n\tat org.jboss.as.ejb3.security.SecurityContextInterceptor.processInvocation(SecurityContextInterceptor.java:100)\r\n\tat org.jboss.invocation.InterceptorContext.proceed(InterceptorContext.java:340)\r\n\tat org.jboss.as.ejb3.deployment.processors.StartupAwaitInterceptor.processInvocation(StartupAwaitInterceptor.java:22)\r\n\tat org.jboss.invocation.InterceptorContext.proceed(InterceptorContext.java:340)\r\n\tat org.jboss.as.ejb3.component.interceptors.ShutDownInterceptorFactory$1.processInvocation(ShutDownInterceptorFactory.java:64)\r\n\tat org.jboss.invocation.InterceptorContext.proceed(InterceptorContext.java:340)\r\n\tat org.jboss.as.ejb3.component.interceptors.LoggingInterceptor.processInvocation(LoggingInterceptor.java:67)\r\n\tat org.jboss.invocation.InterceptorContext.proceed(InterceptorContext.java:340)\r\n\tat org.jboss.as.ee.component.NamespaceContextInterceptor.processInvocation(NamespaceContextInterceptor.java:50)\r\n\tat org.jboss.invocation.InterceptorContext.proceed(InterceptorContext.java:340)\r\n\tat org.jboss.as.ejb3.component.interceptors.AdditionalSetupInterceptor.processInvocation(AdditionalSetupInterceptor.java:54)\r\n\tat org.jboss.invocation.InterceptorContext.proceed(InterceptorContext.java:340)\r\n\tat org.jboss.invocation.ContextClassLoaderInterceptor.processInvocation(ContextClassLoaderInterceptor.java:64)\r\n\tat org.jboss.invocation.InterceptorContext.proceed(InterceptorContext.java:340)\r\n\tat org.jboss.invocation.InterceptorContext.run(InterceptorContext.java:356)\r\n\tat org.wildfly.security.manager.WildFlySecurityManager.doChecked(WildFlySecurityManager.java:636)\r\n\tat org.jboss.invocation.AccessCheckingInterceptor.processInvocation(AccessCheckingInterceptor.java:61)\r\n\tat org.jboss.invocation.InterceptorContext.proceed(InterceptorContext.java:340)\r\n\tat org.jboss.invocation.InterceptorContext.run(InterceptorContext.java:356)\r\n\tat org.jboss.invocation.PrivilegedWithCombinerInterceptor.processInvocation(PrivilegedWithCombinerInterceptor.java:80)\r\n\tat org.jboss.invocation.InterceptorContext.proceed(InterceptorContext.java:340)\r\n\tat org.jboss.invocation.ChainedInterceptor.processInvocation(ChainedInterceptor.java:61)\r\n\tat org.jboss.as.ee.component.ViewService$View.invoke(ViewService.java:198)\r\n\tat org.jboss.as.ee.component.ViewDescription$1.processInvocation(ViewDescription.java:185)\r\n\tat org.jboss.invocation.InterceptorContext.proceed(InterceptorContext.java:340)\r\n\tat org.jboss.invocation.ChainedInterceptor.processInvocation(ChainedInterceptor.java:61)\r\n\tat org.jboss.as.ee.component.ProxyInvocationHandler.invoke(ProxyInvocationHandler.java:73)\r\n\tat org.dcm4chee.arc.patient.impl.PatientServiceEJB$$$view12.findPatient(Unknown Source)\r\n\tat sun.reflect.GeneratedMethodAccessor131.invoke(Unknown Source)\r\n\tat sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43)\r\n\tat java.lang.reflect.Method.invoke(Method.java:498)\r\n\tat org.jboss.weld.util.reflection.Reflections.invokeAndUnwrap(Reflections.java:433)\r\n\tat org.jboss.weld.bean.proxy.EnterpriseBeanProxyMethodHandler.invoke(EnterpriseBeanProxyMethodHandler.java:128)\r\n\tat org.jboss.weld.bean.proxy.EnterpriseTargetBeanInstance.invoke(EnterpriseTargetBeanInstance.java:56)\r\n\tat org.jboss.weld.bean.proxy.InjectionPointPropagatingEnterpriseTargetBeanInstance.invoke(InjectionPointPropagatingEnterpriseTargetBeanInstance.java:67)\r\n\tat org.jboss.weld.bean.proxy.ProxyMethodHandler.invoke(ProxyMethodHandler.java:100)\r\n\tat org.dcm4chee.arc.patient.impl.PatientServiceEJB$Proxy$_$$_Weld$EnterpriseProxy$.findPatient(Unknown Source)\r\n\tat org.dcm4chee.arc.patient.impl.PatientServiceImpl.findPatient(PatientServiceImpl.java:116)\r\n\tat org.dcm4chee.arc.patient.impl.PatientServiceImpl$Proxy$_$$_WeldClientProxy.findPatient(Unknown Source)\r\n\tat org.dcm4chee.arc.iocm.rs.IocmRS.deletePatient(IocmRS.java:191)\r\n\tat org.dcm4chee.arc.iocm.rs.IocmRS$Proxy$_$$_WeldSubclass.deletePatient(Unknown Source)\r\n\tat org.dcm4chee.arc.iocm.rs.IocmRS$Proxy$_$$_WeldClientProxy.deletePatient(Unknown Source)\r\n\tat sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)\r\n\tat sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:62)\r\n\tat sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43)\r\n\tat java.lang.reflect.Method.invoke(Method.java:498)\r\n\tat org.jboss.resteasy.core.MethodInjectorImpl.invoke(MethodInjectorImpl.java:139)\r\n\tat org.jboss.resteasy.core.ResourceMethodInvoker.invokeOnTarget(ResourceMethodInvoker.java:295)\r\n\tat org.jboss.resteasy.core.ResourceMethodInvoker.invoke(ResourceMethodInvoker.java:249)\r\n\tat org.jboss.resteasy.core.ResourceMethodInvoker.invoke(ResourceMethodInvoker.java:236)\r\n\tat org.jboss.resteasy.core.SynchronousDispatcher.invoke(SynchronousDispatcher.java:402)\r\n\tat org.jboss.resteasy.core.SynchronousDispatcher.invoke(SynchronousDispatcher.java:209)\r\n\tat org.jboss.resteasy.plugins.server.servlet.ServletContainerDispatcher.service(ServletContainerDispatcher.java:221)\r\n\tat org.jboss.resteasy.plugins.server.servlet.HttpServletDispatcher.service(HttpServletDispatcher.java:56)\r\n\tat org.jboss.resteasy.plugins.server.servlet.HttpServletDispatcher.service(HttpServletDispatcher.java:51)\r\n\tat javax.servlet.http.HttpServlet.service(HttpServlet.java:790)\r\n\tat io.undertow.servlet.handlers.ServletHandler.handleRequest(ServletHandler.java:85)\r\n\tat io.undertow.servlet.handlers.security.ServletSecurityRoleHandler.handleRequest(ServletSecurityRoleHandler.java:62)\r\n\tat io.undertow.servlet.handlers.ServletDispatchingHandler.handleRequest(ServletDispatchingHandler.java:36)\r\n\tat org.wildfly.extension.undertow.security.SecurityContextAssociationHandler.handleRequest(SecurityContextAssociationHandler.java:78)\r\n\tat io.undertow.server.handlers.PredicateHandler.handleRequest(PredicateHandler.java:43)\r\n\tat org.keycloak.adapters.undertow.UndertowAuthenticatedActionsHandler.handleRequest(UndertowAuthenticatedActionsHandler.java:66)\r\n\tat io.undertow.servlet.handlers.security.SSLInformationAssociationHandler.handleRequest(SSLInformationAssociationHandler.java:131)\r\n\tat io.undertow.servlet.handlers.security.ServletAuthenticationCallHandler.handleRequest(ServletAuthenticationCallHandler.java:57)\r\n\tat io.undertow.server.handlers.DisableCacheHandler.handleRequest(DisableCacheHandler.java:33)\r\n\tat io.undertow.server.handlers.PredicateHandler.handleRequest(PredicateHandler.java:43)\r\n\tat io.undertow.security.handlers.AuthenticationConstraintHandler.handleRequest(AuthenticationConstraintHandler.java:53)\r\n\tat io.undertow.security.handlers.AbstractConfidentialityHandler.handleRequest(AbstractConfidentialityHandler.java:46)\r\n\tat io.undertow.servlet.handlers.security.ServletConfidentialityConstraintHandler.handleRequest(ServletConfidentialityConstraintHandler.java:64)\r\n\tat io.undertow.servlet.handlers.security.ServletSecurityConstraintHandler.handleRequest(ServletSecurityConstraintHandler.java:59)\r\n\tat io.undertow.security.handlers.AuthenticationMechanismsHandler.handleRequest(AuthenticationMechanismsHandler.java:60)\r\n\tat io.undertow.servlet.handlers.security.CachedAuthenticatedSessionHandler.handleRequest(CachedAuthenticatedSessionHandler.java:77)\r\n\tat io.undertow.security.handlers.NotificationReceiverHandler.handleRequest(NotificationReceiverHandler.java:50)\r\n\tat io.undertow.security.handlers.AbstractSecurityContextAssociationHandler.handleRequest(AbstractSecurityContextAssociationHandler.java:43)\r\n\tat io.undertow.server.handlers.PredicateHandler.handleRequest(PredicateHandler.java:43)\r\n\tat org.wildfly.extension.undertow.security.jacc.JACCContextIdHandler.handleRequest(JACCContextIdHandler.java:61)\r\n\tat io.undertow.server.handlers.PredicateHandler.handleRequest(PredicateHandler.java:43)\r\n\tat org.keycloak.adapters.undertow.ServletPreAuthActionsHandler.handleRequest(ServletPreAuthActionsHandler.java:69)\r\n\tat io.undertow.server.handlers.PredicateHandler.handleRequest(PredicateHandler.java:43)\r\n\tat io.undertow.servlet.handlers.ServletInitialHandler.handleFirstRequest(ServletInitialHandler.java:292)\r\n\tat io.undertow.servlet.handlers.ServletInitialHandler.access$100(ServletInitialHandler.java:81)\r\n\tat io.undertow.servlet.handlers.ServletInitialHandler$2.call(ServletInitialHandler.java:138)\r\n\tat io.undertow.servlet.handlers.ServletInitialHandler$2.call(ServletInitialHandler.java:135)\r\n\tat io.undertow.servlet.core.ServletRequestContextThreadSetupAction$1.call(ServletRequestContextThreadSetupAction.java:48)\r\n\tat io.undertow.servlet.core.ContextClassLoaderSetupAction$1.call(ContextClassLoaderSetupAction.java:43)\r\n\tat io.undertow.servlet.api.LegacyThreadSetupActionWrapper$1.call(LegacyThreadSetupActionWrapper.java:44)\r\n\tat io.undertow.servlet.api.LegacyThreadSetupActionWrapper$1.call(LegacyThreadSetupActionWrapper.java:44)\r\n\tat io.undertow.servlet.api.LegacyThreadSetupActionWrapper$1.call(LegacyThreadSetupActionWrapper.java:44)\r\n\tat io.undertow.servlet.api.LegacyThreadSetupActionWrapper$1.call(LegacyThreadSetupActionWrapper.java:44)\r\n\tat io.undertow.servlet.api.LegacyThreadSetupActionWrapper$1.call(LegacyThreadSetupActionWrapper.java:44)\r\n\tat io.undertow.servlet.api.LegacyThreadSetupActionWrapper$1.call(LegacyThreadSetupActionWrapper.java:44)\r\n\tat io.undertow.servlet.handlers.ServletInitialHandler.dispatchRequest(ServletInitialHandler.java:272)\r\n\tat io.undertow.servlet.handlers.ServletInitialHandler.access$000(ServletInitialHandler.java:81)\r\n\tat io.undertow.servlet.handlers.ServletInitialHandler$1.handleRequest(ServletInitialHandler.java:104)\r\n\tat io.undertow.server.Connectors.executeRootHandler(Connectors.java:202)\r\n\tat io.undertow.server.HttpServerExchange$1.run(HttpServerExchange.java:805)\r\n\tat java.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1142)\r\n\tat java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:617)\r\n\tat java.lang.Thread.run(Thread.java:745)\r\nCaused by: org.dcm4chee.arc.patient.NonUniquePatientException: Multiple Patients with ID 999999\r\n\tat org.dcm4chee.arc.patient.impl.PatientServiceEJB.findPatient(PatientServiceEJB.java:149)\r\n\tat sun.reflect.GeneratedMethodAccessor131.invoke(Unknown Source)\r\n\tat sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43)\r\n\tat java.lang.reflect.Method.invoke(Method.java:498)\r\n\tat org.jboss.as.ee.component.ManagedReferenceMethodInterceptor.processInvocation(ManagedReferenceMethodInterceptor.java:52)\r\n\tat org.jboss.invocation.InterceptorContext.proceed(InterceptorContext.java:340)\r\n\tat org.jboss.invocation.InterceptorContext$Invocation.proceed(InterceptorContext.java:437)\r\n\tat org.jboss.as.weld.ejb.Jsr299BindingsInterceptor.doMethodInterception(Jsr299BindingsInterceptor.java:82)\r\n\tat org.jboss.as.weld.ejb.Jsr299BindingsInterceptor.processInvocation(Jsr299BindingsInterceptor.java:93)\r\n\tat org.jboss.as.ee.component.interceptors.UserInterceptorFactory$1.processInvocation(UserInterceptorFactory.java:63)\r\n\tat org.jboss.invocation.InterceptorContext.proceed(InterceptorContext.java:340)\r\n\tat org.jboss.as.ejb3.component.invocationmetrics.ExecutionTimeInterceptor.processInvocation(ExecutionTimeInterceptor.java:43)\r\n\tat org.jboss.invocation.InterceptorContext.proceed(InterceptorContext.java:340)\r\n\tat org.jboss.as.jpa.interceptor.SBInvocationInterceptor.processInvocation(SBInvocationInterceptor.java:47)\r\n\tat org.jboss.invocation.InterceptorContext.proceed(InterceptorContext.java:340)\r\n\tat org.jboss.invocation.InterceptorContext$Invocation.proceed(InterceptorContext.java:437)\r\n\tat org.jboss.weld.ejb.AbstractEJBRequestScopeActivationInterceptor.aroundInvoke(AbstractEJBRequestScopeActivationInterceptor.java:64)\r\n\tat org.jboss.as.weld.ejb.EjbRequestScopeActivationInterceptor.processInvocation(EjbRequestScopeActivationInterceptor.java:83)\r\n\tat org.jboss.invocation.InterceptorContext.proceed(InterceptorContext.java:340)\r\n\tat org.jboss.as.ee.concurrent.ConcurrentContextInterceptor.processInvocation(ConcurrentContextInterceptor.java:45)\r\n\tat org.jboss.invocation.InterceptorContext.proceed(InterceptorContext.java:340)\r\n\tat org.jboss.invocation.InitialInterceptor.processInvocation(InitialInterceptor.java:21)\r\n\tat org.jboss.invocation.InterceptorContext.proceed(InterceptorContext.java:340)\r\n\tat org.jboss.invocation.ChainedInterceptor.processInvocation(ChainedInterceptor.java:61)\r\n\tat org.jboss.as.ee.component.interceptors.ComponentDispatcherInterceptor.processInvocation(ComponentDispatcherInterceptor.java:52)\r\n\tat org.jboss.invocation.InterceptorContext.proceed(InterceptorContext.java:340)\r\n\tat org.jboss.as.ejb3.component.pool.PooledInstanceInterceptor.processInvocation(PooledInstanceInterceptor.java:51)\r\n\tat org.jboss.invocation.InterceptorContext.proceed(InterceptorContext.java:340)\r\n\tat org.jboss.as.ejb3.tx.CMTTxInterceptor.invokeInOurTx(CMTTxInterceptor.java:275)\r\n\t... 106 more\r\n\r\n2017-08-30 11:59:18,211 ERROR [io.undertow.request] (default task-1) UT005023: Exception handling request to /dcm4chee-arc/aets/DCM4CHEE/rs/patients/999999: org.jboss.resteasy.spi.UnhandledException: javax.ejb.EJBException: org.dcm4chee.arc.patient.NonUniquePatientException: Multiple Patients with ID 999999\r\n\tat org.jboss.resteasy.core.ExceptionHandler.handleApplicationException(ExceptionHandler.java:77)\r\n\tat org.jboss.resteasy.core.ExceptionHandler.handleException(ExceptionHandler.java:220)\r\n\tat org.jboss.resteasy.core.SynchronousDispatcher.writeException(SynchronousDispatcher.java:175)\r\n\tat org.jboss.resteasy.core.SynchronousDispatcher.invoke(SynchronousDispatcher.java:418)\r\n\tat org.jboss.resteasy.core.SynchronousDispatcher.invoke(SynchronousDispatcher.java:209)\r\n\tat org.jboss.resteasy.plugins.server.servlet.ServletContainerDispatcher.service(ServletContainerDispatcher.java:221)\r\n\tat org.jboss.resteasy.plugins.server.servlet.HttpServletDispatcher.service(HttpServletDispatcher.java:56)\r\n\tat org.jboss.resteasy.plugins.server.servlet.HttpServletDispatcher.service(HttpServletDispatcher.java:51)\r\n\tat javax.servlet.http.HttpServlet.service(HttpServlet.java:790)\r\n\tat io.undertow.servlet.handlers.ServletHandler.handleRequest(ServletHandler.java:85)\r\n\tat io.undertow.servlet.handlers.security.ServletSecurityRoleHandler.handleRequest(ServletSecurityRoleHandler.java:62)\r\n\tat io.undertow.servlet.handlers.ServletDispatchingHandler.handleRequest(ServletDispatchingHandler.java:36)\r\n\tat org.wildfly.extension.undertow.security.SecurityContextAssociationHandler.handleRequest(SecurityContextAssociationHandler.java:78)\r\n\tat io.undertow.server.handlers.PredicateHandler.handleRequest(PredicateHandler.java:43)\r\n\tat org.keycloak.adapters.undertow.UndertowAuthenticatedActionsHandler.handleRequest(UndertowAuthenticatedActionsHandler.java:66)\r\n\tat io.undertow.servlet.handlers.security.SSLInformationAssociationHandler.handleRequest(SSLInformationAssociationHandler.java:131)\r\n\tat io.undertow.servlet.handlers.security.ServletAuthenticationCallHandler.handleRequest(ServletAuthenticationCallHandler.java:57)\r\n\tat io.undertow.server.handlers.DisableCacheHandler.handleRequest(DisableCacheHandler.java:33)\r\n\tat io.undertow.server.handlers.PredicateHandler.handleRequest(PredicateHandler.java:43)\r\n\tat io.undertow.security.handlers.AuthenticationConstraintHandler.handleRequest(AuthenticationConstraintHandler.java:53)\r\n\tat io.undertow.security.handlers.AbstractConfidentialityHandler.handleRequest(AbstractConfidentialityHandler.java:46)\r\n\tat io.undertow.servlet.handlers.security.ServletConfidentialityConstraintHandler.handleRequest(ServletConfidentialityConstraintHandler.java:64)\r\n\tat io.undertow.servlet.handlers.security.ServletSecurityConstraintHandler.handleRequest(ServletSecurityConstraintHandler.java:59)\r\n\tat io.undertow.security.handlers.AuthenticationMechanismsHandler.handleRequest(AuthenticationMechanismsHandler.java:60)\r\n\tat io.undertow.servlet.handlers.security.CachedAuthenticatedSessionHandler.handleRequest(CachedAuthenticatedSessionHandler.java:77)\r\n\tat io.undertow.security.handlers.NotificationReceiverHandler.handleRequest(NotificationReceiverHandler.java:50)\r\n\tat io.undertow.security.handlers.AbstractSecurityContextAssociationHandler.handleRequest(AbstractSecurityContextAssociationHandler.java:43)\r\n\tat io.undertow.server.handlers.PredicateHandler.handleRequest(PredicateHandler.java:43)\r\n\tat org.wildfly.extension.undertow.security.jacc.JACCContextIdHandler.handleRequest(JACCContextIdHandler.java:61)\r\n\tat io.undertow.server.handlers.PredicateHandler.handleRequest(PredicateHandler.java:43)\r\n\tat org.keycloak.adapters.undertow.ServletPreAuthActionsHandler.handleRequest(ServletPreAuthActionsHandler.java:69)\r\n\tat io.undertow.server.handlers.PredicateHandler.handleRequest(PredicateHandler.java:43)\r\n\tat io.undertow.servlet.handlers.ServletInitialHandler.handleFirstRequest(ServletInitialHandler.java:292)\r\n\tat io.undertow.servlet.handlers.ServletInitialHandler.access$100(ServletInitialHandler.java:81)\r\n\tat io.undertow.servlet.handlers.ServletInitialHandler$2.call(ServletInitialHandler.java:138)\r\n\tat io.undertow.servlet.handlers.ServletInitialHandler$2.call(ServletInitialHandler.java:135)\r\n\tat io.undertow.servlet.core.ServletRequestContextThreadSetupAction$1.call(ServletRequestContextThreadSetupAction.java:48)\r\n\tat io.undertow.servlet.core.ContextClassLoaderSetupAction$1.call(ContextClassLoaderSetupAction.java:43)\r\n\tat io.undertow.servlet.api.LegacyThreadSetupActionWrapper$1.call(LegacyThreadSetupActionWrapper.java:44)\r\n\tat io.undertow.servlet.api.LegacyThreadSetupActionWrapper$1.call(LegacyThreadSetupActionWrapper.java:44)\r\n\tat io.undertow.servlet.api.LegacyThreadSetupActionWrapper$1.call(LegacyThreadSetupActionWrapper.java:44)\r\n\tat io.undertow.servlet.api.LegacyThreadSetupActionWrapper$1.call(LegacyThreadSetupActionWrapper.java:44)\r\n\tat io.undertow.servlet.api.LegacyThreadSetupActionWrapper$1.call(LegacyThreadSetupActionWrapper.java:44)\r\n\tat io.undertow.servlet.api.LegacyThreadSetupActionWrapper$1.call(LegacyThreadSetupActionWrapper.java:44)\r\n\tat io.undertow.servlet.handlers.ServletInitialHandler.dispatchRequest(ServletInitialHandler.java:272)\r\n\tat io.undertow.servlet.handlers.ServletInitialHandler.access$000(ServletInitialHandler.java:81)\r\n\tat io.undertow.servlet.handlers.ServletInitialHandler$1.handleRequest(ServletInitialHandler.java:104)\r\n\tat io.undertow.server.Connectors.executeRootHandler(Connectors.java:202)\r\n\tat io.undertow.server.HttpServerExchange$1.run(HttpServerExchange.java:805)\r\n\tat java.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1142)\r\n\tat java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:617)\r\n\tat java.lang.Thread.run(Thread.java:745)\r\nCaused by: javax.ejb.EJBException: org.dcm4chee.arc.patient.NonUniquePatientException: Multiple Patients with ID 999999\r\n\tat org.jboss.as.ejb3.tx.CMTTxInterceptor.handleExceptionInOurTx(CMTTxInterceptor.java:187)\r\n\tat org.jboss.as.ejb3.tx.CMTTxInterceptor.invokeInOurTx(CMTTxInterceptor.java:277)\r\n\tat org.jboss.as.ejb3.tx.CMTTxInterceptor.required(CMTTxInterceptor.java:327)\r\n\tat org.jboss.as.ejb3.tx.CMTTxInterceptor.processInvocation(CMTTxInterceptor.java:239)\r\n\tat org.jboss.invocation.InterceptorContext.proceed(InterceptorContext.java:340)\r\n\tat org.jboss.as.ejb3.component.interceptors.CurrentInvocationContextInterceptor.processInvocation(CurrentInvocationContextInterceptor.java:41)\r\n\tat org.jboss.invocation.InterceptorContext.proceed(InterceptorContext.java:340)\r\n\tat org.jboss.as.ejb3.component.invocationmetrics.WaitTimeInterceptor.processInvocation(WaitTimeInterceptor.java:47)\r\n\tat org.jboss.invocation.InterceptorContext.proceed(InterceptorContext.java:340)\r\n\tat org.jboss.as.ejb3.security.SecurityContextInterceptor.processInvocation(SecurityContextInterceptor.java:100)\r\n\tat org.jboss.invocation.InterceptorContext.proceed(InterceptorContext.java:340)\r\n\tat org.jboss.as.ejb3.deployment.processors.StartupAwaitInterceptor.processInvocation(StartupAwaitInterceptor.java:22)\r\n\tat org.jboss.invocation.InterceptorContext.proceed(InterceptorContext.java:340)\r\n\tat org.jboss.as.ejb3.component.interceptors.ShutDownInterceptorFactory$1.processInvocation(ShutDownInterceptorFactory.java:64)\r\n\tat org.jboss.invocation.InterceptorContext.proceed(InterceptorContext.java:340)\r\n\tat org.jboss.as.ejb3.component.interceptors.LoggingInterceptor.processInvocation(LoggingInterceptor.java:67)\r\n\tat org.jboss.invocation.InterceptorContext.proceed(InterceptorContext.java:340)\r\n\tat org.jboss.as.ee.component.NamespaceContextInterceptor.processInvocation(NamespaceContextInterceptor.java:50)\r\n\tat org.jboss.invocation.InterceptorContext.proceed(InterceptorContext.java:340)\r\n\tat org.jboss.as.ejb3.component.interceptors.AdditionalSetupInterceptor.processInvocation(AdditionalSetupInterceptor.java:54)\r\n\tat org.jboss.invocation.InterceptorContext.proceed(InterceptorContext.java:340)\r\n\tat org.jboss.invocation.ContextClassLoaderInterceptor.processInvocation(ContextClassLoaderInterceptor.java:64)\r\n\tat org.jboss.invocation.InterceptorContext.proceed(InterceptorContext.java:340)\r\n\tat org.jboss.invocation.InterceptorContext.run(InterceptorContext.java:356)\r\n\tat org.wildfly.security.manager.WildFlySecurityManager.doChecked(WildFlySecurityManager.java:636)\r\n\tat org.jboss.invocation.AccessCheckingInterceptor.processInvocation(AccessCheckingInterceptor.java:61)\r\n\tat org.jboss.invocation.InterceptorContext.proceed(InterceptorContext.java:340)\r\n\tat org.jboss.invocation.InterceptorContext.run(InterceptorContext.java:356)\r\n\tat org.jboss.invocation.PrivilegedWithCombinerInterceptor.processInvocation(PrivilegedWithCombinerInterceptor.java:80)\r\n\tat org.jboss.invocation.InterceptorContext.proceed(InterceptorContext.java:340)\r\n\tat org.jboss.invocation.ChainedInterceptor.processInvocation(ChainedInterceptor.java:61)\r\n\tat org.jboss.as.ee.component.ViewService$View.invoke(ViewService.java:198)\r\n\tat org.jboss.as.ee.component.ViewDescription$1.processInvocation(ViewDescription.java:185)\r\n\tat org.jboss.invocation.InterceptorContext.proceed(InterceptorContext.java:340)\r\n\tat org.jboss.invocation.ChainedInterceptor.processInvocation(ChainedInterceptor.java:61)\r\n\tat org.jboss.as.ee.component.ProxyInvocationHandler.invoke(ProxyInvocationHandler.java:73)\r\n\tat org.dcm4chee.arc.patient.impl.PatientServiceEJB$$$view12.findPatient(Unknown Source)\r\n\tat sun.reflect.GeneratedMethodAccessor131.invoke(Unknown Source)\r\n\tat sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43)\r\n\tat java.lang.reflect.Method.invoke(Method.java:498)\r\n\tat org.jboss.weld.util.reflection.Reflections.invokeAndUnwrap(Reflections.java:433)\r\n\tat org.jboss.weld.bean.proxy.EnterpriseBeanProxyMethodHandler.invoke(EnterpriseBeanProxyMethodHandler.java:128)\r\n\tat org.jboss.weld.bean.proxy.EnterpriseTargetBeanInstance.invoke(EnterpriseTargetBeanInstance.java:56)\r\n\tat org.jboss.weld.bean.proxy.InjectionPointPropagatingEnterpriseTargetBeanInstance.invoke(InjectionPointPropagatingEnterpriseTargetBeanInstance.java:67)\r\n\tat org.jboss.weld.bean.proxy.ProxyMethodHandler.invoke(ProxyMethodHandler.java:100)\r\n\tat org.dcm4chee.arc.patient.impl.PatientServiceEJB$Proxy$_$$_Weld$EnterpriseProxy$.findPatient(Unknown Source)\r\n\tat org.dcm4chee.arc.patient.impl.PatientServiceImpl.findPatient(PatientServiceImpl.java:116)\r\n\tat org.dcm4chee.arc.patient.impl.PatientServiceImpl$Proxy$_$$_WeldClientProxy.findPatient(Unknown Source)\r\n\tat org.dcm4chee.arc.iocm.rs.IocmRS.deletePatient(IocmRS.java:191)\r\n\tat org.dcm4chee.arc.iocm.rs.IocmRS$Proxy$_$$_WeldSubclass.deletePatient(Unknown Source)\r\n\tat org.dcm4chee.arc.iocm.rs.IocmRS$Proxy$_$$_WeldClientProxy.deletePatient(Unknown Source)\r\n\tat sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)\r\n\tat sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:62)\r\n\tat sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43)\r\n\tat java.lang.reflect.Method.invoke(Method.java:498)\r\n\tat org.jboss.resteasy.core.MethodInjectorImpl.invoke(MethodInjectorImpl.java:139)\r\n\tat org.jboss.resteasy.core.ResourceMethodInvoker.invokeOnTarget(ResourceMethodInvoker.java:295)\r\n\tat org.jboss.resteasy.core.ResourceMethodInvoker.invoke(ResourceMethodInvoker.java:249)\r\n\tat org.jboss.resteasy.core.ResourceMethodInvoker.invoke(ResourceMethodInvoker.java:236)\r\n\tat org.jboss.resteasy.core.SynchronousDispatcher.invoke(SynchronousDispatcher.java:402)\r\n\t... 48 more\r\nCaused by: org.dcm4chee.arc.patient.NonUniquePatientException: Multiple Patients with ID 999999\r\n\tat org.dcm4chee.arc.patient.impl.PatientServiceEJB.findPatient(PatientServiceEJB.java:149)\r\n\tat sun.reflect.GeneratedMethodAccessor131.invoke(Unknown Source)\r\n\tat sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43)\r\n\tat java.lang.reflect.Method.invoke(Method.java:498)\r\n\tat org.jboss.as.ee.component.ManagedReferenceMethodInterceptor.processInvocation(ManagedReferenceMethodInterceptor.java:52)\r\n\tat org.jboss.invocation.InterceptorContext.proceed(InterceptorContext.java:340)\r\n\tat org.jboss.invocation.InterceptorContext$Invocation.proceed(InterceptorContext.java:437)\r\n\tat org.jboss.as.weld.ejb.Jsr299BindingsInterceptor.doMethodInterception(Jsr299BindingsInterceptor.java:82)\r\n\tat org.jboss.as.weld.ejb.Jsr299BindingsInterceptor.processInvocation(Jsr299BindingsInterceptor.java:93)\r\n\tat org.jboss.as.ee.component.interceptors.UserInterceptorFactory$1.processInvocation(UserInterceptorFactory.java:63)\r\n\tat org.jboss.invocation.InterceptorContext.proceed(InterceptorContext.java:340)\r\n\tat org.jboss.as.ejb3.component.invocationmetrics.ExecutionTimeInterceptor.processInvocation(ExecutionTimeInterceptor.java:43)\r\n\tat org.jboss.invocation.InterceptorContext.proceed(InterceptorContext.java:340)\r\n\tat org.jboss.as.jpa.interceptor.SBInvocationInterceptor.processInvocation(SBInvocationInterceptor.java:47)\r\n\tat org.jboss.invocation.InterceptorContext.proceed(InterceptorContext.java:340)\r\n\tat org.jboss.invocation.InterceptorContext$Invocation.proceed(InterceptorContext.java:437)\r\n\tat org.jboss.weld.ejb.AbstractEJBRequestScopeActivationInterceptor.aroundInvoke(AbstractEJBRequestScopeActivationInterceptor.java:64)\r\n\tat org.jboss.as.weld.ejb.EjbRequestScopeActivationInterceptor.processInvocation(EjbRequestScopeActivationInterceptor.java:83)\r\n\tat org.jboss.invocation.InterceptorContext.proceed(InterceptorContext.java:340)\r\n\tat org.jboss.as.ee.concurrent.ConcurrentContextInterceptor.processInvocation(ConcurrentContextInterceptor.java:45)\r\n\tat org.jboss.invocation.InterceptorContext.proceed(InterceptorContext.java:340)\r\n\tat org.jboss.invocation.InitialInterceptor.processInvocation(InitialInterceptor.java:21)\r\n\tat org.jboss.invocation.InterceptorContext.proceed(InterceptorContext.java:340)\r\n\tat org.jboss.invocation.ChainedInterceptor.processInvocation(ChainedInterceptor.java:61)\r\n\tat org.jboss.as.ee.component.interceptors.ComponentDispatcherInterceptor.processInvocation(ComponentDispatcherInterceptor.java:52)\r\n\tat org.jboss.invocation.InterceptorContext.proceed(InterceptorContext.java:340)\r\n\tat org.jboss.as.ejb3.component.pool.PooledInstanceInterceptor.processInvocation(PooledInstanceInterceptor.java:51)\r\n\tat org.jboss.invocation.InterceptorContext.proceed(InterceptorContext.java:340)\r\n\tat org.jboss.as.ejb3.tx.CMTTxInterceptor.invokeInOurTx(CMTTxInterceptor.java:275)\r\n\t... 106 more\r\n```\r\n</details>\r\n\r\nThe request is successful if I manually resend it adding the issuer:\r\n```\r\n2017-08-30 11:59:49,167 INFO  [org.dcm4chee.arc.iocm.rs.IocmRS] (default task-5) Process DELETE /dcm4chee-arc/aets/DCM4CHEE/rs/patients/999999%5E%5E%5ESECONDISSUER from 08f8af44-587f-4669-83d8-f27d8bbc5648@10.0.0.1\r\n2017-08-30 11:59:49,439 INFO  [org.dcm4chee.arc.delete.impl.DeletionServiceImpl] (default task-5) Successfully delete Patient[pk=26, id=PatientID[pk=26, id=999999, issuer=SECONDISSUER], name=PATIENT^SECOND] from database\r\n```\r\n\r\nFound on 5.10.5."}}
{"actor":{"display_login":"fdd-rev"}}