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

Session-level resources should be treated as arbitrary files

    XMLWordPrintable

Details

    • Bug
    • Status: Closed
    • Major
    • Resolution: Won't Fix
    • 1.8.4
    • None
    • None
    • XNAT 2021-Q4 Sprint 2
    • Rank:
      0|0hzyc1:1
    • XNAT 2021-Q4 Sprint 2

    Description

      I'm really struggling on assigning a priority to this. On the one hand, there's at least 2 ways I've gotten it to manifest, and it's quite bad when it does. On the other hand, it seems like it would be unlikely to happen, but definitely not impossible. Here's the recreation steps:

      1. Enable project-level anonymization for a project.
      2. Upload a study to the prearchive for the project.
      3. Via the addition in XNAT-6883, add a new DICOM file as a session resource. You can choose a DICOM file that is either part of the original study, or a file from another study. That choice here affects the end result.
      4. Attempt to archive the session.
        At this point, your result depends on your choice of DICOM file. If you repeated a file from the original study, the session archives, but the resources look completely messed up (see screenshot). If you chose to use a DICOM file from a different study, the session fails to archive, and becomes corrupted in the prearchive (Error state, details page fails to load). The logs in this scenario show that XNAT is attempting to treat the arbitrary session resource as DICOM:

        2021-09-22 21:20:11,812 [DefaultMessageListenerContainer-8] ERROR org.nrg.session.SessionBuilder - /data/xnat/prearchive/PREARCHIVE_TEST/20210922_211857762/Sample_ID must contain exactly one session
        org.nrg.session.SessionBuilder$NoUniqueSessionException: No session found
                at org.nrg.session.SessionBuilder.writeSession(SessionBuilder.java:210)
                at org.nrg.session.SessionBuilder.run(SessionBuilder.java:249)
                at org.nrg.xnat.archive.XNATSessionBuilder.buildPetSession(XNATSessionBuilder.java:227)
                at org.nrg.xnat.archive.XNATSessionBuilder.call(XNATSessionBuilder.java:174)
                at org.nrg.xnat.helpers.merge.MergePrearcToArchiveSession.getPostAnonSession(MergePrearcToArchiveSession.java:189)
                at org.nrg.xnat.helpers.merge.MergePrearcToArchiveSession.getPostAnonSession(MergePrearcToArchiveSession.java:37)
                at org.nrg.xnat.helpers.merge.MergeSessionsA.call(MergeSessionsA.java:122)
                at org.nrg.xnat.archive.PrearcSessionArchiver.call(PrearcSessionArchiver.java:609)
                at org.nrg.xnat.helpers.prearchive.PrearcDatabase$12.extSync(PrearcDatabase.java:965)
                at org.nrg.xnat.helpers.prearchive.PrearcDatabase$12.extSync(PrearcDatabase.java:962)
                at org.nrg.xnat.helpers.prearchive.PrearcDatabase$LockAndSync.run(PrearcDatabase.java:1596)
                at org.nrg.xnat.helpers.prearchive.PrearcDatabase._archive(PrearcDatabase.java:988)
                at org.nrg.xnat.helpers.prearchive.PrearcDatabase.archive(PrearcDatabase.java:935)
                at org.nrg.xnat.helpers.prearchive.handlers.PrearchiveArchiveHandler.commitSessionToArchive(PrearchiveArchiveHandler.java:61)
                at org.nrg.xnat.helpers.prearchive.handlers.PrearchiveArchiveHandler.execute(PrearchiveArchiveHandler.java:47)
                at org.nrg.xnat.services.messaging.prearchive.PrearchiveOperationRequestListener.onRequest(PrearchiveOperationRequestListener.java:38)
                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:498)
                at org.springframework.messaging.handler.invocation.InvocableHandlerMethod.doInvoke(InvocableHandlerMethod.java:180)
                at org.springframework.messaging.handler.invocation.InvocableHandlerMethod.invoke(InvocableHandlerMethod.java:112)
                at org.springframework.jms.listener.adapter.MessagingMessageListenerAdapter.invokeHandler(MessagingMessageListenerAdapter.java:104)
                at org.springframework.jms.listener.adapter.MessagingMessageListenerAdapter.onMessage(MessagingMessageListenerAdapter.java:69)
                at org.springframework.jms.listener.AbstractMessageListenerContainer.doInvokeListener(AbstractMessageListenerContainer.java:719)
                at org.springframework.jms.listener.AbstractMessageListenerContainer.invokeListener(AbstractMessageListenerContainer.java:679)
                at org.springframework.jms.listener.AbstractMessageListenerContainer.doExecuteListener(AbstractMessageListenerContainer.java:649)
                at org.springframework.jms.listener.AbstractPollingMessageListenerContainer.doReceiveAndExecute(AbstractPollingMessageListenerContainer.java:317)
                at org.springframework.jms.listener.AbstractPollingMessageListenerContainer.receiveAndExecute(AbstractPollingMessageListenerContainer.java:255)
                at org.springframework.jms.listener.DefaultMessageListenerContainer$AsyncMessageListenerInvoker.invokeListener(DefaultMessageListenerContainer.java:1167)
                at org.springframework.jms.listener.DefaultMessageListenerContainer$AsyncMessageListenerInvoker.executeOngoingLoop(DefaultMessageListenerContainer.java:1159)
                at org.springframework.jms.listener.DefaultMessageListenerContainer$AsyncMessageListenerInvoker.run(DefaultMessageListenerContainer.java:1056)
                at java.lang.Thread.run(Thread.java:748)
        

      Attachments

        Issue Links

          Activity

            People

              moore.c@wustl.edu Charlie Moore
              moore.c@wustl.edu Charlie Moore
              Votes:
              0 Vote for this issue
              Watchers:
              2 Start watching this issue

              Dates

                Created:
                Updated:
                Resolved: