pullDataFromHeaders failure

12 views
Skip to first unread message

Ben Wagner

unread,
Jul 14, 2026, 2:35:25 PM (2 days ago) Jul 14
to xnat_discussion
Hi XNAT devs,
  I'm getting an error when trying to pull dicom headers into xnat.  See the log snips below.  It's implying multiple sessions, but only one session was archived from prearchive.  All StudyInstanceUID's in the archive are the same.  Any suggestions?

Thanks,
Ben

curl -n -X PUT "https://ansirbids.biohpc.swmed.edu:8443/xnat/data/archive/projects/XXXX/subjects/XXXX_260001/experiments/XXX_260001_Y0?pullDataFromHeaders=true"
<html>
<head>
   <title>Status page</title>
</head>
<body>
<h3>Unable to locate DICOM or ECAT files</h3><p>You can get technical details <a href="http://www.w3.org/Protocols/rfc2616/rfc2616-sec10.html#sec10.5.1">here</a>.<br>
Please continue your visit at our <a href="/">home page</a>.
</p>
</body>
</html>

XDAT is spitting out this interesting tidbit.

2026-07-14 12:59:40,821 [ajp-nio-127.0.0.1-8009-exec-1] ERROR org.nrg.xnat.archive.XNATSessionBuilder - An unexpected error occurred trying to process session directory /XNAT/BIDS/XNAT_DATA/archive/ADRC/arc001/XXXX_260001_Y0
org.nrg.session.SessionBuilder$NoUniqueSessionException: Multiple sessions found: [null, 1.3.12.2.1107.5.2.43.166133.3000002607061528XXXXXXXXX]
        at org.nrg.dcm.xnat.DICOMSessionBuilder.getStudyInstanceUID(DICOMSessionBuilder.java:406)
        at org.nrg.dcm.xnat.DICOMSessionBuilder.<init>(DICOMSessionBuilder.java:342)
        at org.nrg.dcm.xnat.DICOMSessionBuilder.<init>(DICOMSessionBuilder.java:364)
        at org.nrg.dcm.xnat.DICOMSessionBuilder.<init>(DICOMSessionBuilder.java:381)
        at org.nrg.xnat.archive.XNATSessionBuilder.buildDicomSession(XNATSessionBuilder.java:248)
        at org.nrg.xnat.archive.XNATSessionBuilder.call(XNATSessionBuilder.java:172)
        at org.nrg.xnat.restlet.actions.PullSessionDataFromHeaders.call(PullSessionDataFromHeaders.java:84)
        at org.nrg.xnat.restlet.resources.SubjAssessmentResource.handlePut(SubjAssessmentResource.java:517)
        at org.restlet.Finder.handle(Finder.java:359)
        at org.restlet.Filter.doHandle(Filter.java:150)
        at org.restlet.Filter.handle(Filter.java:195)
        at org.restlet.Router.handle(Router.java:504)
        at org.restlet.Filter.doHandle(Filter.java:150)
        at org.restlet.Filter.handle(Filter.java:195)
        at org.restlet.Filter.doHandle(Filter.java:150)
        at org.restlet.Filter.handle(Filter.java:195)
        at org.restlet.Router.handle(Router.java:504)
        at org.restlet.Filter.doHandle(Filter.java:150)
        at org.restlet.Filter.handle(Filter.java:195)
        at org.restlet.Filter.doHandle(Filter.java:150)
        at org.restlet.Filter.handle(Filter.java:195)
        at org.restlet.Filter.doHandle(Filter.java:150)
        at com.noelios.restlet.StatusFilter.doHandle(StatusFilter.java:130)
[SNIP]

Along with this is restlet.log:

2026-07-14 12:59:40,915 [ajp-nio-127.0.0.1-8009-exec-1] ERROR org.nrg.xnat.restlet.resources.SubjAssessmentAbst -
java.lang.Exception: Unable to locate DICOM or ECAT files
        at org.nrg.xnat.restlet.actions.PullSessionDataFromHeaders.call(PullSessionDataFromHeaders.java:88)
        at org.nrg.xnat.restlet.resources.SubjAssessmentResource.handlePut(SubjAssessmentResource.java:517)
        at org.restlet.Finder.handle(Finder.java:359)
        at org.restlet.Filter.doHandle(Filter.java:150)
        at org.restlet.Filter.handle(Filter.java:195)
        at org.restlet.Router.handle(Router.java:504)
        at org.restlet.Filter.doHandle(Filter.java:150)
        at org.restlet.Filter.handle(Filter.java:195)
        at org.restlet.Filter.doHandle(Filter.java:150)
        at org.restlet.Filter.handle(Filter.java:195)
        at org.restlet.Router.handle(Router.java:504)
        at org.restlet.Filter.doHandle(Filter.java:150)
        at org.restlet.Filter.handle(Filter.java:195)
        at org.restlet.Filter.doHandle(Filter.java:150)
        at org.restlet.Filter.handle(Filter.java:195)
[SNIP]

And this in applicaiton.log:

2026-07-14 13:04:19,139 [ajp-nio-127.0.0.1-8009-exec-6] ERROR org.nrg.session.SessionBuilder - /XNAT/BIDS/XNAT_DATA/archive/XXXX/arc001/XXXX_260001_Y0 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:233)
        at org.nrg.xnat.archive.XNATSessionBuilder.call(XNATSessionBuilder.java:176)
        at org.nrg.xnat.restlet.actions.PullSessionDataFromHeaders.call(PullSessionDataFromHeaders.java:84)
        at org.nrg.xnat.restlet.resources.SubjAssessmentResource.handlePut(SubjAssessmentResource.java:517)
        at org.restlet.Finder.handle(Finder.java:359)
        at org.restlet.Filter.doHandle(Filter.java:150)
        at org.restlet.Filter.handle(Filter.java:195)
        at org.restlet.Router.handle(Router.java:504)
        at org.restlet.Filter.doHandle(Filter.java:150)
        at org.restlet.Filter.handle(Filter.java:195)
        at org.restlet.Filter.doHandle(Filter.java:150)
        at org.restlet.Filter.handle(Filter.java:195)

Moore, Charlie

unread,
Jul 14, 2026, 3:51:12 PM (2 days ago) Jul 14
to xnat_di...@googlegroups.com
Hi Ben,

The way I read that error message is that some of the Study Instance UIDs are null. Any chance one or more files doesn't have a Study Instance UID specified?

Thanks,
Charlie Moore

From: xnat_di...@googlegroups.com <xnat_di...@googlegroups.com> on behalf of Ben Wagner <thewa...@gmail.com>
Sent: Tuesday, July 14, 2026 1:35 PM
To: xnat_discussion <xnat_di...@googlegroups.com>
Subject: [XNAT Discussion] pullDataFromHeaders failure
 
--
You received this message because you are subscribed to the Google Groups "xnat_discussion" group.
To unsubscribe from this group and stop receiving emails from it, send an email to xnat_discussi...@googlegroups.com.
To view this discussion visit https://groups.google.com/d/msgid/xnat_discussion/c4b8e324-c683-48be-bff3-8859076360c0n%40googlegroups.com.

 


The materials in this message are private and may contain Protected Healthcare Information or other information of a sensitive nature. If you are not the intended recipient, be advised that any unauthorized use, disclosure, copying or the taking of any action in reliance on the contents of this information is strictly prohibited. If you have received this email in error, please immediately notify the sender via telephone or return mail.

Ben Wagner

unread,
Jul 15, 2026, 9:06:41 AM (yesterday) Jul 15
to xnat_discussion
Hi Charlie,
  Good question and I did just before posting.  There were no different/null  StudyInstanceUID.
Ben

[root@ansirbids SCANS]# find . -name "*.dcm" |xargs -I Y dcmdump Y | grep StudyInstanceUID | sort | uniq -c
   4530 (0020,000d) UI [1.3.12.2.1107.5.2.43.166133.30000026070XXXXXXX] #  58, 1 StudyInstanceUID
[root@ansirbids SCANS]# find . -name "*.dcm" | xargs grep -L 1.3.12.2.1107.5.2.43.166133.30000026070XXXXXXXXXXX
[root@ansirbids SCANS]# find . -name "*.dcm" | wc -l
4530

Moore, Charlie

unread,
Jul 15, 2026, 10:20:26 AM (yesterday) Jul 15
to xnat_di...@googlegroups.com
Hi Ben,

That looks good, but just to double check: 
  1. Do all of your DICOM files have a .dcm extension or might some files have slipped through?
  2. It looks like you're already in the SCANS dir. From a very cursory look into the code here, it might actually be using the entire session directory to try to find DICOM. Is there anything, maybe an anonymized output, you wouldn't have expected to be picked up?

Thanks,
Charlie Moore

Sent: Wednesday, July 15, 2026 8:06 AM
To: xnat_discussion <xnat_di...@googlegroups.com>
Subject: Re: [XNAT Discussion] pullDataFromHeaders failure
 

Ben Wagner

unread,
Jul 15, 2026, 10:43:11 AM (yesterday) Jul 15
to xnat_discussion
Hi Charlie,
  I'm in the archive SCANS directory.  Only dcm, gif, and xml files in the subtrees.  No anonymization is applied.

Ben

Moore, Charlie

unread,
Jul 15, 2026, 11:53:24 AM (yesterday) Jul 15
to xnat_di...@googlegroups.com
Hi Ben,

Sorry, let me clarify. "I'm in the archive SCANS directory" isn't exactly what you want to check. This method looks like it is starting a level above that based on https://github.com/NrgXnat/xnat/blob/b35f585f50005b54cbbf1b24c40c65f096088495/xnat-web/src/main/java/org/nrg/xnat/restlet/actions/PullSessionDataFromHeaders.java#L71 . That means anything it finds in the whole session tree, whether it be session resources, assessor resources, reconstruction resources that it can parse as DICOM is going to get included here. I'm not saying this behavior is necessarily good/correct but just trying to get to the bottom of what's going on. If there's nothing like that going on then I'm afraid we're back to square one.

Thanks,
Charlie Moore

Sent: Wednesday, July 15, 2026 9:43 AM
Reply all
Reply to author
Forward
0 new messages