Skip to Content.
Sympa Menu

grouper-users - [grouper-users] Cannot use external sql subject source

Subject: Grouper Users - Open Discussion List

List archive

[grouper-users] Cannot use external sql subject source


Chronological Thread 
  • From: Tornóci László <>
  • To: "" <>
  • Subject: [grouper-users] Cannot use external sql subject source
  • Date: Fri, 28 Dec 2018 22:06:59 +0100
  • Ironport-phdr: 9a23:/6CETRSacU6phHKpxsPaFoKoctpsv+yvbD5Q0YIujvd0So/mwa6ybRCN2/xhgRfzUJnB7Loc0qyK6/CmATRIyK3CmUhKSIZLWR4BhJdetC0bK+nBN3fGKuX3ZTcxBsVIWQwt1Xi6NU9IBJS2PAWK8TW94jEIBxrwKxd+KPjrFY7OlcS30P2594HObwlSizexfbB/IA+qoQnNq8IbnZZsJqEtxxXTv3BGYf5WxWRmJVKSmxbz+MK994N9/ipTpvws6ddOXb31cKokQ7NYCi8mM30u683wqRbDVwqP6WACXWgQjxFFHhLK7BD+Xpf2ryv6qu9w0zSUMMHqUbw5Xymp4qF2QxHqlSgHLSY0/n/XhMJtj6xVrhyuqBNjzIDbe4yVKPhzc7nBcd8GS2dMXMBcXDFBDIOmaIsPCvIMM/hfr4nnoVsWrgexBQixD+3pyDhInX733ak5y+88FgzGwAsgH8gKsHvOt9X0NbwfUO+rw6nOzDXMdela2Sz66IjUbB8tu/GMXa9pfMfX1EIhGQTFjlCKpozkOTOYzusNs3Kc7+p9TeKglXQnpxtrrTi33scgkojJhoQJyl/a7yV5xpg6JcGmREJhf9GrDYZQuzmBN4txX8MiWX1ntzghyrIYpJ63ZikKx4k/yx7EbPyHbpKI7Q79W+aKPzh4mWhpeLSliBa370etzPD3WMqs0FtSsyZIltfBumoM2hDJ9MSLV+dx8l2u1DuAzwzf9+VJLE4umafaMZIt3KM8moYJvUnNHiL7nlj9grWMeUU+4Oeo7vzqYrX4qZ+YMI95kg7/Pboomsy+G+s0KBMOX2+H+euizrHj/VD5TK1Ljv0wjKbZrIjXKdkfq6O3GQNY05wv5wiiAzu6ytgVknYKIEpAeB2djojpP1/OIOr/Dfe6m1msjDBrx+rCPrL7GZXML2POkbj/crZ76k5T0hA/zctY55JIFL4NOvLzWlLpuNzCEhA5KxC0w/rgCNhl2YMeQ2WPArKBMKzMq1+E//8vI/KSa48PozbwMPwl5//1jX8lgl8RY7Ol3ZoRaHCkAPtmOUOZbmTwgtsfC2sFoBcxTPG5wGGFBHRcfXGvR68moywgBZi9JYbFWo23hrGdhmG2EoAcLjRJEFeRCXryMpifVu0XQCOUPsJ7lDEYD/6sR5J3hj+0swqv9719KHHf+2U8PInx0EM9s/HUjxU77i5cH8mb0mjLVGZokyUIWmllj+hEvUVhxwLbguBDiPtCGIkL6g==

Hi,

I am just starting to learn grouper. So I installed 2.4 with all the latest patches using mariadb for SQL backend. The UI works fine with the test data. I was trying to set up my own SQL subject source as described here:
https://spaces.at.internet2.edu/display/Grouper/Penn+subject+source+JDBC2+example

gsh works with the vanilla subject.properties containing the "Example JDBC Source Adapter". However, gsh won't start if I add this section to subject.properties:

#########################################
## Configuration for source id: sourceSeu
## Source configName: sourceSeu
#########################################
subjectApi.source.sourceSeu.id = sourceSeu

# this is a friendly name for the source
subjectApi.source.sourceSeu.name = SE people

# type is not used all that much. Can have multiple types, comma separate. Can be person, group, application
subjectApi.source.sourceSeu.types = person

# the adapter class implements the interface: edu.internet2.middleware.subject.Source
subjectApi.source.sourceSeu.adapterClass = edu.internet2.middleware.grouper.subj.GrouperJdbcSourceAdapter2

subjectApi.source.sourceSeu.param.jdbcConnectionProvider.value = edu.internet2.middleware.subject.provider.C3p0JdbcConnectionProvider

subjectApi.source.sourceSeu.param.dbUrl.value = jdbc:mysql://localhost:3306/grouper_testdata

# username when connecting to the database
subjectApi.source.sourceSeu.param.dbUser.value = grouperuser

# password when connecting to the database (or file with encrypted password inside)
subjectApi.source.sourceSeu.param.dbPwd.value = password_here

# maximum number of results from a search, generally no need to get more than 1000
subjectApi.source.sourceSeu.param.maxResults.value = 100

# the table or view to query results from. Note, could prefix with a schema name
subjectApi.source.sourceSeu.param.dbTableOrView.value = person_source

# the column name to get the subjectId from
subjectApi.source.sourceSeu.param.subjectIdCol.value = uid

# the column name to get the name from
subjectApi.source.sourceSeu.param.nameCol.value = name

subjectApi.source.sourceSeu.param.descriptionCol.value = description

# search col where general searches take place, lower case
subjectApi.source.sourceSeu.param.lowerSearchCol.value = description_lower

# optional col if you want the search results sorted in the API (note, UI might override)
subjectApi.source.sourceSeu.param.defaultSortCol.value = description

# you can count up from 0 to N of columns to search by identifier (which might also include by id)
subjectApi.source.sourceSeu.param.subjectIdentifierCol0.value = sapid

# now you can count up from 0 to N of attributes for various cols. The name is how to reference in subject.getAttribute()
subjectApi.source.sourceSeu.param.subjectAttributeCol0.value = email

The same setup works fine, if I copy the data to the database that grouper itself uses and I set GrouperJdbcConnectionProvider instead of GrouperJdbcSourceAdapter2 as an adapterClass.

I don't know what I'm doing wrong. Thank you for your help:

Laszlo

Here is the stack trace of gsh:
./gsh.sh
Detected Grouper directory structure 'api' (valid is api or webapp)
Using GROUPER_HOME: /home/torlasz/src/grouper24/app/test/grouper.apiBinary-2.4.0
Using GROUPER_CONF: /home/torlasz/src/grouper24/app/test/grouper.apiBinary-2.4.0/conf
Using JAVA: /etc/alternatives/java_sdk/bin/java
Using CLASSPATH: /home/torlasz/src/grouper24/app/test/grouper.apiBinary-2.4.0/conf:/home/torlasz/src/grouper24/app/test/grouper.apiBinary-2.4.0/dist/lib/grouper.jar:/home/torlasz/src/grouper24/app/test/grouper.apiBinary-2.4.0/lib/grouper/*:/home/torlasz/src/grouper24/app/test/grouper.apiBinary-2.4.0/lib/custom/*:/home/torlasz/src/grouper24/app/test/grouper.apiBinary-2.4.0/lib/jdbcSamples/*:/home/torlasz/src/grouper24/app/test/grouper.apiBinary-2.4.0/lib/ant/*:/home/torlasz/src/grouper24/app/test/grouper.apiBinary-2.4.0/lib/test/*:/home/torlasz/src/grouper24/app/test/grouper.apiBinary-2.4.0/dist/lib/test/*:/home/torlasz/src/grouper24/app/test/grouper.apiBinary-2.4.0/src/resources
using MEMORY: 64m-750m
log4j:WARN No such property [maxBackupIndex] in org.apache.log4j.DailyRollingFileAppender.
Grouper starting up: version: 2.4.0, build date: 2018/08/23 07:48:38, env: <no label configured>
grouperPatchStatus read from: /home/torlasz/src/grouper24/app/test/grouper.apiBinary-2.4.0/grouperPatchStatus.properties
api patches installed: 0, 1, 2, 3, 4, 5, 6, 7, 8, 9, 10
pspng patches installed: 0, 1
grouper.properties read from: /home/torlasz/src/grouper24/app/test/grouper.apiBinary-2.4.0/conf/grouper.properties
Grouper current directory is: /home/torlasz/src/grouper24/app/test/grouper.apiBinary-2.4.0/bin
log4j.properties read from: /home/torlasz/src/grouper24/app/test/grouper.apiBinary-2.4.0/conf/log4j.properties
Grouper is logging to file: /home/torlasz/src/grouper24/app/test/grouper.apiBinary-2.4.0/logs/grouper_error.log, at min level WARN for package: edu.internet2.middleware.grouper, based on log4j.properties
grouper.hibernate.properties: /home/torlasz/src/grouper24/app/test/grouper.apiBinary-2.4.0/conf/grouper.hibernate.properties
grouper.hibernate.properties: grouperuser@jdbc:mysql://localhost:3306/grouper_test?CharSet=utf8&useUnicode=true&characterEncoding=utf8
problem with sources
Couldnt startup grouper: Error initializing SourceManager
java.lang.RuntimeException: Error initializing SourceManager
at edu.internet2.middleware.subject.provider.SourceManager.init(SourceManager.java:326)
at edu.internet2.middleware.subject.provider.SourceManager.<init>(SourceManager.java:256)
at edu.internet2.middleware.subject.provider.SourceManager.getInstance(SourceManager.java:266)
at edu.internet2.middleware.grouper.misc.GrouperStartup.startup(GrouperStartup.java:284)
at edu.internet2.middleware.grouper.app.gsh.GrouperShell.main(GrouperShell.java:165)
at edu.internet2.middleware.grouper.app.gsh.GrouperShellWrapper.main(GrouperShellWrapper.java:31)
Caused by: edu.internet2.middleware.subject.SourceUnavailableException: Unable to init subject.properties JDBC source, source: sourceSeu
at edu.internet2.middleware.subject.provider.JDBCSourceAdapter.init(JDBCSourceAdapter.java:815)
at edu.internet2.middleware.subject.provider.SourceManager.loadSource(SourceManager.java:351)
at edu.internet2.middleware.subject.provider.SourceManager.parseConfig(SourceManager.java:365)
at edu.internet2.middleware.subject.provider.SourceManager.init(SourceManager.java:323)
... 5 more
Caused by: edu.internet2.middleware.subject.SourceUnavailableException: Error loading subject.properties JDBC driver: null, source: sourceSeu
at edu.internet2.middleware.subject.provider.JDBCSourceAdapter.loadDriver(JDBCSourceAdapter.java:831)
at edu.internet2.middleware.subject.provider.C3p0JdbcConnectionProvider.init(C3p0JdbcConnectionProvider.java:129)
at edu.internet2.middleware.subject.provider.JDBCSourceAdapter2.setupDataSource(JDBCSourceAdapter2.java:649)
at edu.internet2.middleware.subject.provider.JDBCSourceAdapter.init(JDBCSourceAdapter.java:759)
... 8 more
Caused by: java.lang.NullPointerException
at java.lang.Class.forName0(Native Method)
at java.lang.Class.forName(Class.java:264)
at edu.internet2.middleware.subject.provider.JDBCSourceAdapter.loadDriver(JDBCSourceAdapter.java:828)
... 11 more
Exception in thread "main" java.lang.RuntimeException: Error initializing SourceManager
at edu.internet2.middleware.subject.provider.SourceManager.init(SourceManager.java:326)
at edu.internet2.middleware.subject.provider.SourceManager.<init>(SourceManager.java:256)
at edu.internet2.middleware.subject.provider.SourceManager.getInstance(SourceManager.java:266)
at edu.internet2.middleware.grouper.misc.GrouperStartup.startup(GrouperStartup.java:284)
at edu.internet2.middleware.grouper.app.gsh.GrouperShell.main(GrouperShell.java:165)
at edu.internet2.middleware.grouper.app.gsh.GrouperShellWrapper.main(GrouperShellWrapper.java:31)
Caused by: edu.internet2.middleware.subject.SourceUnavailableException: Unable to init subject.properties JDBC source, source: sourceSeu
at edu.internet2.middleware.subject.provider.JDBCSourceAdapter.init(JDBCSourceAdapter.java:815)
at edu.internet2.middleware.subject.provider.SourceManager.loadSource(SourceManager.java:351)
at edu.internet2.middleware.subject.provider.SourceManager.parseConfig(SourceManager.java:365)
at edu.internet2.middleware.subject.provider.SourceManager.init(SourceManager.java:323)
... 5 more
Caused by: edu.internet2.middleware.subject.SourceUnavailableException: Error loading subject.properties JDBC driver: null, source: sourceSeu
at edu.internet2.middleware.subject.provider.JDBCSourceAdapter.loadDriver(JDBCSourceAdapter.java:831)
at edu.internet2.middleware.subject.provider.C3p0JdbcConnectionProvider.init(C3p0JdbcConnectionProvider.java:129)
at edu.internet2.middleware.subject.provider.JDBCSourceAdapter2.setupDataSource(JDBCSourceAdapter2.java:649)
at edu.internet2.middleware.subject.provider.JDBCSourceAdapter.init(JDBCSourceAdapter.java:759)
... 8 more
Caused by: java.lang.NullPointerException
at java.lang.Class.forName0(Native Method)
at java.lang.Class.forName(Class.java:264)
at edu.internet2.middleware.subject.provider.JDBCSourceAdapter.loadDriver(JDBCSourceAdapter.java:828)
... 11 more



Archive powered by MHonArc 2.6.19.

Top of Page