As far as Debian 9, I haven’t tried it but I doubt that the OS itself would be a limiting factor. The dependencies could be an issue however.
Java 9 is probably a blocker. There’s a big change in how Java 9 packages and runs code that can cause existing code to fail on start-up. We haven’t had a chance to look into this at all, since Java 9 support is not widespread yet. That said, I just stood up a Debian 9 VM and the only JDK I see on there through the apt repos is Java 8. Just do “sudo apt install openjdk-8-jdk” and you should be good.
As far as Tomcat, we’ve only tested on Tomcat 7, but I have gotten XNAT working on Tomcat 8. There’s a change you need to make to the war file, which is changing the context definition file to handle changes in Tomcat itself. To do this, download or copy the XNAT war to a folder somewhere. In that folder, make a new directory named META-INF. Create a new file in the META-INF folder named context.xml with the following contents:
<?xml version="1.0" encoding="utf-8"?>
<Context>
<Resources>
<PostResources className="org.apache.catalina.webresources.DirResourceSet" base="${xnat.home}/plugins" webAppMount="/WEB-INF/lib" />
</Resources>
<JarScanner scanAllDirectories="true" />
<Parameter name="xnatHome" value="${xnat.home}"/>
<CookieProcessor className="org.apache.tomcat.util.http.LegacyCookieProcessor" />
<Manager pathname="" />
</Context>
Then, in the same folder as the war file, run the following command (this presumes you’ve installed the JDK):
$ jar uf xnat-web-xxx.war META-INF/context.xml
Now you can copy that war file into the webapps folder and start Tomcat up. Presuming other prerequisites are met (required folders created, config file set up correctly, etc.), you should get a working XNAT.
The big caveat here is that we haven’t done anything more than casual validation that this works, so you’d want to test it a good bit before using it with real research data.
It’s also worth noting that neither Tomcat 7 nor Java 8 are “old, unsupported versions”. There is no official EOS/EOL date for Tomcat 7, although guesstimates on the Tomcat developers list put it sometime in 2020. The EOS/EOL for Java 8 is very confusing, since the Oracle page on this seems to indicate that Java 8 will actually be supported longer than Java 9, 1/2019 or 12/2020 for Java 8 vs 3/2018 (!) for Java 9 (this is because Java 9 is the last of the “Java X” releases, after which they’re transitioning to a year-update version model, starting with 18.3. In fact, Debian 9 basically EOL’s around the same time as Java 8 and Tomcat 7 so…
--
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.
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.
One note on this: the Tomcat 8 install on Debian 9 is kind of a disaster. You’ll get a bunch of errors just on start-up of the default configuration. Two things you can do to fix these:
Run “sudo apt install libservlet3.1-java”. Tomcat tries access libraries that aren’t installed by default and pitches a fit if it can’t find them. Those libraries are in libservlet3.1-java and that’ll shut it up.
Run a script like this (do this as root):
mkdir -p /usr/share/tomcat8/common/classes
mkdir -p /usr/share/tomcat8/server/classes
mkdir -p /usr/share/tomcat8/shared/classes
ln -s /usr/share/tomcat8/common /var/lib/tomcat8/common
ln -s /usr/share/tomcat8/server /var/lib/tomcat8/server
ln -s /usr/share/tomcat8/shared /var/lib/tomcat8/shared
chown -R xnat.xnat /usr/share/tomcat8 /var/lib/tomcat8
chown -RH xnat.xnat /usr/share/tomcat8 /var/lib/tomcat8
That’ll get rid of a bunch of other annoying error messages as well.
--
Rick Herrick
Sr. Programmer/Analyst
Neuroinformatics Research Group
Washington University School of Medicine
Phone: +1 (314) 273-1645
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 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.
jar uf xnat-web-1.7.4.1.war META-INF/context.xml
java.util.zip.ZipException: duplicate entry: WEB-INF/lib/axis-ant-1.4.jar
at java.util.zip.ZipOutputStream.putNextEntry(ZipOutputStream.java:232)
at java.util.jar.JarOutputStream.putNextEntry(JarOutputStream.java:109)
at sun.tools.jar.Main.update(Main.java:635)
at sun.tools.jar.Main.run(Main.java:271)
at sun.tools.jar.Main.main(Main.java:1288)
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.
Ah, that’s caused by some issue that occurred in the build where somehow that jar file got included in the war file twice. I have no idea how that happened, but it might have been a gradle bug because I saw it happen with a few other builds, but it hasn’t occurred (at least that I’ve noticed) recently. The fix is pretty easy:
$ jar xf xnat-web-1.7.4.1.war WEB-INF/lib/axis-ant-1.4.jar META-INF/context.xml
$ zip -d xnat-web-1.7.4.1.war WEB-INF/lib/axis-ant-1.4.jar META-INF/context.xml
deleting: WEB-INF/lib/axis-ant-1.4.jar
deleting: META-INF/context.xml
A weird thing is that, if you have WEB-INF/lib/axis-ant-1.4.jar in your current folder when you run this command, zip will only delete a single entry for WEB-INF/lib/axis-ant-1.4.jar, leaving one of the duplicate entries in there. If you DON’T have that in there, it will delete both. It doesn’t seem to matter, as the jar update a couple steps later replaces that remaining entry so you don’t have the double-entry error. But it’s weird.
$ jar uf xnat-web-1.7.4.1.war META-INF WEB-INF
$ jar tf xnat-web-1.7.4.1.war | grep -e "\(axis-ant\|context\)"
WEB-INF/lib/spring-context-support-4.3.10.RELEASE.jar
WEB-INF/lib/spring-context-4.3.10.RELEASE.jar
WEB-INF/lib/axis-ant-1.4.jar
WEB-INF/conf/mq-context.xml
META-INF/context.xml
Note the single entry for axis-ant-1.4.jar, so that’s good. You can verify the change to context.xml by changing “tf” to “tvf”, which will give you an “ls -l” like display of the archive contents so you can compare file size.
Deploy that war and you should be good to run under Tomcat 8 (with the previously mentioned caveats!).
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_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.
Very cool! Please let us know if you run into any issues with Tomcat 8, since we will need to support that going forward but haven’t had the time to devote to fully testing running there yet.
--
Rick Herrick
Sr. Programmer/Analyst
Neuroinformatics Research Group
Washington University School of Medicine
Phone: +1 (314) 273-1645
From: "xnat_di...@googlegroups.com" <xnat_di...@googlegroups.com> on behalf of "Jérome R." <red...@cermep.fr>
Reply-To: "xnat_di...@googlegroups.com" <xnat_di...@googlegroups.com>
Date: Wednesday, March 14, 2018 at 8:49 AM
To: "xnat_di...@googlegroups.com" <xnat_di...@googlegroups.com>
--
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
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.
Yes, the XNAT Vagrant VM configuration runs on openjdk-8-jdk, as does my dev server. I haven’t seen any issues at all.
--
Rick Herrick
Sr. Programmer/Analyst
Neuroinformatics Research Group
Washington University School of Medicine
Phone: +1 (314) 273-1645
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_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.
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 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.