grouper-dev - Re: [grouper-dev] usdu didn't update grouper_members
Subject: Grouper Developers Forum
List archive
- From: Jim Fox <>
- To: Shilen Patel <>
- Cc: Grouper Dev <>
- Subject: Re: [grouper-dev] usdu didn't update grouper_members
- Date: Tue, 18 Dec 2012 13:49:06 -0800 (PST)
Here's the problem.
The updateMemberAttributes method in Member.java uses the Subject's
getAttributeValue to get the values for the sort/search fields.
However, the subject attribute list does not contain any of the
'basic' attributes: SubjectID_AttributeType, Name_AttributeType,
and Description_AttributeType. There is an optional
'exceptBasicAttributes' parameter on the getAttributeValue call,
but it doesn't really have any effect.
This results in the basic attributes being unavailable for
sort or search.
My first attempt at this used name and description, both in the basic set.
Thus they always got set to null.
My second attempt used three sort/search fileds: name (in basic),
last_name, first_name. This resulted in the latter two getting set.
For my third I modified Member.java to explicitly test for
attribute_name="name"
and if so use getName() instead. This populated all the sort/search fields
correctly. It's not a general solution.
I think many sites will use one or more of the basic three attributes
in their sorts/searches. Either Subject has to start including them
in its attribute list, or Member has to explicitly look for them.
Jim
On Mon, 17 Dec 2012, Shilen Patel wrote:
Date: Mon, 17 Dec 2012 18:53:04 -0800
From: Shilen Patel
<>
To: Jim Fox
<>
Cc: Grouper Dev
<>
Subject: Re: [grouper-dev] usdu didn't update grouper_members
Hi Jim,
Can you try running the following on a subject and see if the member
attributes are updated in the database?
gsh 0% session = GrouperSession.startRootSession()
edu.internet2.middleware.grouper.GrouperSession:
6821a3084cde49268a0fefebe3ccff10,'GrouperSystem','application'
gsh 1% subj = SubjectFinder.findById("stwi")
subject: id='stwi' type='person' source='jdbc' name='Steven Windsor'
gsh 2% member = MemberFinder.findBySubject(session, subj, false)
member: id='stwi' type='person' source='jdbc'
uuid='46c1bc5fadf041758039f91257606d68'
gsh 3% member.updateMemberAttributes(subj, true)
Also run getAttributes() and verify that name, lastname, and firstname are
there.
gsh 4% subj.getAttributes(false)
Are there any errors in the grouper logs?
Thanks!
-- Shilen
On 12/17/12 6:16 PM, "Jim Fox"
<>
wrote:
I ran the usdu() method in gsh. It ran for several minutes, reported
a few nissing subjects, but did not update any sort/search fields
in grouper_members.
gsh looked like this:
--------------------------------------------
bin/gsh.sh
Using GROUPER_HOME: /data/local/src/grouper/grouper.apiBinary-2.1.2
Using GROUPER_CONF: /data/local/src/grouper/grouper.apiBinary-2.1.2/conf
Using JAVA: /usr/local/java/bin/java
using MEMORY: 64m-750m
Grouper starting up: version: 2.1.2, build date: 2012/08/14 15:02:01,
env: gws2
grouper.properties read from:
/data/local/src/grouper/grouper.apiBinary-2.1.2/conf/grouper.properties
Grouper current directory is:
/data/local/src/grouper/grouper.apiBinary-2.1.2
log4j.properties read from:
/data/local/src/grouper/grouper.apiBinary-2.1.2/conf/log4j.properties
Grouper is logging to file: /logs/gsh/event.log, /logs/gsh/error.log,
at min level INFO for package: edu.internet2.middleware.grouper, based on
log4j.properties
grouper.hibernate.properties:
/data/local/src/grouper/grouper.apiBinary-2.1.2/conf/grouper.hibernate.pro
perties
grouper.hibernate.properties:
gws@jdbc:postgresql://iamdb11.cac.washington.edu/gws2
sources.xml read from:
/data/local/src/grouper/grouper.apiBinary-2.1.2/conf/sources.xml
sources.xml jdbc source id: eppn:
gws@jdbc:postgresql://iamdb11.cac.washington.edu/gws2
sources.xml groupersource id: g:gsa
sources.xml jdbc source id: dns:
gws@jdbc:postgresql://iamdb11.cac.washington.edu/gws2
sources.xml groupersource id: grouperEntities
sources.xml jdbc source id: uwpds:
gws@jdbc:postgresql://iamdb11.cac.washington.edu/gws2
sources.xml jdbc source id: uwwi:
gws@jdbc:postgresql://iamdb11.cac.washington.edu/gws2
Type help() for instructions
gsh 0% GrouperSession.startRootSession()
edu.internet2.middleware.grouper.GrouperSession:
09411664c1994354bf09ed14a338ba04,'GrouperSystem','application'
gsh 1% usdu()
<some missing subjects>
usdu completed successfully
--------------------------------------------
but after that I didn't get any updates to the sort search fields.
In sources.xml I have, in uppds where all the people are
<source
adapterClass="edu.internet2.middleware.grouper.subj.GrouperJdbcSourceAdapt
er">
<id>uwpds</id>
<name>UW PDS people</name>
<type>person</type>
...
<init-param>
<param-name>sortAttribute0</param-name>
<param-value>name</param-value>
</init-param>
<init-param>
<param-name>sortAttribute1</param-name>
<param-value>lastname</param-value>
</init-param>
<init-param>
<param-name>sortAttribute2</param-name>
<param-value>firstname</param-value>
</init-param>
...
The system is generally able to find and add members. Even after adding
someone to a group the sort/search fields for that member are still blank.
Is there a switch somewhere indicating whether or not to use those fields?
Where in the code is the update done?
Thanks,
Jim
- [grouper-dev] usdu didn't update grouper_members, Jim Fox, 12/17/2012
- Re: [grouper-dev] usdu didn't update grouper_members, Shilen Patel, 12/17/2012
- Re: [grouper-dev] usdu didn't update grouper_members, Jim Fox, 12/17/2012
- Re: [grouper-dev] usdu didn't update grouper_members, Jim Fox, 12/18/2012
- Re: [grouper-dev] usdu didn't update grouper_members, Shilen Patel, 12/19/2012
- Re: [grouper-dev] usdu didn't update grouper_members, Jim Fox, 12/19/2012
- RE: [grouper-dev] usdu didn't update grouper_members, Shilen Patel, 12/21/2012
- RE: [grouper-dev] usdu didn't update grouper_members, Jim Fox, 12/27/2012
- RE: [grouper-dev] usdu didn't update grouper_members, Shilen Patel, 12/21/2012
- Re: [grouper-dev] usdu didn't update grouper_members, Jim Fox, 12/19/2012
- Re: [grouper-dev] usdu didn't update grouper_members, Shilen Patel, 12/19/2012
- Re: [grouper-dev] usdu didn't update grouper_members, Shilen Patel, 12/17/2012
Archive powered by MHonArc 2.6.16.