Skip to Content.
Sympa Menu

grouper-users - Re: [grouper-users] import, command line parameters....

Subject: Grouper Users - Open Discussion List

List archive

Re: [grouper-users] import, command line parameters....


Chronological Thread 
  • From: Tom Barton <>
  • To:
  • Cc:
  • Subject: Re: [grouper-users] import, command line parameters....
  • Date: Tue, 27 Feb 2007 12:53:50 -0600

I think I've found our documentation bug. :-)

The xml-import utility in grouper 1.1 in fact requires the attribute named 'immediate' with each subject being listed in a group. For example, instead of

<list field="members">
<subject id="stc"/>
</list>

use

<list field="members">
<subject id="stc" source='Brown' type='person' immediate='true' />
</list>

Note that the 'type' and 'source' attributes are also documented as being required, but I haven't in fact tested if they are. The documentation shows 'immediate' as optional. I think the documentation is supposed to be as intended, so perhaps this is a code bug, not a documentation bug. But one or the other.

In addition, take care of what namespace is used for the 'id' attribute. Should that be id='stc' or id='<some opaque identifier>'? It depends on what you declare for the subject 'id' attribute in sources.xml. For the JNDI adapter subject v0.2.1 uses the declaration

<param-name>SubjectID_AttributeType</param-name>
<param-value>someAttribute</param-value>

The value of <someAttribute> is the subject's id, and that value is what's needed in the xml import file to identify a member.

I've tested a revised brown xml import file using both JNDI and JDBC sources for the members, and it works fine in both circumstances.

Hope this helps,
Tom


wrote:
I'm trying to use import to 1) create a new stem, 2) create a couple of test groups, and 3) add a couple of people to each of the test groups. I'm using xml-import. I'm able to do 1) and 2); 3) is failing (altho I'm now communicating properly with my ldap server).

I used this command line:

ant xml-import -Dcmd="GrouperSystem brown-test-registry.xml brown-testing.properties "

and got this in the grouper_error.log file:

2007-02-22 15:19:38,917: searchType: searchSubjectByIdentifier filter: (& (brownNetID=GrouperSystem) (objectclass=inetOrgPerson)) base: dc=brown,dc=edu scope: SUBTREE_SCOPE
2007-02-22 15:19:38,946: Ldap NamingException: [LDAP: error code 32 - No Such Object]
javax.naming.NameNotFoundException: [LDAP: error code 32 - No Such Object]; remaining name 'dc=brown,dc=edu'
at com.sun.jndi.ldap.LdapCtx.mapErrorCode(LdapCtx.java:3010)
at com.sun.jndi.ldap.LdapCtx.processReturnCode(LdapCtx.java:2931)


I've pasted the relevant lines from my sources file down below....

I read the log file to say that its trying to do an ldap search, using the attribute I specified (brownNetID), but searching for a value it obtained from the command line (GrouperSystem) , rather than from the input file (eg stc)....

the doc for import describes the first command line parameter as


Identifies a Subject 'who' will create a GrouperSession.

suggestions about what I'm doing wrong?

Thanks!


-------- from sources file

<search>
<searchType>searchSubject</searchType>
<param>
<param-name>filter</param-name>
<param-value>
(&amp; (brownBRUID=%TERM%) (objectclass=inetOrgPerson))
</param-value>
</param>
<param>
<param-name>scope</param-name>
<param-value>
SUBTREE_SCOPE
</param-value>
</param>
<param>
<param-name>base</param-name>
<param-value>
dc=brown,dc=edu
</param-value>
</param>

</search>
<search>
<searchType>searchSubjectByIdentifier</searchType>
<param>
<param-name>filter</param-name>
<param-value>
(&amp; (brownNetID=%TERM%) (objectclass=inetOrgPerson))
</param-value>
</param>
<param>
<param-name>scope</param-name>
<param-value>
SUBTREE_SCOPE
</param-value>
</param>
<param>
<param-name>base</param-name>
<param-value>
dc=brown,dc=edu
</param-value>
</param>
</search>

<search>
<searchType>search</searchType>
<param>
<param-name>filter</param-name>
<param-value>
(&amp; (|(uid=%TERM%)(cn=*%TERM%*)(exampleEduRegId=%TERM%))(objectclass=exampleEduPerson))
</param-value>
</param>
<param>
<param-name>scope</param-name>
<param-value>
SUBTREE_SCOPE
</param-value>
</param>
<param>
<param-name>base</param-name>
<param-value>
dc=brown,dc=edu
</param-value>
</param>
</search>
///Attributes you would like to display when doing a search
<attribute>sn</attribute>
<attribute>department</attribute>




Archive powered by MHonArc 2.6.16.

Top of Page