Skip to Content.
Sympa Menu

grouper-users - Re: [grouper-users] no open GrouperSession detected from gsh

Subject: Grouper Users - Open Discussion List

List archive

Re: [grouper-users] no open GrouperSession detected from gsh

Chronological Thread 
  • From: Shilen Patel <>
  • To: Chris Hyzer <>, Colin Hudler <>
  • Cc: "" <>
  • Subject: Re: [grouper-users] no open GrouperSession detected from gsh
  • Date: Mon, 30 Jan 2012 13:49:51 +0000
  • Accept-language: en-US

Right, creating a session before calling FindBadMemberships.main() should
avoid the issue. This should have been fixed in 2.0, but may not have
made it in the 1.6 branch.


-- Shilen

On 1/26/12 11:45 AM, "Chris Hyzer"

>Maybe Shilen could respond in more detail, but a workaround could be to
>make a file called badMemberships.gsh with these two lines:
>FindBadMemberships.main(new String[]{"-all"});
>And then run: badMemberships.gsh
>Now sure about why daily report is failing...
>-----Original Message-----
> On Behalf Of Colin Hudler
>Sent: Thursday, January 26, 2012 11:31 AM
>Subject: [grouper-users] no open GrouperSession detected from gsh
>Grouper 1.6.3. When I run -findbadmemberships -all, it always says:
>"Checking Composite Memberships
><..after a few minutes..>
>There is no open GrouperSession detected. Make sure to start a grouper
>session (e.g. GrouperSession.start() ) before calling this method"
>Then it exits.
>I've hit a dead end debugging it. I can see that the callstack at the
>point it dies:
> GrouperSession.staticGrouperSession(boolean) line: 755
> GrouperSession.staticGrouperSession() line: 724
> Composite._getGroup(String) line: 287
> Composite.getOwnerGroup() line: 180
> FindBadMemberships.foundError(Composite) line: 264
> FindBadMemberships.checkComposites() line: 169
> FindBadMemberships.checkAll(PrintStream) line: 150
> FindBadMemberships.main(String[]) line: 114
> NativeMethodAccessorImpl.invoke0(Method, Object, Object[]) line:
>not available [native method]
> NativeMethodAccessorImpl.invoke(Object, Object[]) line: 39
> DelegatingMethodAccessorImpl.invoke(Object, Object[]) line: 25
> Method.invoke(Object, Object...) line: 597
> GrouperShell.handleSpecialCase(String[]) line: 188
> GrouperShell.main(String[]) line: 128
> GrouperShellWrapper.main(String[]) line: 16
>The last call into staticGrouperSession() comes from
>FindBadMemberships.foundError(), when it apparently triggers a
>permissions check. However, I know there's a grouper session, right?
>Could it get this far without one? Debugging shows multiple successful
>uses of staticGrouperSession() during initialization, even with
>exceptionOnNull == true.
>Debugging reveals that GrouperSession grouperSession =
>staticGrouperSession.get() is indeed null, but only when it was called
>from FindBadMemberships.foundError(), rather than (say) various calls
>through GrouperCheckConfig.
>The problem also appears in the shell if I invoke
>FindBadMemberships.checkAll(System.out) without at least storing a
>grouper session in some variable. Unfortunately, I can't work around it
>always, I suspect this is also killing our loader grouper reports.
>Any ideas?

Archive powered by MHonArc 2.6.16.

Top of Page