SiteConfigPreferences.java is one of the source files that goes into XNAT. You can find the most recent released version of this file at:
But you don’t really need to access that file to set the property: that’s just for reference. You can also accomplish a similar end by calling the siteConfig REST call (this requires an admin account):
$ http --session=admin server/xapi/siteConfig
This will output a large chunk of JSON that has all of the site configuration preferences and their values.
You can get the value for the archivePath alone with a similar call:
$ http --session=admin server/xapi/siteConfig/archivePath
HTTP/1.1 200
…
/data/xnat/archive
You can change that value by POSTing to the same URL with the value you want to set as the request body:
$ echo /data/xnat/foo | http --session=admin POST server/xapi/siteConfig/archivePath
HTTP/1.1 200 OK
…
$ http --session=admin server/xapi/siteConfig/archivePath
HTTP/1.1 200 OK
…
/data/xnat/foo
That said, if you already have data in your archive, the absolute path to that archive folder is stored in the database for every resource in your system. This can make it a bit tricky to just move your entire archive to another folder. The main tables that use this are the arc_pathinfo table, which points to the archive, prearchive, cache, and build folders for the site and each project in the system, and xnat_resource, which points to the catalogs or resources of every file stored in there. Your options would be to leave all of your existing data where it is and allow it to be continue to be referenced at that location, but then have all future data stored in your new archive folder, OR move everything to your new location and update the database to use, e.g., /data/xnat/foo in place of /data/xnat/bar. Whichever route you choose you’d need to make sure you test thoroughly on a non-production instance of XNAT!
This area is one of the things we’re focused on improving (replacing completely really) in the next major release of XNAT.
--
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 https://groups.google.com/group/xnat_discussion.
For more options, visit https://groups.google.com/d/optout.
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.
I suspected that it was rather complex as manipulation.
In fact, I managed to reinstall XNAT on a new virtual machine much larger than the previous one, but I could not login with admin as user and password. When I try, it searches and sends me back to the homepage. I have absolutely nothing in the logs that indicate a concern and I have also seen discussions about this topic but without success.
do you know what provleme could cause this ??
Thank you very much Rick !!
Justine
What version of XNAT is this happening on? There was a bug in 1.7.1 and 1.7.2 where this happened, but it was fixed in 1.7.3. Have a look at this issue report: there are a couple of ways that a redirect loop like this can happen and the comments describe ways to figure out (hopefully!) what’s causing the redirect you’re seeing.
--
Rick Herrick
Sr. Programmer/Analyst
Neuroinformatics Research Group
Washington University School of Medicine
Phone: +1 (314) 273-1645
--
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 https://groups.google.com/group/xnat_discussion.
For more options, visit https://groups.google.com/d/optout.
To unsubscribe from this group and stop receiving emails from it, send an email to xnat_discussion+unsubscribe@googlegroups.com.
To post to this group, send email to xnat_discussion@googlegroups.com.
Visit this group at https://groups.google.com/group/xnat_discussion.
For more options, visit https://groups.google.com/d/optout.
I believe you just want to create a prefs-override.ini file. It should not require a plugin. See:
https://groups.google.com/d/msg/xnat_discussion/kwEk_eiXN5g/EwgguBbMAQAJ
However, we do not make it easy to change the archive path in the UI because of all the problems that can result from this. You will likely need to make a lot of manual database changes to resolve those issues. Rick's earlier post had a little more information:
"That said, if you already have data in your archive, the absolute path to that archive folder is stored in the database for every resource in your system. This can make it a bit tricky to just move your entire archive to another folder. The main tables that use this are the arc_pathinfo table, which points to the archive, prearchive, cache, and build folders for the site and each project in the system, and xnat_resource, which points to the catalogs or resources of every file stored in there. Your options would be to leave all of your existing data where it is and allow it to be continue to be referenced at that location, but then have all future data stored in your new archive folder, OR move everything to your new location and update the database to use, e.g., /data/xnat/foo in place of /data/xnat/bar. Whichever route you choose you’d need to make sure you test thoroughly on a non-production instance of XNAT!"
-Mike
I believe you just want to create a prefs-override.ini file. It should not require a plugin. See:
https://groups.google.com/d/msg/xnat_discussion/kwEk_eiXN5g/EwgguBbMAQAJ
However, we do not make it easy to change the archive path in the UI because of all the problems that can result from this. You will likely need to make a lot of manual database changes to resolve those issues. Rick's earlier post had a little more information:
"That said, if you already have data in your archive, the absolute path to that archive folder is stored in the database for every resource in your system. This can make it a bit tricky to just move your entire archive to another folder. The main tables that use this are the arc_pathinfo table, which points to the archive, prearchive, cache, and build folders for the site and each project in the system, and xnat_resource, which points to the catalogs or resources of every file stored in there. Your options would be to leave all of your existing data where it is and allow it to be continue to be referenced at that location, but then have all future data stored in your new archive folder, OR move everything to your new location and update the database to use, e.g., /data/xnat/foo in place of /data/xnat/bar. Whichever route you choose you’d need to make sure you test thoroughly on a non-production instance of XNAT!"
-Mike
From: xnat_di...@googlegroups.com <xnat_di...@googlegroups.com> on behalf of Angel Kennedy <angel....@gmail.com>
To unsubscribe from this group and stop receiving emails from it, send an email to xnat_di...@googlegroups.com.
To view this discussion on the web visit https://groups.google.com/d/msgid/xnat_discussion/d869389b-f5a2-4585-a248-1640b81bf223%40googlegroups.com.
I didn't see any "[siteConfig]" line in your examples. Did you by chance leave off the section name? I could see that potentially leading to the issues you're encountering. I'm hoping that with that change and a fresh database everything would work the way you want.
-Mike
Also, the location you put the file should be correct.
And if you're referring to the "$ http --session=admin --pretty=format –body https://xnatdev.xnat.org/xapi/prefs/ini" line from Rick's comment, that was to get the prefs, not set them.
If you haven't already played around with it, I recommend checking out Swagger (available at YOUR_SITE/xapi/swagger-ui.html or from the link you can get to via Administer-> Site Administration -> Miscellaneous-> Development Utilities). The Site Config Api section allows you to do preference REST calls in a much more intuitive way (and even converts your REST call into a curl command in case you later want to do it outside of Swagger). Swagger can be very handy for working with an XNAT, though I would still recommend going the fresh database and prefs-override route in this case.
-Mike
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 https://groups.google.com/group/xnat_discussion.
For more options, visit https://groups.google.com/d/optout.
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.
--
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_di...@googlegroups.com.
To view this discussion on the web visit https://groups.google.com/d/msgid/xnat_discussion/d869389b-f5a2-4585-a248-1640b81bf223%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.
--
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 on the web visit https://groups.google.com/d/msgid/xnat_discussion/b3a5abbf-2f30-41c0-b117-c083802847f9%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.
--
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.