Uploaded image for project: 'Grouper'
  1. Grouper
  2. GRP-5351

Keep a reference to the current session so it doesnt disappear

    XMLWordPrintable

Details

    • Improvement
    • Resolution: Fixed
    • Minor
    • 4.11.2, 5.8.5
    • None
    • None
    • None

    Description

      Shilen Patel
      11:24 AM
      This is probably expected but I think the weak reference change makes it so that if you're using gsh and start a session and not saving it to a variable, it'll get cleaned up (or whatever happens to it). I had to keep creating sessions until I realized that saving the session to a variable stops the issue. Anyways, in case anyone else runs into this..
      groovy:000> GrouperSession.startRootSession()
      ===> 1d373ef43c35463fbde1d5d308a0b6f4,'GrouperSystem','application'
      groovy:000> addMember("test:left", "test.subject.8")
      ===> true
      groovy:000> addMember("test:left", "test.subject.8")
      ERROR java.lang.IllegalStateException:
      There is no open GrouperSession detected. Make sure to start a grouper session (e.g. GrouperSession.startRootSession() if you want to use a root session ) before calling this method
      at edu.internet2.middleware.grouper.GrouperSession.staticGrouperSession (GrouperSession.java:1229)
      at edu.internet2.middleware.grouper.GrouperSession.staticGrouperSession (GrouperSession.java:1179)
      at edu.internet2.middleware.grouper.GrouperSession$staticGrouperSession$0.call (Unknown Source)
      at groovysh_evaluate.addMember (groovysh_evaluate:4)
      at groovysh_evaluate.addMember (groovysh_evaluate:3)
      at jdk.internal.reflect.NativeMethodAccessorImpl.invoke0 (Native Method)
      at jdk.internal.reflect.NativeMethodAccessorImpl.invoke (NativeMethodAccessorImpl.java:77)
      at jdk.internal.reflect.DelegatingMethodAccessorImpl.invoke (DelegatingMethodAccessorImpl.java:43)

      Attachments

        Activity

          People

            chris.hyzer@at.internet2.edu Chris Hyzer (upenn.edu)
            chris.hyzer@at.internet2.edu Chris Hyzer (upenn.edu)
            Votes:
            0 Vote for this issue
            Watchers:
            1 Start watching this issue

            Dates

              Created:
              Updated:
              Resolved: