grouper-users - RE: [grouper-users] Help debugging new jdbc subject adapter
Subject: Grouper Users - Open Discussion List
List archive
- From: Chris Hyzer <>
- To: "" <>, "" <>
- Subject: RE: [grouper-users] Help debugging new jdbc subject adapter
- Date: Fri, 11 Jan 2013 04:12:36 +0000
- Accept-language: en-US
I would try GSH and do the various subject searches, by id, identifier, and
search. When it fails, look in logs and see if the error helps. If not,
forward that error / stack / log messages to the list.
Thanks,
Chris
-----Original Message-----
From:
[mailto:]
Sent: Thursday, January 10, 2013 3:05 PM
To:
Subject: [grouper-users] Help debugging new jdbc subject adapter
I'm creating an alternative subject source for the Project Bamboo instance of
Grouper. I've gotten the database and a subject table created and populated
(see first snippet below) and I modified the sources.xml file to point to
that database and table and do the proper searches (see second snippet). I
bounced the Tomcat instance hosting Grouper on arche.metazome.info and tried
to add a subject to a group. I typed in a name, hit search and got "Error:
Unable to connect to to an entity database".
Looking for advice on how to troubleshoot this. I didn't see anything in the
tomcat or grouper logs.
----------
postgres=# create database bbsubjectdb;
CREATE DATABASE
postgres=# GRANT ALL PRIVILEGES ON DATABASE bbsubjectdb TO grouper;
GRANT
postgres=# \c bbsubjectdb
psql (8.4.13, server 8.4.12)
You are now connected to database "bbsubjectdb".
bbsubjectdb=# CREATE TABLE bbsubject (
bbsubjectdb(# BPId character varying (40) PRIMARY KEY,
bbsubjectdb(# name character varying (255) NOT NULL,
bbsubjectdb(# description character varying (255) );
NOTICE: CREATE TABLE / PRIMARY KEY will create implicit index
"bbsubject_pkey" for table "bbsubject"
CREATE TABLE
bbsubjectdb=# insert into bbsubject(BPId, name, description)
bbsubjectdb-# values ('04574969-e851-4fbf-8535-0b81b9b3f2f3', 'earnest
adams', 'Ernie from the Voronoi Project');
INSERT 0 1
bbsubjectdb=# insert into bbsubject(BPId, name, description)
bbsubjectdb-# values ('c00f294d-651b-495b-9633-a900dd1a7418', 'fred farkle',
'Freddie from the Voronoi Project');
INSERT 0 1
bbsubjectdb=# select * from bbsubject;
bpid | name | description
--------------------------------------+---------------+----------------------------------
04574969-e851-4fbf-8535-0b81b9b3f2f3 | earnest adams | Ernie from the
Voronoi Project
c00f294d-651b-495b-9633-a900dd1a7418 | fred farkle | Freddie from the
Voronoi Project
(2 rows)
bbsubjectdb=# select name, description FROM bbsubject WHERE name ILIKE
'%earnest%';
name | description
---------------+--------------------------------
earnest adams | Ernie from the Voronoi Project
(1 row)
----------
<?xml version="1.0" encoding="utf-8"?>
<!--
Grouper's subject resolver configuration
$Id: sources.example.xml,v 1.8 2009-08-11 20:18:09 mchyzer Exp $
-->
<sources>
<!-- Group Subject Resolver -->
...<snip>...
<!-- khazelton 2013-01-10 Alternative Entity Subject Resolver for Bamboo -->
<source
adapterClass="edu.internet2.middleware.grouper.subj.GrouperJdbcSourceAdapter">
<id>postgresSubjectSource</id>
<name>Subject JDBC Source Adapter</name>
<type>person</type>
<init-param>
<param-name>jdbcConnectionProvider</param-name>
<param-value>edu.internet2.middleware.subject.provider.C3p0JdbcConnectionProvider</param-value>
</init-param>
<init-param>
<param-name>maxActive</param-name>
<param-value>16</param-value>
</init-param>
<init-param>
<param-name>maxIdle</param-name>
<param-value>16</param-value>
</init-param>
<init-param>
<param-name>maxWait</param-name>
<param-value>-1</param-value>
</init-param>
<init-param>
<param-name>dbDriver</param-name>
<param-value>org.postgresql.Driver</param-value>
</init-param>
<init-param>
<param-name>dbUrl</param-name>
<param-value>jdbc:postgresql://localhost:5432/bbsubjectdb</param-value>
</init-param>
<init-param>
<param-name>dbUser</param-name>
<param-value>xxxxxx</param-value>
</init-param>
<init-param>
<param-name>dbPwd</param-name>
<param-value>yyyyyyyy</param-value>
</init-param>
<init-param>
<param-name>SubjectID_AttributeType</param-name>
<param-value>bpid</param-value>
</init-param>
<init-param>
<param-name>Name_AttributeType</param-name>
<param-value>name</param-value>
</init-param>
<init-param>
<param-name>Description_AttributeType</param-name>
<param-value>description</param-value>
</init-param>
<search>
<searchType>searchSubject</searchType>
<param>
<param-name>sql</param-name>
<param-value>
select name, description FROM bbsubject WHERE name = ?
</param-value>
</param>
</search>
<search>
<searchType>searchSubjectByIdentifier</searchType>
<param>
<param-name>sql</param-name>
<param-value>
select name, description FROM bbsubject WHERE bpid = ?
</param-value>
</param>
</search>
<search>
<searchType>search</searchType>
<param>
<param-name>sql</param-name>
<param-value>
select name, description FROM bbsubject WHERE name ILIKE '%' || ? || '%'
</param-value>
</param>
</search>
</source>
<!-- end khazelton insert 10-Jan-2013 -->
</sources>
----------
- [grouper-users] Help debugging new jdbc subject adapter, Keith Hazelton, 01/10/2013
- RE: [grouper-users] Help debugging new jdbc subject adapter, Chris Hyzer, 01/10/2013
- Re: [grouper-users] Help debugging new jdbc subject adapter, Keith Hazelton, 01/11/2013
- <Possible follow-up(s)>
- Re: [grouper-users] Help debugging new jdbc subject adapter, mchyzer, 01/11/2013
- Re: [grouper-users] Help debugging new jdbc subject adapter, Keith Hazelton, 01/11/2013
- Re: [grouper-users] Help debugging new jdbc subject adapter, Keith Hazelton, 01/11/2013
- Re: [grouper-users] Help debugging new jdbc subject adapter, Shilen Patel, 01/11/2013
- RE: [grouper-users] Help debugging new jdbc subject adapter, Chris Hyzer, 01/11/2013
- Re: [grouper-users] Help debugging new jdbc subject adapter, Keith Hazelton, 01/11/2013
- Re: [grouper-users] Help debugging new jdbc subject adapter, Shilen Patel, 01/11/2013
- Re: [grouper-users] Help debugging new jdbc subject adapter, Keith Hazelton, 01/11/2013
- Re: [grouper-users] Help debugging new jdbc subject adapter, Keith Hazelton, 01/11/2013
- Re: [grouper-users] Help debugging new jdbc subject adapter, mchyzer, 01/13/2013
- Re: [grouper-users] Help debugging new jdbc subject adapter, Keith Hazelton, 01/13/2013
- Re: [grouper-users] Help debugging new jdbc subject adapter, mchyzer, 01/13/2013
- RE: [grouper-users] Help debugging new jdbc subject adapter, Chris Hyzer, 01/10/2013
Archive powered by MHonArc 2.6.16.