Skip to Content.
Sympa Menu

grouper-users - RE: [grouper-users] testing sources.xml in Grouper 2.1.0 API

Subject: Grouper Users - Open Discussion List

List archive

RE: [grouper-users] testing sources.xml in Grouper 2.1.0 API


Chronological Thread 
  • From: Chris Hyzer <>
  • To: Tom Zeller <>, Scott Koranda <>
  • Cc: grouper-users <>
  • Subject: RE: [grouper-users] testing sources.xml in Grouper 2.1.0 API
  • Date: Tue, 3 Apr 2012 12:58:04 +0000
  • Accept-language: en-US

I added and tested these methods in 2.1.1

https://bugs.internet2.edu/jira/browse/GRP-766

You can call these without a grouper session open, it will find the subject
as root.:

The optional boolean is if you want this grouper session added to the grouper
session thread local. Generally the answer will be yes, which is the default
if it is not specified. These return the GrouperSession object. If the
sourceId is null it will search all sources.

GrouperSession.startBySubjectIdAndSource(subjectId, sourceId)
GrouperSession.startBySubjectIdAndSource(subjectId, sourceId, boolean)
GrouperSession.startBySubjectIdentifierAndSource(subjectIdentifier, sourceId)
GrouperSession.startBySubjectIdentifierAndSource(subjectIdentifier, sourceId,
boolean)


Thanks,
chris

________________________________________
From:


[]
on behalf of Tom Zeller
[]
Sent: Tuesday, March 27, 2012 3:39 PM
To: Scott Koranda
Cc: grouper-users
Subject: Re: [grouper-users] testing sources.xml in Grouper 2.1.0 API

Instead of

GrouperSession.start();

try

GrouperSession.startRootSession();

On Tue, Mar 27, 2012 at 2:03 PM, Scott Koranda
<>
wrote:
> Hi,
>
> I am attempting to deploy version 2.1.0 of the Grouper API.
>
> In the past when I have deployed the API and I want to test my
> sources.xml to make sure everything is working I use gsh and
> run
>
> gsh 1%
> findSubject("")
>
> With version 2.1.0 I am seeing this:
>
> gsh 1%
> findSubject("")
> // Error: unable to evaluate command: Sourced file: inline
> // evaluation of:
> ``findSubject("");''
> :
> // Error invoking compiled command: : Error in compiled
> // command: java.lang.IllegalStateException: There is no open
> // GrouperSession detected. Make sure to start a grouper
> // session (e.g. GrouperSession.start() ) before calling this
> // method
>
> So following the advice of that error message I continued but
> I see this:
>
> gsh 2% GrouperSession.start()
> // Error: unable to evaluate command: Sourced file: inline
> // evaluation of: ``GrouperSession.start();'' : Error in
> // method invocation: Static method start() not found in
> // class'edu.internet2.middleware.grouper.GrouperSession'
>
> I looked at
>
> https://spaces.internet2.edu/display/Grouper/GrouperShell+%28gsh%29
>
> but I don't see anything updated to indicate that
> findSubject() should not work.
>
> What have I done wrong?
>
> Thanks,
>
> Scott


  • RE: [grouper-users] testing sources.xml in Grouper 2.1.0 API, Chris Hyzer, 04/03/2012

Archive powered by MHonArc 2.6.16.

Top of Page