grouper-users - [grouper-users] RE: Grouper Loader
Subject: Grouper Users - Open Discussion List
List archive
- From: "Klug, Lawrence" <>
- To: Chris Hyzer <>, "" <>
- Subject: [grouper-users] RE: Grouper Loader
- Date: Fri, 27 Jan 2012 18:23:44 +0000
- Accept-language: en-US
Chris, We’re still in Dev and planning, so yes, we can start over clean.
J Thanks, Lawrence From: Chris Hyzer [mailto:]
Are you in prod? Can you just start over clean?
J The main thing is the grouper_members table, where the subject_id needs to be migrated over. I could probably help you make a script if you need to migrate it (assuming that
uclaPPID can be resolved by identifier in the new sources.xml config)…
Thanks, Chris From: Klug, Lawrence
Chris, uclaUniversityId is in LDAP for all subjects, yes. Definitely would be a good choice because it never changes.
Is it just a matter of modifying sources.xml and replacing every instance of uclaPPID with uclaUniversityId? Anything else to watch out for? Thanks, Lawrence From: Chris Hyzer
Is uclaUniversityId in LDAP? Maybe that could be your subjectId… does it change? Thanks, Chris From: Klug, Lawrence
Chris, It would be ideal if we could join to a lookup table, but I suspect that uclaPPID exists only in LDAP. Thanks for the clarification.
We’ll explore the options. Regards, Lawrence From: Chris Hyzer
Im bringing this back to the list to share with others. Basically the problem is that your loader query is returning uclaUniversityId, and that is not the subject_id, the subject_id is uclaPPID. It is *very * inefficient to do it this way… since each time the loader runs a query, it will have to resolve all those subjects (LDAP lookup for each membership). If you can have the query
join to a lookup table to resolve to the uclaPPID, then you wont have to do lookups since the uclaPPID is the subjectId in the grouper_members table. This is the best way to go. In Grouper 2.1 you can use a findByIdentifier() to resolve loader subjects with a subject_identifier column, but still it is inefficient. If you want to go down the uclaUniversityId route pre-2.1,
we can patch the code… its right here in GrouperLoaderResultset.java: FROM:
this.subject
= SubjectFinder.getSource(subjectSourceId).getSubject(subjectId, true);
//CH 20091013: we need the loader to be based on subjectId to eliminate lookups...
//this.subject = SubjectFinder.getSource(subjectSourceId).getSubject(subjectId, false);
//if (this.subject == null) {
// this.subject = SubjectFinder.getSource(subjectSourceId).getSubjectByIdentifier(subjectId, true);
//} TO:
this.subject
= SubjectFinder.getSource(subjectSourceId).getSubject(subjectId, false);
if (this.subject
== null) {
this.subject
= SubjectFinder.getSource(subjectSourceId).getSubjectByIdentifier(subjectId,
true); } Thanks, Chris From: Klug, Lawrence
Here is the output. Yes, searchSubject is configured to use uclaPPID and that’s incompatible with uclaUniversityId – so what is the proper configuration to solve the issue? I’ve tried the
things that seem obvious. Thanks, Lawrence Gsh cmd: gsh 0% grouperSession = GrouperSession.startRootSession(); edu.internet2.middleware.grouper.GrouperSession: e2d999891ac14e68b5a031bebdf813d6,'GrouperSystem ','application' gsh 1% SubjectFinder.findByIdAndSource("6032xxxxxx", "ldap", true); // Error: unable to evaluate command: Sourced file: inline evaluation of: ``SubjectFinder.findBy IdAndSource("6032xxxxxx", "ldap", true);'' : Method Invocation SubjectFinder.findByIdAndSource // See error log for full stacktrace // caused by: edu.internet2.middleware.subject.SubjectNotFoundException: // No results: searchSubject filter:(& (uclaPPID=%TERM%)(objectclass=person)) searchValue: 6032xxxxxx gsh 2% error log: 2012-01-26 07:04:23,485: [main] INFO EventLog.info(141) - - [ef2992efb8354d26ba4b25d6f046ddc6,'GrouperSystem','application'] add group type: 'grouperLoader' (2ms) 2012-01-26 07:04:41,461: [main] INFO EventLog.info(141) - - [e2d999891ac14e68b5a031bebdf813d6,'GrouperSystem','application'] session: start (8ms) 2012-01-26 07:04:55,838: [main] ERROR ShellHelper.eval(76) - - Sourced file: inline evaluation of: ``SubjectFinder.findByIdAndSource("6032xxxxxx",
"ldap", true);'' : Method Invocation SubjectFinder.findByIdAndSource edu.internet2.middleware.subject.SubjectNotFoundException: No results: searchSubject filter:(& (uclaPPID=%TERM%)(objectclass=person)) searchValue: 6032xxxxxx at edu.internet2.middleware.subject.provider.JNDISourceAdapter.getLdapUnique(JNDISourceAdapter.java:469) at edu.internet2.middleware.subject.provider.JNDISourceAdapter.getSubject(JNDISourceAdapter.java:132) at edu.internet2.middleware.grouper.subj.SourcesXmlResolver.find(SourcesXmlResolver.java:107) at edu.internet2.middleware.grouper.subj.CachingResolver.find(CachingResolver.java:117) at edu.internet2.middleware.grouper.subj.ValidatingResolver.find(ValidatingResolver.java:85) at edu.internet2.middleware.grouper.SubjectFinder.findByIdAndSource(SubjectFinder.java:235) at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method) at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:39) at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:25) at java.lang.reflect.Method.invoke(Method.java:597) at bsh.Reflect.invokeMethod(Unknown Source) at bsh.Reflect.invokeStaticMethod(Unknown Source) at bsh.Name.invokeMethod(Unknown Source) at bsh.BSHMethodInvocation.eval(Unknown Source) at bsh.BSHPrimaryExpression.eval(Unknown Source) at bsh.BSHPrimaryExpression.eval(Unknown Source) at bsh.Interpreter.eval(Unknown Source) at bsh.Interpreter.eval(Unknown Source) at bsh.Interpreter.eval(Unknown Source) at edu.internet2.middleware.grouper.app.gsh.ShellHelper.eval(ShellHelper.java:48) at edu.internet2.middleware.grouper.app.gsh.GrouperShell.run(GrouperShell.java:409) at edu.internet2.middleware.grouper.app.gsh.GrouperShell.grouperShellHelper(GrouperShell.java:216) at edu.internet2.middleware.grouper.app.gsh.GrouperShell.main(GrouperShell.java:146) at edu.internet2.middleware.grouper.app.gsh.GrouperShellWrapper.main(GrouperShellWrapper.java:16) From: Chris Hyzer
What happens when you run this in gsh?
grouperSession = GrouperSession.startRootSession(); SubjectFinder.findByIdAndSource("6032xxxxxx",
"ldap",
true); |
- [grouper-users] RE: Grouper Loader, (continued)
- [grouper-users] RE: Grouper Loader, Klug, Lawrence, 01/05/2012
- [grouper-users] RE: Grouper Loader, Chris Hyzer, 01/05/2012
- [grouper-users] RE: Grouper Loader, Chris Hyzer, 01/05/2012
- [grouper-users] RE: Grouper Loader, Klug, Lawrence, 01/23/2012
- [grouper-users] RE: Grouper Loader, Chris Hyzer, 01/23/2012
- Message not available
- Message not available
- Message not available
- Message not available
- Message not available
- Message not available
- Message not available
- Message not available
- Message not available
- [grouper-users] RE: Grouper Loader, Chris Hyzer, 01/26/2012
- [grouper-users] RE: Grouper Loader, Klug, Lawrence, 01/26/2012
- [grouper-users] RE: Grouper Loader, Chris Hyzer, 01/26/2012
- [grouper-users] RE: Grouper Loader, Klug, Lawrence, 01/27/2012
- [grouper-users] RE: Grouper Loader, Chris Hyzer, 01/27/2012
- [grouper-users] RE: Grouper Loader, Klug, Lawrence, 01/27/2012
- Message not available
- Message not available
- Message not available
- Message not available
- [grouper-users] RE: Grouper Loader, Chris Hyzer, 01/23/2012
- [grouper-users] RE: Grouper Loader, Klug, Lawrence, 01/05/2012
Archive powered by MHonArc 2.6.16.