Skip to Content.
Sympa Menu

grouper-users - Re: [grouper-users] Fwd: GROUPER_HOME clarfication and gsh.groovy not finding loaderRunOneJob(jobname);

Subject: Grouper Users - Open Discussion List

List archive

Re: [grouper-users] Fwd: GROUPER_HOME clarfication and gsh.groovy not finding loaderRunOneJob(jobname);

Chronological Thread 
  • From: "Waldbieser, Carl" <>
  • To: Jeffrey Williams <>
  • Cc:
  • Subject: Re: [grouper-users] Fwd: GROUPER_HOME clarfication and gsh.groovy not finding loaderRunOneJob(jobname);
  • Date: Mon, 10 Jul 2017 09:32:44 -0400 (EDT)
  • Ironport-phdr: 9a23:TAjIOxbFHORO5pJcKefPUv//LSx+4OfEezUN459isYplN5qZpcy/bnLW6fgltlLVR4KTs6sC0LWG9f24EUU7or+/81k6OKRWUBEEjchE1ycBO+WiTXPBEfjxciYhF95DXlI2t1uyMExSBdqsLwaK+i76xXcoFx7+LQt4IPjuUs6X1pzvlrP6x5qGQQhGiiCwcPtNLRGyrAzUrYFCg4V9K6I1yxLhv31DdKJbyX4+dnyJmBOprPi5+JJp8ilLtuhlv+VJS6GwN/AnRLhUBjUrOEgx7cPipBTfUQbJ63cBBDZF2iFUChTIuUmpFqz6tTH3468kgHGX


I'm no groovy expert, but in the jython shell, there are certain names that
are placed in the global namespace automatically, and others that need to be
imported (and possibly qualified depending on how the name is imported). I
expect the groovy shell has similar mechanisms in principal. The way these
shells work is to use the existing REPL, import some Internet2 Grouper
modules, and optionally import some wrapper convenience functions.

For example, in the jython Grouper shell wrapper, I need to execute the
following code:

# First, import `GrouperLoader` into the global namespace
from import GrouperLoader
# Next, call the static method on the class.
GrouperLoader.runJobOnceForGroup(session, group)

Carl Waldbieser
ITS Systems Programmer
Lafayette College

----- Original Message -----
From: "Jeffrey Williams"

Sent: Monday, July 10, 2017 9:08:51 AM
Subject: [grouper-users] Fwd: GROUPER_HOME clarfication and gsh.groovy not
finding loaderRunOneJob(jobname);

Hi All,

Would anyone know what would make loaderRunOneJob available in gsh, but not
in gsh.groovy?

A little background:

I've been working on updating our 2.2.0 environment with the TIER Grouper
2.3.0 container using the April 2017 TIER Grouper Deployment Guide and ran
into an issue setting up groovygsh4grouper. It seemed straightforward, but
I ran into a discrepancy in how GROUPER_HOME should be defined. While not
explicit in the guide, it seems that the author wants it to be set to:

export GROUPER_HOME = /opt/grouper/X.Y.Z

However, when I run the following, I receive this error:

The GROUPER_HOME environment variable is not defined correctly
or could not be determined
This script must be located in <GROUPER_HOME> or <GROUPER_HOME>/bin

That looks like it's expecting GROUPER_HOME to be set to something more

export GROUPER_HOME = /opt/grouper/X.Y.Z/grouper.apiBinary-X.Y-Z

...and when I do that and adjust my commands accordingly, gsh.groovy starts
with seemingly no issue and runs the test commands in the guide handily. I
did the following symlinks in the hopes it'll make config porting over
upgrades less manual:

bash-4.2# ls -all /opt/grouper
total 4
drwxr-xr-x. 3 root root 45 Jun 23 21:05 .
drwxr-xr-x. 10 root root 119 May 18 15:14 ..
drwxr-xr-x. 13 root root 4096 Jun 23 21:08 2.3.0
lrwxrwxrwx. 1 root root 31 Jun 23 21:05 home ->
lrwxrwxrwx. 1 root root 5 Jun 23 19:52 latest -> 2.3.0

export GROUPER_HOME = /opt/grouper/home

I didn't see a setting in bin/.groovy/groovysh.profile to adjust its
expectations on how GROUPER_HOME is defined to put it more in line with the

Recently, I wanted to test a loader job using gsh.groovy and received the

#also, the steps for testing the new loader job using gsh.groovy left out
the initial startRootSession(); Probably second nature to those more
familiar with gsh, but for a first-timer, it sent me to the main docs to
see what I was missing
*groovy:000> grouperSession = GrouperSession.startRootSession();*
===> 38319284921b4c508e939fcf43d24ca4,'GrouperSystem','application'
groovy:000> job = GroupFinder.findByName(grouperSession,
===> Group[name=loader:thisLoaderGroupName,uuid=9195e687db2048ef8
groovy:000> lo
long log
groovy:000> loaderRunOneJob(job);
ERROR groovy.lang.MissingMethodException:
No signature of method: groovysh_evaluate.loaderRunOneJob() is applicable
for argument types: (edu.internet2.middleware.grouper.Group) values:

I can drop into classic gsh and was able to run the loader to completion:

gsh 0% grouperSession = GrouperSession.startRootSession();
gsh 1% job = GroupFinder.findByName(grouperSession,
group: name='loader:thisLoaderGroupName'
gsh 4% loaderRunOneJob(job);


loader ran with subject problems, inserted 1 memberships, deleted 0
memberships, total membership count: 5325, unresolvable subjects: 3734

I'm sure if how I've set GROUPER_HOME has impacted loader commands in
gsh.groovy or not. Does anyone have any insight into what I may be running
into here?


Jeffrey Williams, SQL Server 2012 MCSA, Windows Server 2012 MCSA
Identity Management Specialist
Identity Architecture, ITS
University of North Carolina at Greensboro
256-TECH (256-8324)

Archive powered by MHonArc 2.6.19.

Top of Page