Adding Custom Variables to MR Session gives "Failed to save modification"

142 views
Skip to first unread message

Torsten Rohlfing

unread,
Jul 8, 2013, 5:33:01 PM7/8/13
to xnat_di...@googlegroups.com
Hi Folks -

I am a bit stumped here. Maybe someone can help.

I am trying to add a set of three string variables to my MR Session experiments. (I have previously added a set of two booleans with no problem).

Now, I can set up the set of three variables, and they are stored persistently (I can see them in the "Add variables..." dialog now; see attached screenshot). But when I click "Save" and then "Done" I get a popup window saying, "Failed to save modification."

The only error I can find in the server logs from the time that this happens is in restlet.log:

2013-07-08 14:21:55,125 [http-bio-8080-exec-28] ERROR org.nrg.xnat.restlet.resources.SecureResource -
org.nrg.xft.exception.FieldNotFoundException: Field not found: 'xnat:projectdata_id'
        at org.nrg.xft.XFTItem.setProperty(XFTItem.java:4359)
        at org.nrg.xdat.base.BaseElement.setProperty(BaseElement.java:135)
        at org.nrg.xnat.restlet.resources.ProtocolResource.handlePut(ProtocolResource.java:78)
        ....

Any help greatly appreciated, as usual.

Thanks!

Torsten
variables.png

Herrick, Rick

unread,
Jul 9, 2013, 12:42:03 PM7/9/13
to xnat_di...@googlegroups.com

Torsten,

 

Can you look through your xnat_builder folders for the string “projectdata_id” (e.g. find . -type f | xargs fgrep projectdata_id)? I’m pretty certain that’s supposed to be xnat:projectdata/id, so somewhere that calculation is getting messed up with the underscore instead of a slash…

 

Rick Herrick

Sr. Programmer/Analyst

Neuroinformatics Research Group

Washington University School of Medicine

(314) 827-4250

--
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 post to this group, send email to xnat_di...@googlegroups.com.
Visit this group at http://groups.google.com/group/xnat_discussion.
For more options, visit https://groups.google.com/groups/opt_out.
 
 




The material in this message is private and may contain Protected Healthcare Information (PHI). 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.

Torsten Rohlfing

unread,
Jul 9, 2013, 1:01:40 PM7/9/13
to xnat_di...@googlegroups.com
Rick:

Well, there are actually a lot of files with 'projectdata_id':

./projects/xnat/sql/xnat-update.sql
./projects/xnat/sql/xnat.sql
./projects/xnat/src/schemas/xnat/display/xnat_projectData_display.xml
./projects/xnat/src/scripts/subject/SubjectForm.js
./deployments/xnat/fields/xnat_projectData_alias.txt
./deployments/xnat/fields/xnat_studyProtocol.txt
./deployments/xnat/fields/xnat_projectData_field.txt
./deployments/xnat/fields/xnat_datatypeProtocol.txt
./deployments/xnat/fields/xnat_abstractProtocol.txt
./deployments/xnat/fields/xnat_projectData.txt
./deployments/xnat/sql/xnat-update.sql
./deployments/xnat/sql/xnat.sql
./deployments/xnat/src/schemas/xnat/display/xnat_projectData_display.xml
./deployments/xnat/src/java/org/nrg/xdat/om/base/BaseXnatAbstractprotocol.java
./deployments/xnat/src/java/org/nrg/xnat/restlet/resources/search/SearchFieldListResource.java
./deployments/xnat/src/java/org/nrg/xnat/restlet/resources/files/XNATTemplate.java
./deployments/xnat/src/java/org/nrg/xnat/restlet/resources/files/FileResource.java
./deployments/xnat/src/java/org/nrg/xnat/restlet/resources/ProtocolResource.java
./deployments/xnat/src/java/org/nrg/xnat/turbine/modules/actions/QuickSearchAction.java
./deployments/xnat/src/scripts/subject/SubjectForm.js
./deployments/xnat/target/xnat/schemas/xnat/display/xnat_projectData_display.xml
./deployments/xnat/target/xnat/WEB-INF/classes/org/nrg/xdat/om/base/BaseXnatAbstractprotocol.class
./deployments/xnat/target/xnat/WEB-INF/classes/org/nrg/xnat/restlet/resources/ProtocolResource.class
./deployments/xnat/target/xnat/WEB-INF/classes/org/nrg/xnat/restlet/resources/search/SearchFieldListResource.class
./deployments/xnat/target/xnat/WEB-INF/classes/org/nrg/xnat/restlet/resources/files/XNATTemplate.class
./deployments/xnat/target/xnat/WEB-INF/classes/org/nrg/xnat/restlet/resources/files/FileResource.class
./deployments/xnat/target/xnat/WEB-INF/classes/org/nrg/xnat/turbine/modules/actions/QuickSearchAction.class
./deployments/xnat/target/xnat/scripts/subject/SubjectForm.js
./deployments/xnat/target/src/org/nrg/xdat/om/base/BaseXnatAbstractprotocol.java
./deployments/xnat/target/src/org/nrg/xnat/restlet/resources/search/SearchFieldListResource.java
./deployments/xnat/target/src/org/nrg/xnat/restlet/resources/files/XNATTemplate.java
./deployments/xnat/target/src/org/nrg/xnat/restlet/resources/files/FileResource.java
./deployments/xnat/target/src/org/nrg/xnat/restlet/resources/ProtocolResource.java
./deployments/xnat/target/src/org/nrg/xnat/turbine/modules/actions/QuickSearchAction.java
./deployments/xnat/target/classes/org/nrg/xdat/om/base/BaseXnatAbstractprotocol.class
./deployments/xnat/target/classes/org/nrg/xnat/restlet/resources/ProtocolResource.class
./deployments/xnat/target/classes/org/nrg/xnat/restlet/resources/search/SearchFieldListResource.class
./deployments/xnat/target/classes/org/nrg/xnat/restlet/resources/files/XNATTemplate.class
./deployments/xnat/target/classes/org/nrg/xnat/restlet/resources/files/FileResource.class
./deployments/xnat/target/classes/org/nrg/xnat/turbine/modules/actions/QuickSearchAction.class
./plugin-resources/webapp/xnat/java/org/nrg/xdat/om/base/BaseXnatAbstractprotocol.java
./plugin-resources/webapp/xnat/java/org/nrg/xnat/restlet/resources/search/SearchFieldListResource.java
./plugin-resources/webapp/xnat/java/org/nrg/xnat/restlet/resources/files/XNATTemplate.java
./plugin-resources/webapp/xnat/java/org/nrg/xnat/restlet/resources/files/FileResource.java
./plugin-resources/webapp/xnat/java/org/nrg/xnat/restlet/resources/ProtocolResource.java
./plugin-resources/webapp/xnat/java/org/nrg/xnat/turbine/modules/actions/QuickSearchAction.java
./plugin-resources/webapp/xnat/scripts/subject/SubjectForm.js
./plugin-resources/project-skeletons/xnat/src/schemas/xnat/display/xnat_projectData_display.xml
./src/ManageProjectAccessories.java
./classes/ManageProjectAccessories.class
./release_notes.txt


That doesn't look very helpful, does it?

Thanks!

Torsten

Tim Olsen

unread,
Jul 9, 2013, 2:43:40 PM7/9/13
to xnat_di...@googlegroups.com

Torsten,

 

Do you see this exception when modifying the custom variables on other projects, or just this one?

 

Tim

--

Torsten Rohlfing

unread,
Jul 9, 2013, 3:38:19 PM7/9/13
to xnat_di...@googlegroups.com
Tim:

So with the caveat that I cannot establish whether this exception in the logs is actually the root cause of my problems...

I get the exact same behaviour on all of my projects (I have four). So this does not seem to be project-specific.

I can do some more experimenting around to see more specifically what provokes the error and what does not, but before I do - can you remind me how I can remove a set of custom variables, once created? (I don't necessarily want to be left with a dozen testing-only variable sets when I am done) :)

Thanks!

Torsten

Tim Olsen

unread,
Jul 9, 2013, 5:18:43 PM7/9/13
to xnat_di...@googlegroups.com

You should be able to delete the entries by unchecking the checkbox and saving the form.  Is that not working for you?

 

Tim

 

From: xnat_di...@googlegroups.com [mailto:xnat_di...@googlegroups.com] On Behalf Of Torsten Rohlfing
Sent: Tuesday, July 09, 2013 2:38 PM
To: xnat_di...@googlegroups.com
Subject: Re: [XNAT Discussion] Adding Custom Variables to MR Session gives "Failed to save modification"

 

Tim:

--

Torsten Rohlfing

unread,
Jul 9, 2013, 7:21:56 PM7/9/13
to xnat_di...@googlegroups.com
Well, I can make the group "disappear" from the project by unchecking the box and saving (although it took a few iterations of "Failed to save modification" before it really went away.

However, it still seems to be in the database - when I try to create a new group under the same name, I get a dialog window saying, "A group named 'Clinical' already exists with 3 field(s); datetocd (string), dateresponse (string), findings (string).  Would you like to use the pre-exising group in this project?"

Does that make sense?

Thanks!

TR

Tim Olsen

unread,
Jul 10, 2013, 1:15:05 PM7/10/13
to xnat_di...@googlegroups.com

Are you checking or unchecking the ‘Project specific’ checkbox?

Torsten Rohlfing

unread,
Jul 10, 2013, 5:02:30 PM7/10/13
to xnat_di...@googlegroups.com
The idea was to have the same variables in all my projects, so I unchecked that box.

In the meantime I have tried with and without checking it, but that doesn't seem to make any difference.

Other additional recent findings - I can add my new variables to the "default" group, and that works. I can also add them to an already-existing group that I created some weeks back and shared across my projects, and that works too.

The only thing that persistently does not work is to create a new group - or rather, I can /create/ the group, but then not add it to any projects, including the one I created it for.

When I have some more time tomorrow, I am going to try this with your VM distribution to see if it's my local config that's the problem.

Thanks!

Torsten

Torsten Rohlfing

unread,
Jul 11, 2013, 2:36:08 PM7/11/13
to xnat_di...@googlegroups.com
Okay, I figured it out, and I am afraid, this was a home-grown problem (sorry everyone!)

So my problems were a result of the patch I suggested here:

https://groups.google.com/d/msg/xnat_discussion/4OnJL1Q4fTo/9p6N6PwjIBMJ

This was to fix the problem where "hidden" fields appear in between custom variables in the XML response to a REST query and confused pyxnat.

Apparently the fix wasn't quite as benign as it first appears. Guess I will have to look into fixing pyxnat instead...

Again, thanks for everyone's help, and sorry for the confusion. (At least now we know that the aforementioned patch, at least by itself, is not a good idea.)

Torsten
Reply all
Reply to author
Forward
0 new messages