Skip to Content.
Sympa Menu

grouper-users - Re: [grouper-users] xml-import, setting log level for jndi...

Subject: Grouper Users - Open Discussion List

List archive

Re: [grouper-users] xml-import, setting log level for jndi...


Chronological Thread 
  • From:
  • To:
  • Subject: Re: [grouper-users] xml-import, setting log level for jndi...
  • Date: Wed, 21 Feb 2007 07:36:32 -0500

Some basic questions and requests:

1. What version of grouper are you running?

1.1 quickstart


2. Did you also adjust log4j.logger.edu.internet2.middleware.subject and log4j.logger.edu.internet2.middleware.subject.provider to debug level?

ahhh, no. Have changed them now. Reran the import -- after several minutes, I killed it... contents of grouper_error.log pasted in down below....


3. What LDAP server & version are you using?

sun ldap... note sure of version


4. Could you send along your sources.xml file (suitably redacted, if needs be)?

I took the source file from the quickstart package, un-commented the ldap definition, and edited as seemed appropriate. Pasted in down below.


You might try using gsh to verify & exercise the subject API outside of (attempting to) provision groups. What happens if you try something like:

gsh-0.1.0 0% findSubject("someId")

where someId is a value of the ldap attribute you search on in the "searchSubject" searchType declaration? Example: if I'm using ucPersonRegId as my subject identifier, I'll have '(ucpersonregid=%TERM%)' as the essential part of the searchSubject searchType declaration. So, if my udPersonRegId is 12345678A, findSubject('12345678A') ought to return a little info about me from the ldap directory.

Tom


Here's a console log:

[stc@stc-test2
gsh]$ /home/stc/Downloads/quickstart/ant shell
Buildfile: build.xml

init:
[mkdir] Created dir:
/home/stc/Downloads/grouper-qs/grouper/contrib/gsh/bin
[mkdir] Created dir: /home/stc/Downloads/grouper-qs/grouper/contrib/gsh/dist
[mkdir] Created dir: /home/stc/Downloads/grouper-qs/grouper/contrib/gsh/build/gsh
[mkdir] Created dir: /home/stc/Downloads/grouper-qs/grouper/contrib/gsh/build/test

build:
[javac] Compiling 56 source files to /home/stc/Downloads/grouper-qs/grouper/contrib/gsh/build/gsh
[javac] Note: /home/stc/Downloads/grouper-qs/grouper/contrib/gsh/src/gsh/com/devclue/grouper/shell/GrouperShell.java uses unchecked or unsafe operations.
[javac] Note: Recompile with -Xlint:unchecked for details.
[copy] Copying 2 files to /home/stc/Downloads/grouper-qs/grouper/contrib/gsh/bin

shell:
[java] JVM args ignored when same JVM is used.
[java] gsh-0.1.0 0%
findSubject("stc")
[java] log4j:WARN No appenders could be found for logger (edu.internet2.middleware.grouper.DebugLog).
[java] log4j:WARN Please initialize the log4j system properly.
[java] // Error: unable to evaluate command: Sourced file: inline evaluation of: ``findSubject("stc");'' : Error invoking compiled command: : Error in compiled command: javax.xml.parsers.FactoryConfigurationError: Provider org.apache.xerces.jaxp.SAXParserFactoryImpl not found
[java] gsh-0.1.0 1%
quit

BUILD SUCCESSFUL
Total time: 36 seconds
[stc@stc-test2
gsh]$

------- grouper_error log file

2007-02-21 07:48:44,835: Instantiating new Digester.
2007-02-21 07:48:44,835: Instantiating new Digester.
2007-02-21 07:48:44,903: Parsing config input stream: java.io.BufferedInputStream@116ab4e
2007-02-21 07:48:44,903: Parsing config input stream: java.io.BufferedInputStream@116ab4e
2007-02-21 07:48:45,032: Loading source: g:gsa
2007-02-21 07:48:45,032: Loading source: g:gsa
2007-02-21 07:48:45,111: Loading search: searchSubject
2007-02-21 07:48:45,111: Loading search: searchSubject
2007-02-21 07:48:45,114: Loading search: searchSubjectByIdentifier
2007-02-21 07:48:45,114: Loading search: searchSubjectByIdentifier
2007-02-21 07:48:45,117: Loading search: search
2007-02-21 07:48:45,117: Loading search: search
2007-02-21 07:48:45,118: Loading source: qsuob
2007-02-21 07:48:45,118: Loading source: qsuob
2007-02-21 07:48:45,128: Loading JDBC driver: org.hsqldb.jdbcDriver
2007-02-21 07:48:45,128: Loading JDBC driver: org.hsqldb.jdbcDriver
2007-02-21 07:48:45,128: JDBC driver loaded.
2007-02-21 07:48:45,128: JDBC driver loaded.
2007-02-21 07:48:45,144: Initializing connection factory.
2007-02-21 07:48:45,144: Initializing connection factory.
2007-02-21 07:48:45,147: Connection factory initialized.
2007-02-21 07:48:45,147: Connection factory initialized.
2007-02-21 07:48:45,166: Data Source initialized.
2007-02-21 07:48:45,166: Data Source initialized.
2007-02-21 07:48:45,209: Loading search: searchSubject
2007-02-21 07:48:45,209: Loading search: searchSubject
2007-02-21 07:48:45,219: Loading search: searchSubjectByIdentifier
2007-02-21 07:48:45,219: Loading search: searchSubjectByIdentifier
2007-02-21 07:48:45,225: Loading search: search
2007-02-21 07:48:45,225: Loading search: search
2007-02-21 07:48:45,230: Loading source: Brown
2007-02-21 07:48:45,230: Loading source: Brown
2007-02-21 07:48:45,230: Creating Directory Context
2007-02-21 07:48:45,230: Creating Directory Context

------- source definition


<!-- source definition for brown QA ldap server -->

<source adapterClass="edu.internet2.middleware.subject.provider.JNDISourceAdapter">
<id>Brown</id>
<name>Brown Person Source</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://directory.cis-qas.brown.edu:636/dc=brown,dc=edu</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=stc_query,ou=Special Users,dc=brown,dc=edu</param-value>
</init-param>
<init-param>
<param-name>SECURITY_CREDENTIALS</param-name>
<param-value>PASSWORD</param-value>
</init-param>
<init-param>
<param-name>SubjectID_AttributeType</param-name>
<param-value>brownBRUID</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>description</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; (brownBRUID=%TERM%) (objectclass=brownPerson))
</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=brownPerson))
</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>
</source>



Archive powered by MHonArc 2.6.16.

Top of Page