groovy gsh NPE

XMLWordPrintable

    • Type: Bug
    • Resolution: Unresolved
    • Priority: Minor
    • None
    • Affects Version/s: None
    • Component/s: gsh
    • None
    • Environment:

      After upgrading to grouper-2.4 from grouper-2.3 groovy gsh is stuck with:

       

      $ sudo rlwrap ./bin/gsh.sh
      Detected Grouper directory structure 'api' (valid is api or webapp)
      Using GROUPER_HOME: /opt/grouper.apiBinary-2.2.2
      Using GROUPER_CONF: /opt/grouper.apiBinary-2.2.2/conf
      Using JAVA: java
      Using CLASSPATH: /opt/grouper.apiBinary-2.2.2/conf:/opt/grouper.apiBinary-2.2.2/dist/lib/grouper.jar:/opt/grouper.apiBinary-2.2.2/lib/grouper/*:/opt/grouper.apiBinary-2.2.2/lib/custom/*:/opt/grouper.apiBinary-2.2.2/lib/jdbcSamples/*:/opt/grouper.apiBinary-2.2.2/lib/ant/*:/opt/grouper.apiBinary-2.2.2/lib/test/*:/opt/grouper.apiBinary-2.2.2/dist/lib/test/*:/opt/grouper.apiBinary-2.2.2/src/resources
      using MEMORY: 64m-750m
      Grouper starting up: version: 2.4.0, build date: 2018/08/23 07:48:38, env: <no label configured>
      grouperPatchStatus read from: /opt/grouper.apiBinary-2.2.2/grouperPatchStatus.properties
      api patches installed: 0, 1, 2, 3, 4, 5, 6, 7, 8, 9, 10, 11, 12, 13, 14, 15, 16, 17, 18, 19, 20, 21, 22, 23, 24, 25, 26, 27, 28, 29, 30, 31, 32, 33, 34, 35, 36, 37, 38, 39, 40, 41, 42, 43, 44, 45, 46, 47, 48, 49, 50, 51, 52, 53, 54, 55, 56, 57, 58, 59, 60, 61, 62, 63, 64, 65, 66, 67, 68, 69, 70, 71, 72, 73, 74, 75, 76, 77, 78, 79, 80, 81, 82, 83, 84, 85, 86, 87, 88, 89, 90, 91, 92, 93, 94, 95, 96
      grouper.properties read from: /opt/grouper.apiBinary-2.2.2/conf/grouper.properties
      Grouper current directory is: /opt/grouper.apiBinary-2.2.2
      log4j.properties read from: /opt/grouper.apiBinary-2.2.2/conf/log4j.properties
      Grouper logs are not using log4j: class org.apache.commons.logging.impl.SLF4JLocationAwareLog
      grouper.hibernate.properties: /opt/grouper.apiBinary-2.2.2/conf/grouper.hibernate.properties
      grouper.hibernate.properties: grouper22@jdbc:oracle:thin:@oracle10g.dmz-int.unimo.it:1521:orasia
      subject.properties read from: /opt/grouper.apiBinary-2.2.2/conf/subject.properties
      sources configured in: subject.properties
      subject.properties groupersource id: g:gsa
      subject.properties groupersource id: grouperEntities
      subject.properties ldap source id: unimore: personLdap
      Subject API error: error with subject source id: unimore, name: LdapSourceAdapter, problem with getSubject by identifier, in subject.properties: serachType searchSubjectByIdentifier: , edu.internet2.middleware.subject.SourceUnavailableException: Ldap Exception: Problem with ldap conection: personLdap,
      Error querying ldap server id: personLdap, searchDn: ou=people,dc=unimore,dc=it, filter: '(&(uid=grouperTestSubjectByIdentifierOnStartupASDFGHJ)(objectclass=unimoreAccount))', returning attributes: [Ljava.lang.String;@6eed46e9
       at edu.internet2.middleware.subject.provider.LdapSourceAdapter.getLdapResultsHelper(LdapSourceAdapter.java:541)
       at edu.internet2.middleware.subject.provider.LdapSourceAdapter.getLdapResults(LdapSourceAdapter.java:433)
       at edu.internet2.middleware.subject.provider.LdapSourceAdapter.getLdapUnique(LdapSourceAdapter.java:562)
       at edu.internet2.middleware.subject.provider.LdapSourceAdapter.getSubjectByIdentifier(LdapSourceAdapter.java:236)
       at edu.internet2.middleware.subject.SubjectCheckConfig.checkConfig(SubjectCheckConfig.java:125)
       at edu.internet2.middleware.grouper.misc.GrouperCheckConfig$1.callback(GrouperCheckConfig.java:510)
       at edu.internet2.middleware.grouper.GrouperSession.callbackGrouperSession(GrouperSession.java:974)
       at edu.internet2.middleware.grouper.misc.GrouperCheckConfig.checkConfig(GrouperCheckConfig.java:506)
       at edu.internet2.middleware.grouper.misc.GrouperStartup.startup(GrouperStartup.java:315)
       at edu.internet2.middleware.grouper.app.gsh.GrouperShell.main(GrouperShell.java:157)
       at edu.internet2.middleware.grouper.app.gsh.GrouperShellWrapper.main(GrouperShellWrapper.java:31)
      Caused by: java.lang.RuntimeException: Problem with ldap conection: personLdap,
      Error querying ldap server id: personLdap, searchDn: ou=people,dc=unimore,dc=it, filter: '(&(uid=grouperTestSubjectByIdentifierOnStartupASDFGHJ)(objectclass=unimoreAccount))', returning attributes: [Ljava.lang.String;@6eed46e9
       at edu.internet2.middleware.grouper.ldap.ldaptive.LdaptiveSessionImpl.callbackLdapSession(LdaptiveSessionImpl.java:381)
       at edu.internet2.middleware.grouper.ldap.ldaptive.LdaptiveSessionImpl.list(LdaptiveSessionImpl.java:601)
       at edu.internet2.middleware.subject.provider.LdapSourceAdapter.getLdapResultsHelper(LdapSourceAdapter.java:538)
       ... 10 more
      Caused by: [org.ldaptive.LdapException@469391891::resultCode=NO_SUCH_OBJECT, matchedDn=null, responseControls=null, referralURLs=null, messageId=-1, message=javax.naming.NameNotFoundException: [LDAP: error code 32 - No Such Object]; remaining name 'ou=people,dc=unimore,dc=it', providerException=javax.naming.NameNotFoundException: [LDAP: error code 32 - No Such Object]; remaining name 'ou=people,dc=unimore,dc=it']
       at org.ldaptive.provider.ProviderUtils.throwOperationException(ProviderUtils.java:55)
       at org.ldaptive.provider.jndi.JndiConnection.processNamingException(JndiConnection.java:619)
       at org.ldaptive.provider.jndi.JndiConnection$JndiSearchIterator.initialize(JndiConnection.java:741)
       at org.ldaptive.provider.jndi.JndiConnection.search(JndiConnection.java:463)
       at org.ldaptive.SearchOperation.executeSearch(SearchOperation.java:103)
       at org.ldaptive.SearchOperation.invoke(SearchOperation.java:85)
       at org.ldaptive.SearchOperation.invoke(SearchOperation.java:15)
       at org.ldaptive.AbstractOperation.execute(AbstractOperation.java:126)
       at edu.internet2.middleware.grouper.ldap.ldaptive.LdaptiveSessionImpl$3.callback(LdaptiveSessionImpl.java:648)
       at edu.internet2.middleware.grouper.ldap.ldaptive.LdaptiveSessionImpl.callbackLdapSession(LdaptiveSessionImpl.java:375)
       ... 12 more
      Caused by: javax.naming.NameNotFoundException: [LDAP: error code 32 - No Such Object]; remaining name 'ou=people,dc=unimore,dc=it'
       at com.sun.jndi.ldap.LdapCtx.mapErrorCode(LdapCtx.java:3179)
       at com.sun.jndi.ldap.LdapCtx.processReturnCode(LdapCtx.java:3100)
       at com.sun.jndi.ldap.LdapCtx.processReturnCode(LdapCtx.java:2891)
       at com.sun.jndi.ldap.LdapCtx.searchAux(LdapCtx.java:1846)
       at com.sun.jndi.ldap.LdapCtx.c_search(LdapCtx.java:1769)
       at com.sun.jndi.toolkit.ctx.ComponentDirContext.p_search(ComponentDirContext.java:392)
       at com.sun.jndi.toolkit.ctx.PartialCompositeDirContext.search(PartialCompositeDirContext.java:358)
       at com.sun.jndi.toolkit.ctx.PartialCompositeDirContext.search(PartialCompositeDirContext.java:341)
       at org.ldaptive.provider.jndi.JndiConnection$JndiSearchIterator.search(JndiConnection.java:806)
       at org.ldaptive.provider.jndi.JndiConnection$JndiSearchIterator.initialize(JndiConnection.java:735)
       ... 19 more
      Type help() for instructions
      Exception in thread "main" java.lang.NullPointerException
       at edu.internet2.middleware.grouper.app.gsh.GrouperShell.grouperShellHelper(GrouperShell.java:257)
       at edu.internet2.middleware.grouper.app.gsh.GrouperShell.main(GrouperShell.java:168)
       at edu.internet2.middleware.grouper.app.gsh.GrouperShellWrapper.main(GrouperShellWrapper.java:31)
      

       

      By adding "gsh.useLegacy = true" in grouper.properties it works.

      1) how to specify subjectIdToFindOnCheckConfig to avoid the stacktrace on startup?

      2) which configuration files would you need to figure out the NPE?

       

      thank you,

       

      Francesco Malvezzi

       

       

            Assignee:
            Chris Hyzer (upenn.edu)
            Reporter:
            Francesco Malvezzi (unimore.it) (Inactive)
            Votes:
            0 Vote for this issue
            Watchers:
            1 Start watching this issue

              Created:
              Updated: