Skip to Content.
Sympa Menu

grouper-users - [grouper-users] RE: Grouper 2.4 problem in subject.properties

Subject: Grouper Users - Open Discussion List

List archive

[grouper-users] RE: Grouper 2.4 problem in subject.properties


Chronological Thread 
  • From: "Black, Carey M." <>
  • To: "Guenther, Dean R." <>, "" <>
  • Subject: [grouper-users] RE: Grouper 2.4 problem in subject.properties
  • Date: Fri, 12 Oct 2018 04:05:21 +0000
  • Accept-language: en-US
  • Authentication-results: spf=pass (sender IP is 128.146.138.9) smtp.mailfrom=osu.edu; internet2.edu; dkim=pass (signature was verified) header.d=osu.edu;internet2.edu; dmarc=pass action=none header.from=osu.edu;
  • Authentication-results-original: spf=none (sender IP is ) ;
  • Ironport-phdr: 9a23:FikTVB0JUfntCCHEsmDT+DRfVm0co7zxezQtwd8ZsesULv7xwZ3uMQTl6Ol3ixeRBMOHs60C07KempujcFRI2YyGvnEGfc4EfD4+ouJSoTYdBtWYA1bwNv/gYn9yNs1DUFh44yPzahANS47xaFLIv3K98yMZFAnhOgppPOT1HZPZg9iq2+yo9JDffwdFiCChbb9uMR67sRjfus4KjIV4N60/0AHJonxGe+RXwWNnO1eelAvi68mz4ZBu7T1et+ou+MBcX6r6eb84TaFDAzQ9L281/szrugLdQgaJ+3ART38ZkhtMAwjC8RH6QpL8uTb0u+ZhxCWXO9D9QKsqUjq+8ahkVB7oiD8GNzEn9mHXltdwh79frB64uhBz35LYbISTOfFjfK3SYMkaSHJBUMhPSiJBHo2yYYgBD+UDPOZXs4bzqFQVoBuiHAmgGP/jxiNUinPr26AxzuQvERvB3AwlB98CvmnZrNHvO6gOUuC51LTDwCvZYPNMxzj86JXDfBc7rf2CQLl9dtHeyU01GAzZjVWcs5HpMy2b2+kWtGib9PdgWfixhGE6tgF8uz6izdoihInOg4Ia0FHE9SNhzYY3ONK3U1J0bcSiEJRKsiGVKZN6Qsw4Q2FvpSY60qMJuYSjfCcU0pQn3Bnfa/qdc4eW7RLjVf2RIStihHNlYr6/gQy98U2+xeHkTsm7yk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ZKQZnvTY5igF21dlQBNeFW+rQzOpahbObA1aK2b65hmi6rl2JK/No7306RpGJwSe/Nio4M2OrQnhCGWDH1kEq7v4jokJsMezwIH2S+xCSlYewZZqB7cYsRT2v7JNaqgNhyms3sXWJV7liuGwlA1cO0KlKealXn1lhI3F8M6XWshSq/yWlylDck5qqS1SDD2aLsbh0Cb2lQWS9vgUq/LA==
  • Spamdiagnosticmetadata: NSPM
  • Spamdiagnosticoutput: 1:99

Dean,

If I am parsing these pages properly.
REF1:
https://spaces.at.internet2.edu/display/Grouper/Grouper+sources.xml+conversion+to+subject.properties
REF2:
https://spaces.at.internet2.edu/display/Grouper/Migrating+from+the+Grouper+JDBC+subject+source+to+the+JDBC2+subject+source
REF3:
https://spaces.at.internet2.edu/display/Grouper/Penn+subject+source+JDBC2+example


Just guessing, but I think... your current error is:
"
SourceUnavailableException: dbTableOrView not defined, source:
GrouperPersonRegistry
"

I don't see a config value for
subjectApi.source.jdbc.param.dbTableOrView.value = . some value... ( see the
second ref page for some details )
or
subjectApi.source.GrouperPersonRegistry.param.dbTableOrView.value = . some
value...

I have no idea what, if any, a default value might be. ( And the value on the
REF2 page is ... not it. )
REF3 has a sample SQL "CREATE TABLE" statement that should be used as an
example. ( Details are up to you to decide and match up with your
configuration values. )



However, I think there is another "bigger" error in your config too.

subjectApi.source.jdbc.id = GrouperPersonRegistry ( My guess is that you
changed the value after the = from "jdbc" to "GrouperPersonRegistry" here.
Or it is a conversion bug. Just guessing.)

Then you should have a set of properties like this ( but you did not show
those...) :

subjectApi.source.GrouperPersonRegistry.name = Grouper Person Registry
subjectApi.source.GrouperPersonRegistry.types = person
subjectApi.source.GrouperPersonRegistry.adapterClass =
edu.internet2.middleware.grouper.subj.GrouperJdbcSourceAdapter2
subjectApi.source.GrouperPersonRegistry.param.jdbcConnectionProvider.value =
edu.internet2.middleware.grouper.subj.GrouperJdbcConnectionProvider
..

Or you can change back to "jdbc.id = jdbc". ( Your choice. )


The posted examples for subject.properties files are ( IMHO ) poor examples
because "user made up strings" should stand out from the "structure of the
config/code values".
Let me take a hack at a better example.. ( IMHO )

The following is a subject.properties (incomplete) example for a sample
Subject source from a JDBC data source.
NOTE: In this example:
String = "ANameForThisSource"
: all places should be changed to be a value of your choosing.(AKA:
The value is a configuration value, not code ) AND you must change them all
to the same single value.
: no spaces, or special chars... keep it "a through Z" only for
simplicity. :)
: This is used as a "value" for the ".id" property AND it appears in
the "key structure" for the ".id" property! (As well as in the key values for
all other properties that are part of this source configuration too.)
: This value is visible in the UI ! So make it helpful for a user
to understand the source. ( HR Only, Student Only, Department Directory,
UniversityWide, External, .... )

...
subjectApi.source.ANameForThisSource.id = ANameForThisSource
subjectApi.source.ANameForThisSource.name = A short name (presented to Humans
in the UI) for this subject source goes here. Use only a word or two. Not a
paragraph like this silly, exaggerated, example value.
subjectApi.source.ANameForThisSource.types = person
subjectApi.source.ANameForThisSource.adapterClass =
edu.internet2.middleware.grouper.subj.GrouperJdbcSourceAdapter2
subjectApi.source.ANameForThisSource.param.jdbcConnectionProvider.value =
edu.internet2.middleware.grouper.subj.GrouperJdbcConnectionProvider
....

HTH.

--
Carey Matthew



From:


<>
On Behalf Of Guenther, Dean R.
Sent: Thursday, October 11, 2018 8:16 PM
To:

Subject: [grouper-users] Grouper 2.4 problem in subject.properties

I have a new Grouper 2.4 install (thanks to Chris and Chad, I needed Java 1.8)

I've put together what I thought was a  correct subject.properties (below)
but when I try and start grouper it complains that it is unable to init
subject.properties. But I can't tell from the error what I'm missing. Here is
the stack trace:

Using GROUPER_CONF:
/opt/grouper/grouper.installer-2.4.0/grouper.apiBinary-2.4.0/conf
Using JAVA:
/usr/lib/jvm/java-1.8.0-openjdk-1.8.0.181-3.b13.el7_5.x86_64/bin/java
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: dev
grouperPatchStatus read from:
/opt/grouper/grouper.installer-2.4.0/grouper.apiBinary-2.4.0/grouperPatchStatus.properties
api patches installed:        0, 1, 2
pspng patches installed:      0
grouper.properties read from:
/opt/grouper/grouper.installer-2.4.0/grouper.apiBinary-2.4.0/conf/grouper.properties
Grouper current directory is:
/opt/grouper/grouper.installer-2.4.0/grouper.apiBinary-2.4.0/conf
log4j.properties read from:  
/opt/grouper/grouper.installer-2.4.0/grouper.apiBinary-2.4.0/conf/log4j.properties
Grouper is logging to file:  
/opt/grouper/grouper.installer-2.4.0/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:
/opt/grouper/grouper.installer-2.4.0/grouper.apiBinary-2.4.0/conf/grouper.hibernate.properties
grouper.hibernate.properties:

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.loader.GrouperLoader.main(GrouperLoader.java:107)
        at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
        at
sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:62)
        at
sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43)
        at java.lang.reflect.Method.invoke(Method.java:498)
        at
edu.internet2.middleware.grouper.app.gsh.GrouperShell.handleSpecialCase(GrouperShell.java:216)
        at
edu.internet2.middleware.grouper.app.gsh.GrouperShell.main(GrouperShell.java:150)
        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: GrouperPersonRegistry
        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)
        ... 11 more
Caused by: edu.internet2.middleware.subject.SourceUnavailableException:
dbTableOrView not defined, source: GrouperPersonRegistry
        at
edu.internet2.middleware.subject.provider.JDBCSourceAdapter2.setupDataSource(JDBCSourceAdapter2.java:658)
        at
edu.internet2.middleware.subject.provider.JDBCSourceAdapter.init(JDBCSourceAdapter.java:759)
        ... 14 more
Exception in thread "main" java.lang.RuntimeException:
java.lang.reflect.InvocationTargetException
        at
edu.internet2.middleware.grouper.app.gsh.GrouperShell.handleSpecialCase(GrouperShell.java:226)
        at
edu.internet2.middleware.grouper.app.gsh.GrouperShell.main(GrouperShell.java:150)
        at
edu.internet2.middleware.grouper.app.gsh.GrouperShellWrapper.main(GrouperShellWrapper.java:31)
Caused by: java.lang.reflect.InvocationTargetException
        at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
        at
sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:62)
        at
sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43)
        at java.lang.reflect.Method.invoke(Method.java:498)
        at
edu.internet2.middleware.grouper.app.gsh.GrouperShell.handleSpecialCase(GrouperShell.java:216)
        ... 2 more
Caused by: 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.loader.GrouperLoader.main(GrouperLoader.java:107)
        ... 7 more
Caused by: edu.internet2.middleware.subject.SourceUnavailableException:
Unable to init subject.properties JDBC source, source: GrouperPersonRegistry
        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)
        ... 11 more
Caused by: edu.internet2.middleware.subject.SourceUnavailableException:
dbTableOrView not defined, source: GrouperPersonRegistry
        at
edu.internet2.middleware.subject.provider.JDBCSourceAdapter2.setupDataSource(JDBCSourceAdapter2.java:658)
        at
edu.internet2.middleware.subject.provider.JDBCSourceAdapter.init(JDBCSourceAdapter.java:759)
        ... 14 more
What am I missing in the subject.properties? I'm not using sources.xml.

subjectApi.source.jdbc.id = GrouperPersonRegistry
subjectApi.source.jdbc.name = Grouper Person Registry
subjectApi.source.jdbc.types = person
subjectApi.source.jdbc.adapterClass =
edu.internet2.middleware.grouper.subj.GrouperJdbcSourceAdapter2
subjectApi.source.jdbc.param.jdbcConnectionProvider.value =
edu.internet2.middleware.grouper.subj.GrouperJdbcConnectionProvider
subjectApi.source.jdbc.param.identifierAttributes.value = LOGINID
subjectApi.source.jdbc.param.subjectIdentfierAttribute0.value =
EXTERNALSYSTEMID
subjectApi.source.jdbc.param.emailAttributeName.value = USERPRINCIPALNAME
subjectApi.source.jdbc.param.maxResults.value = 1000
subjectApi.source.jdbc.param.maxPageSize.value = 100
subjectApi.source.jdbc.param.maxActive.value = 16
subjectApi.source.jdbc.param.maxIdle.value = 16
subjectApi.source.jdbc.param.maxWait.value = -1
subjectApi.source.jdbc.param.dbDriver.value = oracle.jdbc.driver.OracleDriver
subjectApi.source.jdbc.param.dbUrl.value =
jdbc:oracle:thin:@grouper-db.wsu.edu:1521:MIM
subjectApi.source.jdbc.param.dbUser.value = ServiceAccount
subjectApi.source.jdbc.param.dbPwd.value = ******************
subjectApi.source.jdbc.param.SubjectID_AttributeType.value = EXTERNALSYSTEMID
subjectApi.source.jdbc.param.Name_AttributeType.value = DISPLAYNAME
subjectApi.source.jdbc.param.Description_AttributeType.value = DESCRIPTION
subjectApi.source.jdbc.param.subjectVirtualAttribute_0_searchAttribute0.value
=
${subject.name},${subjectUtils.defaultIfBlank(subject.getAttributeValue('DISPLAYNAME'),
"")},${subjectUtils.defaultIfBlank(subject.getAttributeValue('LOGINID'),
"")},${subjectUtils.defaultIfBlank(subject.description,
"")},${subjectUtils.defaultIfBlank(subject.getAttributeValue('USERPRINCIPALNAME'),
"")}
subjectApi.source.jdbc.param.sortAttribute0.value = EXTERNALSYSTEMID
subjectApi.source.jdbc.param.sortAttribute1.value = LOGINID
subjectApi.source.jdbc.param.searchAttribute0.value = searchAttribute0
subjectApi.source.jdbc.param.useInClauseForIdAndIdentifier.value = true
subjectApi.source.jdbc.param.identifierAttributes.value = LOGINID
subjectApi.source.jdbc.param.emailAttributeName.value = USERPRINCIPALNAME
subjectApi.source.jdbc.param.subjectIdentifierAttribute0.value = LOGINID
subjectApi.source.jdbc.search.searchSubject.param.inclause.value =
s.subjectid = ?
subjectApi.source.jdbc.search.searchSubjectByIdentifier.param.inclause.value
= a.value = ?
subjectApi.source.jdbc.internalAttributes = searchAttribute0





Archive powered by MHonArc 2.6.19.

Top of Page