Skip to Content.
Sympa Menu

grouper-users - RE: [grouper-users] gsh addSubject issues v2.4.0

Subject: Grouper Users - Open Discussion List

List archive

RE: [grouper-users] gsh addSubject issues v2.4.0

Chronological Thread 
  • From: "Hyzer, Chris" <>
  • To: "Hyzer, Chris" <>, "O'Dowd, Josh" <>, Shilen Patel <>
  • Cc: "" <>
  • Subject: RE: [grouper-users] gsh addSubject issues v2.4.0
  • Date: Thu, 4 Apr 2019 16:11:23 +0000

There is now a helpful error message if you use registry subjects without the
source mapped. There are also more methods to create/edit/delete/manage

grouperSession = GrouperSession.startRootSession();
RegistrySubject.addOrUpdate(grouperSession, "someTestSubject", "person",
"Some Testsubject", "Name Some Test Subject", "stsub", "Some Testsubject -
employee - also alumni", "");
registrySubject = RegistrySubject.find("someTestSubject", false);



-----Original Message-----
<> On Behalf Of Hyzer, Chris
Sent: Monday, March 25, 2019 11:11 PM
To: O'Dowd, Josh <>; Shilen Patel <>
Subject: RE: [grouper-users] gsh addSubject issues v2.4.0

Do you have the jdbc subject source listed in or
sources.xml? If you don't have that they cant be found. We should address
this in grouper so that addSubject doesn't work if the subject source isn't
there and throws a descriptive message?

-----Original Message-----
<> On Behalf Of O'Dowd, Josh
Sent: Monday, March 25, 2019 6:22 PM
To: Shilen Patel <>
Subject: RE: [grouper-users] gsh addSubject issues v2.4.0

Yes, that part is working, however if I then do findSubject("someApp"), I
get a subjectNotFound error. If I try to re-add the subject, using
addSubject(principal, "application", principal), I get a subject
"someApp/applicaiton/someApp" already exists!.
if I then do findSubject("someApp/application/someApp"), I once again get
subjectNotFound error. Very confusing?


[] on behalf of Shilen Patel
Sent: Monday, March 25, 2019 1:52 PM
To: O'Dowd, Josh
Subject: Re: [grouper-users] gsh addSubject issues v2.4.0

Is this what and how you're running it? (This worked for me.)

groovy:000> String principal = "someApp";
===> someApp
groovy:000> String email = null;
===> null
groovy:000> GrouperSession grouperSession = GrouperSession.startRootSession();
===> ed3f25816f4c4383b4af07aa878851a9,'GrouperSystem','application'
groovy:000> addSubject(principal, "application", principal);
===> Subject id: someApp, sourceId: null, name: someApp

- Shilen

On 3/25/19, 1:57 PM, " on behalf of
O'Dowd, Josh" < on behalf of
> wrote:


I am attempting to follow the docs at the wiki page,
, and following the "add a subject application principal with attributes
(GSH)" example on that page.

When running the example gsh, I am getting the error:
org.codehaus.groovy.control.MultipleCompilationErrorsException: startup
groovysh_parse: 2: unexpected token: principal @ line 2, column 171.
til.toListObject(new Object[]{principal,

My intent is to create an "application" type subject with a login id,
without having to add maintain a record in the main subject source, which is
LDAP directory. Then I want to privilege that subject with access to an
application group/folder area so that the subject can be authenticated via
GrouperClient into grouper-ws.

Any advice on the error, or how to go about it differently is much


Josh O'Dowd
University of Montana

  • RE: [grouper-users] gsh addSubject issues v2.4.0, Hyzer, Chris, 04/04/2019

Archive powered by MHonArc 2.6.19.

Top of Page