Unresolved Issue with PopulateXnat - Error with OptionAccessor Class

55 views
Skip to first unread message

Vincent Finnerty

unread,
Aug 7, 2023, 10:54:46 AM8/7/23
to xnat_discussion
Hello Everyone,

I am currently progressing through the Administration 101 Course for XNAT, and I've come across an issue while trying to execute PopulateXnat. I managed to resolve one part of the problem, but the other part remains unsolved, and I'm hoping to find some guidance or suggestions on how to proceed.

When I initially attempted to run the command (with the actual username and password):
"groovy PopulateXnat.groovy -u username -p password -s https://sgbmxnat01/ -d Fruit_Struct"
I received the following error messages:

 ./PopulateXnat.groovy: 26: unable to resolve class CliBuilder @ line 26, column 18. final CliBuilder cli = new CliBuilder
 ./PopulateXnat.groovy: 55: unable to resolve class OptionAccessor @ line 55, column 22. final OptionAccessor params = cli.parse(args)
To resolve the first error, I added "import groovy.cli.commons.CliBuilder" to PopulateXnat.groovy, and the issue with the CliBuilder class was fixed. However, the second error remains, and I'm still seeing the message: ./PopulateXnat.groovy: 55: unable to resolve class OptionAccessor @ line 55, column 22. final OptionAccessor params = cli.parse(args).

I'm unsure of how to proceed in fixing this issue. I'm uncertain whether this problem is due to a missing step or a technical issue that I've been unable to pinpoint. I tried to search this forum and the internet for similar problems without any success.

I would greatly appreciate any guidance or resources to help resolve this.

Thank you in advance for your support.

Best Regards,
Vincent F.

Rick Herrick

unread,
Aug 7, 2023, 10:58:48 AM8/7/23
to xnat_di...@googlegroups.com
I think you’re using Groovy 4.x, but PopulateXnat requires 3.x. They repackaged a lot of the CLI option library between 3.x and 4.x (amongst a number of other things). Try installing the latest Groovy 3.x, currently at 3.0.18 for me.

Rick Herrick
Senior Software Developer


------ Original Message ------
From "Vincent Finnerty" <vincent....@gmail.com>
To "xnat_discussion" <xnat_di...@googlegroups.com>
Date 8/7/23, 9:41:35 AM
Subject [XNAT Discussion] Unresolved Issue with PopulateXnat - Error with OptionAccessor Class

--
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/a4efb935-f146-49de-a0c4-0f93855833a3n%40googlegroups.com.

Vincent Finnerty

unread,
Aug 7, 2023, 2:02:39 PM8/7/23
to xnat_discussion
Thank you for your help! I installed Groovy  3.0.18 and this fixed my issue!

Vincent F.
Reply all
Reply to author
Forward
0 new messages