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

Rebuilding session in prearchive fails with anonymization

    XMLWordPrintable

Details

    • Bug
    • Resolution: Fixed
    • Blocker
    • 1.7.1
    • None
    • Anonymization, Prearchive
    • None
    • xnat-dev05

    • 1.7.1 Release Sprint 1
    • Rank:
      0|ii131j:
    • 1.7.1 Release Sprint 1

    Description

      This is what's been going wrong in selenium test QA-181. It occurs with the more complicated anon script used there, but I've recreated it consistently using only the one-line anon script:

      {code}
      (0008,1010) := "King's Crossing"{code}
      1. Set up site anonymization to use the above script.
      2. Set up a new project
      3. Load some DICOM (I used a subset of sample1) in DICOM browser.
      4. Modify (0008,1030) to use your project ID.
      5. Send.
      6. When the data is all there, rebuild the session in the prearchive.
      7. The session stays in Rebuilding status and you can't do anything with it. In the logs, there's stuff like...

      jms.log:

      {code}
      2016-11-17 10:24:16,583 An error occurred processing a request from user admin to perform Rebuild operation on prearchive session at: /prearchive/projects/r/20161117_102405501/Sample_ID
      java.lang.RuntimeException: org.xml.sax.SAXParseException; Premature end of file.
      at org.nrg.xnat.helpers.prearchive.handlers.PrearchiveRebuildHandler.execute(PrearchiveRebuildHandler.java:103)
      at org.nrg.xnat.services.messaging.prearchive.PrearchiveOperationRequestListener.onRequest(PrearchiveOperationRequestListener.java:25)
      at sun.reflect.GeneratedMethodAccessor642.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:315)
      at org.springframework.jms.listener.AbstractPollingMessageListenerContainer.receiveAndExecute(AbstractPollingMessageListenerContainer.java:253)
      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.xml.sax.SAXParseException; Premature end of file.
      at org.apache.xerces.util.ErrorHandlerWrapper.createSAXParseException(Unknown Source)
      at org.apache.xerces.util.ErrorHandlerWrapper.fatalError(Unknown Source)
      at org.apache.xerces.impl.XMLErrorReporter.reportError(Unknown Source)
      at org.apache.xerces.impl.XMLErrorReporter.reportError(Unknown Source)
      at org.apache.xerces.impl.XMLErrorReporter.reportError(Unknown Source)
      at org.apache.xerces.impl.XMLVersionDetector.determineDocVersion(Unknown Source)
      at org.apache.xerces.parsers.XML11Configuration.parse(Unknown Source)
      at org.apache.xerces.parsers.XML11Configuration.parse(Unknown Source)
      at org.apache.xerces.parsers.XMLParser.parse(Unknown Source)
      at org.apache.xerces.parsers.AbstractSAXParser.parse(Unknown Source)
      at org.apache.xerces.jaxp.SAXParserImpl$JAXPSAXParser.parse(Unknown Source)
      at org.apache.xerces.jaxp.SAXParserImpl.parse(Unknown Source)
      at javax.xml.parsers.SAXParser.parse(SAXParser.java:195)
      at org.nrg.xdat.bean.reader.XDATXMLReader.parse(XDATXMLReader.java:474)
      at org.nrg.xnat.helpers.prearchive.handlers.PrearchiveRebuildHandler.execute(PrearchiveRebuildHandler.java:68)
      ... 16 more{code}

      application.log:

      {code}
      2016-11-17 10:24:16,579 org.springframework.jms.listener.DefaultMessageListenerContainer#3-7 ERROR org.nrg.session.SessionBuilder - /data/xnat/prearchive/r/20161117_102405501/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:250)
      at org.nrg.xnat.archive.XNATSessionBuilder.call(XNATSessionBuilder.java:209)
      at org.nrg.xnat.helpers.prearchive.PrearcDatabase$13.extSync(PrearcDatabase.java:1059)
      at org.nrg.xnat.helpers.prearchive.PrearcDatabase$13.extSync(PrearcDatabase.java:1029)
      at org.nrg.xnat.helpers.prearchive.PrearcDatabase$LockAndSync.run(PrearcDatabase.java:1619)
      at org.nrg.xnat.helpers.prearchive.PrearcDatabase.buildSession(PrearcDatabase.java:1080)
      at org.nrg.xnat.helpers.prearchive.handlers.PrearchiveRebuildHandler.execute(PrearchiveRebuildHandler.java:50)
      at org.nrg.xnat.services.messaging.prearchive.PrearchiveOperationRequestListener.onRequest(PrearchiveOperationRequestListener.java:25)
      at sun.reflect.GeneratedMethodAccessor642.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:315)
      at org.springframework.jms.listener.AbstractPollingMessageListenerContainer.receiveAndExecute(AbstractPollingMessageListenerContainer.java:253)
      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){code}

      CC: Dave Maffitt

      Attachments

        Issue Links

          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: