Newbie question: XDC

20 views
Skip to first unread message

Usman Bashir

unread,
Jun 1, 2023, 10:57:46 AM6/1/23
to xnat_discussion
Hi I have just installed xnat.
I am trying to learn REST API with the XDC, but I cannot find where its installed! The website says a copy ships with xnat. a 'lib' folder is mentioned containing the jar file. There is no lib folder in my webapps/xnat folder. Will appreciate help wit this.

Usman.


Usman Bashir

unread,
Jun 1, 2023, 11:21:04 AM6/1/23
to xnat_di...@googlegroups.com
I just installed the pipeline engine. Now I am hit with an error message when I try to run XnatDataClient:

java errror Exception in thread "main" java.lang.NoClassDefFoundError: org/apache/commons/text/WordUtils at org.nrg.framework.pinto.AbstractPintoBean.displayHelp(AbstractPintoBean.java:203) at org.nrg.framework.pinto.AbstractPintoBean.noArgsHelp(AbstractPintoBean.java:359) at org.nrg.xnat.client.data.XnatDataClientPintoBean.validate(XnatDataClientPintoBean.java:657) at org.nrg.framework.pinto.AbstractPintoBean.<init>(AbstractPintoBean.java:69) at org.nrg.framework.pinto.AbstractPintoBean.<init>(AbstractPintoBean.java:39) at org.nrg.xnat.client.data.XnatDataClientPintoBean.<init>(XnatDataClientPintoBean.java:31) at org.nrg.xnat.client.data.XnatDataClient.<init>(XnatDataClient.java:116) at org.nrg.xnat.client.data.XnatDataClient.main(XnatDataClient.java:89) Caused by: java.lang.ClassNotFoundException: org.apache.commons.text.WordUtils at java.net.URLClassLoader.findClass(URLClassLoader.java:387) at java.lang.ClassLoader.loadClass(ClassLoader.java:418) at sun.misc.Launcher$AppClassLoader.loadClass(Launcher.java:352) at java.lang.ClassLoader.loadClass(ClassLoader.java:351)

Anyone help with this?

Thanks.

--
You received this message because you are subscribed to a topic in the Google Groups "xnat_discussion" group.
To unsubscribe from this topic, visit https://groups.google.com/d/topic/xnat_discussion/1YWEwpVuZfQ/unsubscribe.
To unsubscribe from this group and all its topics, send an email to xnat_discussi...@googlegroups.com.
To view this discussion on the web visit https://groups.google.com/d/msgid/xnat_discussion/7f68247a-d8b5-4216-bb0c-701ffeaf35f0n%40googlegroups.com.

Rick Herrick

unread,
Jun 1, 2023, 11:36:51 AM6/1/23
to xnat_di...@googlegroups.com
Hi Usman,

The XNAT pipeline engine is actually deprecated. I’d recommend using a tool for working with the XNAT REST API besides XnatDataClient like, e.g.:
  • curl: widely available on just about every platform
  • httpie: what I use 95% of the time for scripting REST calls
  • Postman: full featured app and web-based tool
You may also check out the Swagger page on XNAT itself. In XNAT, go to Administer -> Site Administration, then click Miscellaneous at the bottom of the left-side nav bar. At the very bottom of the page, you’ll see a section labeled Development Utilities. Click View the Swagger page.

The caveat is that only some of XNAT’s REST APIs–the newer ones–are available on the Swagger page.

Rick Herrick
Senior Software Developer


------ Original Message ------
From "Usman Bashir" <drusma...@gmail.com>
Date 6/1/23, 10:20:49 AM
Subject Re: [XNAT Discussion] Newbie question: XDC

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/CAH%2B68Q-2b7km0EAQjMNF3BcDoTuf7e7Qkqgkazj%3D50XB9VQg5Q%40mail.gmail.com.

Rick Herrick

unread,
Jun 1, 2023, 11:46:25 AM6/1/23
to xnat_di...@googlegroups.com
I meant to add: it looks like the problem with XnatDataClient is that there’s a library missing from the script template. You can edit the XnatDataClient script in xnat-tools to fix this. You’ll see a line like this:

java -classpath “/path/to/pipeline"/lib/activation-1.1.1.jar:…

Just copy one entry in that class path, modify the file name to commons-text-1.9.jar, and save the script. XDC should work properly now.

But you should still use one of the other alternatives!

Rick Herrick
Senior Software Developer


------ Original Message ------
From "Rick Herrick" <rickh...@flywheel.io>
Date 6/1/23, 10:36:48 AM
Subject Re[2]: [XNAT Discussion] Newbie question: XDC

Usman Bashir

unread,
Jun 1, 2023, 1:45:18 PM6/1/23
to xnat_discussion
Thanks, I am using httpie

Usman
Reply all
Reply to author
Forward
0 new messages