Skip to Content.
Sympa Menu

grouper-users - null dto in class edu.internet2.middleware.grouper.GrouperSession error.

Subject: Grouper Users - Open Discussion List

List archive

null dto in class edu.internet2.middleware.grouper.GrouperSession error.


Chronological Thread 
  • From: "Sanjay Vivek" <>
  • To: <>
  • Subject: null dto in class edu.internet2.middleware.grouper.GrouperSession error.
  • Date: Tue, 9 Oct 2007 10:29:14 +0100

Hi everyone,

This issue has been raised before but unfortunately I'm stuck at this
point. I'm getting the following error when I run ldappc:

FATAL ErrorLog:
[edu.internet2.middleware.ldappc.LdappcGrouperProvisioner] Grouper
Provision Failed: null dto in class
edu.internet2.middleware.grouper.GrouperSession
A FATAL ERROR occurred when running Ldappc.
Check error log file, correct the problem, and resubmit.

I've attached both my sources.xml and ldappc.xml with this email (with
passwords omitted).

I believe the main sticking point is the <source-subject-identifiers>
element in ldappc.xml. Our primary source of NCL subjects is JDBC, and
we would like to configure that as the source from which to present
subjects to Grouper (and ldappc). As shown below, the
<source-subject-identifiers> element identifies for each Subject source
how the provisioner locates the directory entry for a given Subject.
There is a "subjectId" column in our Subjects table in the "jdbc-ncl"
source. However, the <source-subject-identifiers> element is configured
to locate the Subject's directory entry from a LDAP source and not a
JDBC source. How do I go about configuring <source-subject-identifiers>
element to locate the Subject's directory entry from a JDBC source
instead? Any insight would be helpful. Cheers.

<source-subject-identifiers>
<source-subject-identifier source="jdbc_ncl"
subject-attribute="subjectId" >
<ldap-search base="ou=people,dc=ncl,dc=ac,dc=uk"
scope="subtree_scope"
filter="(uid={0})" />
</source-subject-identifier>
</source-subject-identifiers>

Regards
--------------
Sanjay Vivek
Web Team
ISS
University of Newcastle Upon Tyne
<?xml version="1.0" encoding="utf-8"?>

<!-- 
    * This file contains data for testing Ldappc.
    *
    * See ldappcTemplate.xml for documentation regarding how to use these
    * elements.
-->

<ldappc>
  <grouper>
    <group-queries>
      <subordinate-stem-queries>
        <stem-list>
         <stem>ncl</stem>
        </stem-list>
      </subordinate-stem-queries>
      <!--
      <attribute-matching-queries>
        <attribute-list>
          <attribute name="attribute" value="value" />
        </attribute-list>
      </attribute-matching-queries>
      -->
    </group-queries>

    <groups structure="flat"
      root-dn="ou=testgrouper,dc=ncl,dc=ac,dc=uk"
      ldap-object-class="groupOfNames"
      ldap-rdn-attribute="cn" grouper-attribute="name" >

      <group-members-dn-list list-object-class="groupOfNames" list-attribute="member" list-empty-value=""/>
      <group-members-name-list list-object-class="eduMember" list-attribute="hasMember" >
   

        <source-subject-name-mapping>
          <source-subject-name-map source="jdbc_ncl" subject-attribute="subjectId" />
          <source-subject-name-map source="g:gsa" subject-attribute="name" />
        </source-subject-name-mapping>

      </group-members-name-list>

      <!--
      <group-attribute-mapping ldap-object-class="">
        <group-attribute-map group-attribute="xxxx" ldap-attribute="yyyy" />
      </group-attribute-mapping>
       -->

    </groups>

    <memberships>
      <member-groups-list 
        list-object-class="eduMember" 
        list-attribute="isMemberOf"
        naming-attribute="name" />
    </memberships>
  </grouper>

  <source-subject-identifiers>
    <source-subject-identifier source="jdbc_ncl" subject-attribute="subjectId" >
      <ldap-search base="ou=people,dc=ncl,dc=ac,dc=uk" 
        scope="subtree_scope" 
        filter="(uid={0})" />
    </source-subject-identifier>
  </source-subject-identifiers>

  <ldap>
    <context>
      <parameter-list>
        <parameter name="initial_context_factory" value="com.sun.jndi.ldap.LdapCtxFactory" />
        <parameter name="provider_url" value="ldap://pen.ncl.ac.uk:389"; />
        <parameter name="security_authentication" value="simple" />
        <parameter name="security_principal" value="cn=yyyy" />
        <parameter name="security_credentials" value="xxxx" />
      </parameter-list>
    </context>
  </ldap>

</ldappc>
<?xml version="1.0" encoding="utf-8"?>

<!--
Grouper's subject resolver configuration
$Id: sources.xml,v 1.6 2007/04/17 13:59:09 isgwb Exp $
-->

<sources>

  <!-- Group Subject Resolver -->
  <!-- 
    NOTE: It is recommended that you **not** change the default
          values for this source adapter.
  -->
  <source adapterClass="edu.internet2.middleware.grouper.GrouperSourceAdapter">
    <id>g:gsa</id>
    <name>Grouper: Group Source Adapter</name>
    <type>group</type>
  </source>
  <!-- Group Subject Resolver -->

 <source adapterClass="edu.internet2.middleware.subject.provider.JDBCSourceAdapter">
    <id>jdbc_ncl</id>
    <name>NCL JDBC Source Adapter</name>
     <type>person</type>
     <init-param>
       <param-name>maxActive</param-name>
       <param-value>16</param-value>
     </init-param>
     <init-param>
       <param-name>maxIdle</param-name>
       <param-value>16</param-value>
     </init-param>
     <init-param>
       <param-name>maxWait</param-name>
       <param-value>-1</param-value>
     </init-param>
     <init-param>
       <param-name>dbDriver</param-name>
       <param-value>com.mysql.jdbc.Driver</param-value>
     </init-param>
     <init-param>
       <param-name>dbUrl</param-name>

 <!--<param-value>jdbc:hsqldb:C:/projects/GrouperI2MI_1-2/grouper/dist/run/grouper</param-value>-->


     </init-param>
     <init-param>
       <param-name>dbUser</param-name>
       <param-value>YYYYYY</param-value>
     </init-param>
     <init-param>
       <param-name>dbPwd</param-name>
       <param-value>XXXXX</param-value>
     </init-param>
      <init-param>
       <param-name>SubjectID_AttributeType</param-name>
       <param-value>id</param-value>
     </init-param>
     <init-param>
       <param-name>Name_AttributeType</param-name>
       <param-value>name</param-value>
     </init-param>
     <init-param>
       <param-name>Description_AttributeType</param-name>
       <param-value>description</param-value>
     </init-param>


     <search>
         <searchType>searchSubject</searchType>
		  <param>
        	<param-name>numParameters</param-name>
        	<param-value>1</param-value>
        </param>
         <param>
             <param-name>sql</param-name>
             <param-value>
select
   subject.subjectid as id, subject.name as name,
   lfnamet.lfname as lfname, loginidt.loginid as loginid,
   desct.description as description
from
   subject
   left join (select subjectid, value as lfname from subjectattribute
     where name='name') as lfnamet
     on subject.subjectid=lfnamet.subjectid
   left join (select subjectid, value as loginid from subjectattribute
     where name='loginid') as loginidt
     on subject.subjectid=loginidt.subjectid
   left join (select subjectid, value as description from subjectattribute
      where name='description') as desct
     on subject.subjectid=desct.subjectid
where
   subject.subjectid = ?
             </param-value>
         </param>
     </search>
     <search>
         <searchType>searchSubjectByIdentifier</searchType>
		  <param>
        	<param-name>numParameters</param-name>
        	<param-value>1</param-value>
        </param>
         <param>
             <param-name>sql</param-name>
             <param-value>
select
   subject.subjectid as id, subject.name as name,
   lfnamet.lfname as lfname, loginidt.loginid as loginid,
   desct.description as description
from
   subject
   left join (select subjectid, value as lfname from subjectattribute
     where name='name') as lfnamet
     on subject.subjectid=lfnamet.subjectid
   left join (select subjectid, value as loginid from subjectattribute
     where name='loginid') as loginidt
     on subject.subjectid=loginidt.subjectid
   left join (select subjectid, value as description from subjectattribute
      where name='description') as desct
     on subject.subjectid=desct.subjectid
where
   loginidt.loginid = ?
             </param-value>
         </param>
     </search>
     <search>
        <searchType>search</searchType>
		 <param>
        	<param-name>numParameters</param-name>
        	<param-value>4</param-value>
        </param>
         <param>
             <param-name>sql</param-name>
             <param-value>
select
   subject.subjectid as id, subject.name as name,
   lfnamet.lfname as lfname, loginidt.loginid as loginid,
   desct.description as description
from
   subject
   left join (select subjectid, value as lfname from subjectattribute
     where name='name') as lfnamet
     on subject.subjectid=lfnamet.subjectid
   left join (select subjectid, value as loginid from subjectattribute
     where name='loginid') as loginidt
     on subject.subjectid=loginidt.subjectid
   left join (select subjectid, value as description from subjectattribute
      where name='description') as desct
     on subject.subjectid=desct.subjectid
where
   (lower(name) like concat('%',concat(?,'%')))
   or (lower(lfnamet.lfname) like concat('%',concat(?,'%')))
   or (lower(loginidt.loginid) like concat('%',concat(?,'%')))
   or (lower(desct.description) like concat('%',concat(?,'%')))
             </param-value>
         </param>
     </search>
   </source>


   <source adapterClass="edu.internet2.middleware.subject.provider.JNDISourceAdapter">
    <id>ldap_ncl</id>
    <name>NCL LDAP Source Adapter</name>
    <type>person</type>
    <init-param>
      <param-name>INITIAL_CONTEXT_FACTORY</param-name>
      <param-value>com.sun.jndi.ldap.LdapCtxFactory</param-value>
    </init-param>
    <init-param>
      <param-name>PROVIDER_URL</param-name>
      <param-value>ldap://pen.ncl.ac.uk:389</param-value>
    </init-param>
    <init-param>
      <param-name>SECURITY_AUTHENTICATION</param-name>
      <param-value>simple</param-value>
    </init-param>
    <init-param>
      <param-name>SECURITY_PRINCIPAL</param-name>
      <param-value>cn=yyyy</param-value>
    </init-param>
    <init-param>
      <param-name>SECURITY_CREDENTIALS</param-name>
      <param-value>xxxx</param-value>
    </init-param>
     <init-param>
      <param-name>SubjectID_AttributeType</param-name>
      <param-value>eduPersonPrincipalName</param-value>
    </init-param>
    <init-param>
      <param-name>Name_AttributeType</param-name>
      <param-value>cn</param-value>
    </init-param>
    <init-param>
      <param-name>Description_AttributeType</param-name>
      <param-value>cn</param-value>
    </init-param>
    
    /// Scope Values can be: OBJECT_SCOPE, ONELEVEL_SCOPE, SUBTREE_SCOPE 
    /// For filter use 
    
    <search>
        <searchType>searchSubject</searchType>
        <param>
            <param-name>filter</param-name>
            <param-value>
                (&amp; (eduPersonPrincipalName=%TERM%) (objectclass=eduPerson))
            </param-value>
        </param>
        <param>
            <param-name>scope</param-name>
            <param-value>
                SUBTREE_SCOPE            
            </param-value>
        </param>
        <param>
            <param-name>base</param-name>
            <param-value>
                ou=people,dc=ncl,dc=ac,dc=uk
            </param-value>
        </param>
         
    </search>
    <search>
        <searchType>searchSubjectByIdentifier</searchType>
        <param>
            <param-name>filter</param-name>
            <param-value>
                (&amp; (uid=%TERM%) (objectclass=eduPerson))
            </param-value>
        </param>
        <param>
            <param-name>scope</param-name>
            <param-value>
                SUBTREE_SCOPE            
            </param-value>
        </param>
        <param>
            <param-name>base</param-name>
            <param-value>
                ou=people,dc=ncl,dc=ac,dc=uk
            </param-value>
        </param>
    </search>
    
    <search>
       <searchType>search</searchType>
         <param>
            <param-name>filter</param-name>
            <param-value>
                (&amp; (|(uid=%TERM%)(cn=*%TERM%*)(eduPersonPrincipalName=%TERM%))(objectclass=eduPerson))
            </param-value>
        </param>
        <param>
            <param-name>scope</param-name>
            <param-value>
                SUBTREE_SCOPE            
            </param-value>
        </param>
         <param>
            <param-name>base</param-name>
            <param-value>
                ou=people,dc=ncl,dc=ac,dc=uk
            </param-value>
        </param>
    </search>
    ///Attributes you would like to display when doing a search 
    
    <attribute>eduPersonPrincipalName</attribute>
    <attribute>cn</attribute>
    
  </source>

</sources>




Archive powered by MHonArc 2.6.16.

Top of Page