Skip to Content.
Sympa Menu

grouper-users - [grouper-users] RE: subject source in sources.xml

Subject: Grouper Users - Open Discussion List

List archive

[grouper-users] RE: subject source in sources.xml

Chronological Thread 
  • From: Chris Hyzer <>
  • To: Matt Wilks <>
  • Cc: "" <>
  • Subject: [grouper-users] RE: subject source in sources.xml
  • Date: Fri, 21 Oct 2011 14:58:57 +0000
  • Accept-language: en-US

You can specify DB connection properties like this:

e.g. mysql: com.mysql.jdbc.Driver
e.g. p6spy (log sql): com.p6spy.engine.spy.P6SpyDriver
for p6spy, put the underlying driver in
e.g. oracle: oracle.jdbc.driver.OracleDriver
e.g. hsqldb: org.hsqldb.jdbcDriver
e.g. postgres: org.postgresql.Driver -->


e.g. mysql: jdbc:mysql://localhost:3306/grouper
e.g. p6spy (log sql): [use the URL that your DB requires]
e.g. oracle:
e.g. hsqldb (a): jdbc:hsqldb:dist/run/grouper;create=true
e.g. hsqldb (b): jdbc:hsqldb:hsql://localhost:9001
e.g. postgres: jdbc:postgresql:grouper -->



Run this from GSH and see the output:

#> cd /usr/local/grouper/grouper
#> bin/

sources.xml read from:
sources.xml groupersource id: g:gsa
sources.xml jdbc source id: jdbc: GrouperJdbcConnectionProvider
sources.xml jdbc source id: sourceId: GrouperJdbcConnectionProvider

You need to see an entry there for source, which you have as id: sourceId.
You should probably change:





(or something more descriptive)

Then, based on that source id, run this:

gsh 0% grouperSession = GrouperSession.startRootSession();
gsh 1% SubjectFinder.findByIdOrIdentifierAndSource("whateverId",
"yourSourceId", true);
subject: id='10021368' type='person' source='pennperson' name='Chris Hyzer'


-----Original Message-----
From: Matt Wilks

Sent: Friday, October 21, 2011 10:51 AM
To: Chris Hyzer

Subject: Re: subject source in sources.xml

Whoops, two mistakes. Forgot to reply to the list and forgot to attach
the file! Sorry about that.

On 11-10-21 10:49 AM, "Chris Hyzer"

>Where is the sources.xml?
>-----Original Message-----
>From: Matt Wilks
>Sent: Friday, October 21, 2011 10:46 AM
>To: Chris Hyzer
>Subject: Re: subject source in sources.xml
>Here's the command I'm running, and I'll attach sources.xml (everything
>but the source I added has been stripped out). I put the uoft_id table in
>the same database as the grouper tables because I didn't see how to
>specify alternate database credentials in the <source> tag. 'uoft_id'
>just contains a bunch of dummy data, one record per user.
>#> cd /usr/local/grouper/grouper
>#> bin/gsh -xmlimport conf/sources.xml
>Using GROUPER_HOME: /usr/local/grouper/grouper
>Using GROUPER_CONF: /usr/local/grouper/grouper/conf
>Using JAVA: java
>using MEMORY: 64m-512m
>(note, might need to type in your response multiple times (Java stdin is
>(note, you can whitelist or blacklist db urls and users in the
>Are you sure you want to import data from xml in db user 'grouper', db url
>'jdbc:mysql://localhost:3306/grouper'? (y|n):
>Grouper starting up: version: 2.0.0, build date: 2011/09/06 07:55:27, env:
><no label configured>
> read from:
>Grouper current directory is: /usr/local/grouper/grouper.apiBinary-2.0.0
> read from:
>Grouper is logging to file:
>/usr/local/grouper/grouper/logs/grouper_error.log, at min level WARN for
>package: edu.internet2.middleware.grouper, based on
>sources.xml read from:
>sources.xml groupersource id: g:gsa
>sources.xml jdbc source id: jdbc: GrouperJdbcConnectionProvider
>sources.xml jdbc source id: sourceId: GrouperJdbcConnectionProvider
>XML file contains 0 records
>10:38:52: Beginning import: database contains 1,432 records
>Ending import: processed 0 records
>Ending import: database contains 1432 records
>Ending import: 0 inserts, 0 updates, and 0 skipped records
>DONE: 10:38:53: imported 0 records from:
>There are no inserts or updates from XML file, registry is in sync
>Thanks again,
>On 11-10-21 9:08 AM, "Chris Hyzer"
> wrote:
>>You don't have to import it, just put it on the classpath, can you send a
>>sanitized copy of the sources.xml and the gsh command you are running and
>>the output?
>>-----Original Message-----
>> On Behalf Of Matt Wilks
>>Sent: Friday, October 21, 2011 8:09 AM
>>Subject: [grouper-users] subject source in sources.xml
>>I'm trying to configure another subject source in conf/sources.xml. I
>>think I've got the syntax right, but is there anything I have to do to
>>make grouper recognize it? I tried loading the sources.xml file with
>> # gsh -xmlimport conf/sources.xml
>>But the new subjects still aren't showing up from an entity search in the
>>admin UI. There must be something simple I'm missing...
>>Matt Wilks
>>University of Toronto Information Security, I+TS

Archive powered by MHonArc 2.6.16.

Top of Page