Uploaded image for project: 'XNAT'
  1. XNAT
  2. XNAT-5024

(Auto)archiving two sessions under the same non-existent subject at the same time errors out one session

    XMLWordPrintable

Details

    • CNDA 1.7.3 Sprint 8
    • Rank:
      0|ii1crj:
    • CNDA 1.7.3 Sprint 8

    Description

      This is tricky since it's a timing issue, but here's how I recreated this (Jenny sent me an email about it in the first place):

      1. Under the Session Import, etc. admin UI section, change the rebuild timer to 10000 for the check interval and 1 for the idle time (for ease of testing).
      2. Load 2 sessions in DICOM browser.
      3. If necessary, change (0008,1030) in both sessions to point to a project in your XNAT (which is set to autoarchive). Change (0010,0010) in both sessions to the same value, where this value is not the subject label for any subjects in your projects.
      4. Send only a few files of each session to your XNAT. This is so that there is little delay between the sessions so that hopefully they will archive at the same time.
      5. Wait the 60-70 seconds for the autoarchive process.
      6. One session will end up in Error status in the prearchive.

      There's a lot of activity in the logs. Here are some snippets:

      jms.log:

      2017-06-28 12:21:17,377 An error occurred processing a request from user admin to perform Rebuild operation on prearchive session at: /prearchive/projects/TEST/20170628_122011798/UCSF-BR-01_v012
      java.lang.RuntimeException: org.nrg.action.ServerException: org.nrg.xnat.helpers.prearchive.PrearcDatabase$SyncFailedException: Operation Failed: java.lang.Exception: Unable to identify subject for:XNAT_S00222
              at org.nrg.xnat.helpers.prearchive.handlers.PrearchiveRebuildHandler.execute(PrearchiveRebuildHandler.java:105)
              at org.nrg.xnat.services.messaging.prearchive.PrearchiveOperationRequestListener.onRequest(PrearchiveOperationRequestListener.java:25)
              at sun.reflect.GeneratedMethodAccessor352.invoke(Unknown Source)
              at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43)
              at java.lang.reflect.Method.invoke(Method.java:606)
              at org.springframework.util.MethodInvoker.invoke(MethodInvoker.java:269)
              at org.springframework.jms.listener.adapter.MessageListenerAdapter.invokeListenerMethod(MessageListenerAdapter.java:301)
              at org.springframework.jms.listener.adapter.MessageListenerAdapter.onMessage(MessageListenerAdapter.java:230)
              at org.springframework.jms.listener.AbstractMessageListenerContainer.doInvokeListener(AbstractMessageListenerContainer.java:721)
              at org.springframework.jms.listener.AbstractMessageListenerContainer.invokeListener(AbstractMessageListenerContainer.java:681)
              at org.springframework.jms.listener.AbstractMessageListenerContainer.doExecuteListener(AbstractMessageListenerContainer.java:651)
              at org.springframework.jms.listener.AbstractPollingMessageListenerContainer.doReceiveAndExecute(AbstractPollingMessageListenerContainer.java:313)
              at org.springframework.jms.listener.AbstractPollingMessageListenerContainer.receiveAndExecute(AbstractPollingMessageListenerContainer.java:251)
              at org.springframework.jms.listener.DefaultMessageListenerContainer$AsyncMessageListenerInvoker.invokeListener(DefaultMessageListenerContainer.java:1164)
              at org.springframework.jms.listener.DefaultMessageListenerContainer$AsyncMessageListenerInvoker.executeOngoingLoop(DefaultMessageListenerContainer.java:1156)
              at org.springframework.jms.listener.DefaultMessageListenerContainer$AsyncMessageListenerInvoker.run(DefaultMessageListenerContainer.java:1053)
              at java.lang.Thread.run(Thread.java:744)
      Caused by: org.nrg.action.ServerException: org.nrg.xnat.helpers.prearchive.PrearcDatabase$SyncFailedException: Operation Failed: java.lang.Exception: Unable to identify subject for:XNAT_S00222
              at org.nrg.xnat.archive.FinishImageUpload.call(FinishImageUpload.java:119)
              at org.nrg.xnat.helpers.prearchive.handlers.PrearchiveRebuildHandler.execute(PrearchiveRebuildHandler.java:95)
              ... 16 more
      Caused by: org.nrg.xnat.helpers.prearchive.PrearcDatabase$SyncFailedException: Operation Failed: java.lang.Exception: Unable to identify subject for:XNAT_S00222
              at org.nrg.xnat.helpers.prearchive.PrearcDatabase.wrapException(PrearcDatabase.java:1028)
              at org.nrg.xnat.helpers.prearchive.PrearcDatabase._archive(PrearcDatabase.java:1021)
              at org.nrg.xnat.helpers.prearchive.PrearcDatabase.archive(PrearcDatabase.java:959)
              at org.nrg.xnat.archive.FinishImageUpload.call(FinishImageUpload.java:104)
              ... 17 more
      Caused by: org.nrg.action.ServerException: java.lang.Exception: Unable to identify subject for:XNAT_S00222
              at org.nrg.xnat.helpers.merge.MergeSessionsA.call(MergeSessionsA.java:186)
              at org.nrg.xnat.archive.PrearcSessionArchiver.call(PrearcSessionArchiver.java:592)
              at org.nrg.xnat.helpers.prearchive.PrearcDatabase$12.extSync(PrearcDatabase.java:988)
              at org.nrg.xnat.helpers.prearchive.PrearcDatabase$12.extSync(PrearcDatabase.java:985)
              at org.nrg.xnat.helpers.prearchive.PrearcDatabase$LockAndSync.run(PrearcDatabase.java:1640)
              at org.nrg.xnat.helpers.prearchive.PrearcDatabase._archive(PrearcDatabase.java:1011)
              ... 19 more
      Caused by: java.lang.Exception: Unable to identify subject for:XNAT_S00222
              at org.nrg.xdat.om.base.BaseXnatSubjectassessordata.preSave(BaseXnatSubjectassessordata.java:113)
              at org.nrg.xdat.om.base.BaseXnatImagesessiondata.preSave(BaseXnatImagesessiondata.java:3137)
              at org.nrg.xft.utils.SaveItemHelper.save(SaveItemHelper.java:78)
              at org.nrg.xft.utils.SaveItemHelper.authorizedSave(SaveItemHelper.java:472)
              at org.nrg.xnat.archive.PrearcSessionArchiver$1.save(PrearcSessionArchiver.java:558)
              at org.nrg.xnat.archive.PrearcSessionArchiver$1.save(PrearcSessionArchiver.java:556)
              at org.nrg.xnat.helpers.merge.MergeSessionsA.call(MergeSessionsA.java:161)
              ... 24 more
      

      xdat.log:

      2017-06-28 12:21:17,376 [org.springframework.jms.listener.DefaultMessageListenerContainer#3-4] ERROR org.nrg.xnat.archive.FinishImageUpload -
      org.nrg.xnat.helpers.prearchive.PrearcDatabase$SyncFailedException: Operation Failed: java.lang.Exception: Unable to identify subject for:XNAT_S00222
              at org.nrg.xnat.helpers.prearchive.PrearcDatabase.wrapException(PrearcDatabase.java:1028)
              at org.nrg.xnat.helpers.prearchive.PrearcDatabase._archive(PrearcDatabase.java:1021)
              at org.nrg.xnat.helpers.prearchive.PrearcDatabase.archive(PrearcDatabase.java:959)
              at org.nrg.xnat.archive.FinishImageUpload.call(FinishImageUpload.java:104)
              at org.nrg.xnat.helpers.prearchive.handlers.PrearchiveRebuildHandler.execute(PrearchiveRebuildHandler.java:95)
              at org.nrg.xnat.services.messaging.prearchive.PrearchiveOperationRequestListener.onRequest(PrearchiveOperationRequestListener.java:25)
              at sun.reflect.GeneratedMethodAccessor352.invoke(Unknown Source)
              at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43)
              at java.lang.reflect.Method.invoke(Method.java:606)
              at org.springframework.util.MethodInvoker.invoke(MethodInvoker.java:269)
              at org.springframework.jms.listener.adapter.MessageListenerAdapter.invokeListenerMethod(MessageListenerAdapter.java:301)
              at org.springframework.jms.listener.adapter.MessageListenerAdapter.onMessage(MessageListenerAdapter.java:230)
              at org.springframework.jms.listener.AbstractMessageListenerContainer.doInvokeListener(AbstractMessageListenerContainer.java:721)
              at org.springframework.jms.listener.AbstractMessageListenerContainer.invokeListener(AbstractMessageListenerContainer.java:681)
              at org.springframework.jms.listener.AbstractMessageListenerContainer.doExecuteListener(AbstractMessageListenerContainer.java:651)
              at org.springframework.jms.listener.AbstractPollingMessageListenerContainer.doReceiveAndExecute(AbstractPollingMessageListenerContainer.java:313)
              at org.springframework.jms.listener.AbstractPollingMessageListenerContainer.receiveAndExecute(AbstractPollingMessageListenerContainer.java:251)
              at org.springframework.jms.listener.DefaultMessageListenerContainer$AsyncMessageListenerInvoker.invokeListener(DefaultMessageListenerContainer.java:1164)
              at org.springframework.jms.listener.DefaultMessageListenerContainer$AsyncMessageListenerInvoker.executeOngoingLoop(DefaultMessageListenerContainer.java:1156)
              at org.springframework.jms.listener.DefaultMessageListenerContainer$AsyncMessageListenerInvoker.run(DefaultMessageListenerContainer.java:1053)
              at java.lang.Thread.run(Thread.java:744)
      Caused by: org.nrg.action.ServerException: java.lang.Exception: Unable to identify subject for:XNAT_S00222
              at org.nrg.xnat.helpers.merge.MergeSessionsA.call(MergeSessionsA.java:186)
              at org.nrg.xnat.archive.PrearcSessionArchiver.call(PrearcSessionArchiver.java:592)
              at org.nrg.xnat.helpers.prearchive.PrearcDatabase$12.extSync(PrearcDatabase.java:988)
              at org.nrg.xnat.helpers.prearchive.PrearcDatabase$12.extSync(PrearcDatabase.java:985)
              at org.nrg.xnat.helpers.prearchive.PrearcDatabase$LockAndSync.run(PrearcDatabase.java:1640)
              at org.nrg.xnat.helpers.prearchive.PrearcDatabase._archive(PrearcDatabase.java:1011)
              ... 19 more
      Caused by: java.lang.Exception: Unable to identify subject for:XNAT_S00222
              at org.nrg.xdat.om.base.BaseXnatSubjectassessordata.preSave(BaseXnatSubjectassessordata.java:113)
              at org.nrg.xdat.om.base.BaseXnatImagesessiondata.preSave(BaseXnatImagesessiondata.java:3137)
              at org.nrg.xft.utils.SaveItemHelper.save(SaveItemHelper.java:78)
              at org.nrg.xft.utils.SaveItemHelper.authorizedSave(SaveItemHelper.java:472)
              at org.nrg.xnat.archive.PrearcSessionArchiver$1.save(PrearcSessionArchiver.java:558)
              at org.nrg.xnat.archive.PrearcSessionArchiver$1.save(PrearcSessionArchiver.java:556)
              at org.nrg.xnat.helpers.merge.MergeSessionsA.call(MergeSessionsA.java:161)
              ... 24 more
      

      Attachments

        Activity

          People

            moore.c@wustl.edu Charlie Moore (Inactive)
            moore.c@wustl.edu Charlie Moore (Inactive)
            Votes:
            0 Vote for this issue
            Watchers:
            1 Start watching this issue

            Dates

              Created:
              Updated:
              Resolved: